
    im                    2   d Z ddlmZ ddlZddlZddlZddlZddlmZm	Z	m
Z
mZmZmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlmZ ddlmZmZ ddlmZ ddl Z!dd	l!m"Z" dd
l#m$Z$ ddl%m&Z& ddl'm(Z( erddl)m*Z* ddlm+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 g dZ2 G d d      Z3 G d de      Z4 G d dejj                        Z5 G d de5      Z6 G d de5      Z7dde"z  iZ8 G d d e5      Z9 G d! d"e5      Z:	 	 	 	 	 	 d%	 	 	 	 	 	 	 	 	 	 	 	 	 d&d#Z;	 	 	 	 	 	 	 	 	 	 d'd$Z<y)(a=  
Parser plugin interface.

This module defines the parser plugin interface and contains other
related parser support code.

The module is mainly useful for those wanting to write a parser that
can plugin to rdflib. If you are wanting to invoke a parser you likely
want to do so through the Graph class parse method.

    )annotationsN)BufferedIOBaseBytesIO	RawIOBaseStringIO
TextIOBaseTextIOWrapper)
IOTYPE_CHECKINGAnyBinaryIOListOptionalTextIOTupleUnioncast)urljoin)Requesturl2pathname)	xmlreader)__version__)_urlopen)	Namespace)URIRef)Message)BufferedReader)
addinfourl)Buffer)Graph)ParserInputSourceStringInputSourceURLInputSourceFileInputSourcePythonInputSourcec                      e Zd ZdZd ZddZy)r!    c                     y Nr(   selfs    <C:\Projects\mas-dev\.venv\Lib\site-packages\rdflib/parser.py__init__zParser.__init__A           c                     y r*   r(   )r,   sourcesinks      r-   parsezParser.parseD   r/   r0   N)r2   r"   r3   r    returnNone)__name__
__module____qualname__	__slots__r.   r4   r(   r0   r-   r!   r!   >   s    Ir0   r!   c                       e Zd ZdZdd fdZd Zd Zd Zedd       Z	edd       Z
ddZdd	Zddd
ZddZddZd Zd Zdd dZdd dZdd dZd!dZd!dZd"d#dZd ZddZd Z xZS )$BytesIOWrapper)wrappedenc_strtext_strencodingencoder	has_read1has_seek_name_fileno_isatty	_leftover_bytes_per_char_text_bytes_offsetc                2   t         t        |           || _        || _        t        j                  | j                        | _        d | _        d | _	        d | _
        d | _        d | _        d | _        d | _        d| _        d| _        |j#                         j%                  dd      }|dv rd| _        y |dv rd| _        y |j)                  d      s|j)                  d	      rd
| _        y |j)                  d      s|j)                  d      rd| _        y d
| _        y )Nr0   r   _-)utf-8utf8u8cp65001   )latin1zlatin-1z
iso-8859-1z	iso8859-1asciizus-asciizutf-16utf16   zutf-32utf32   )superr<   r.   r=   r@   codecs
getencoderrA   r>   r?   rB   rC   rD   rE   rF   rG   rI   lowerreplacerH   
startswith)r,   r=   r@   norm_encoding	__class__s       r-   r.   zBytesIOWrapper.__init__Y   s   nd,. ((7AE?C)-(,$(
<@=A #'( (00c:>>()D  
 
 $%D %%h/=3K3KG3T#$D %%h/=3K3KG3T#$D  $%D r0   c                &   d }t        | j                  t              r1| j                  | j                        \  }}t	        |      | _        d}nt        | j                  t              rG| j                  j                  }t        |t              rt        d      t        t        |      | _        n1t        | j                  t        t        f      r| j                  | _        | j
                  | j
                  }n$| j                  | j                  }nt        d      |	 |j                  }t#        |d      | _        	 |j'                         | _        || _        y # t         $ r d}Y <w xY w# t         $ r t#        |d      | _        Y || _        y w xY w)NstringzYBytesIOWrapper cannot be wrapped in TextIOWrapper, then wrapped in another BytesIOWrapperzNo stream to read fromstreamread1seek)
isinstancer=   strrA   r   r>   r	   bufferr<   	Exceptionr   r   r   r   r?   nameAttributeErrorhasattrrB   seekablerC   rD   )r,   ri   bbleninner
use_streams         r-   _initzBytesIOWrapper._init   sP   "dllC(ll4<<0GAt"1:DLDm4LL''E%0= 
  $NE:z8&<= LLDM<<#J]]&J455< ! !W5	8&//1DM 
 "   
  	8#J7DM
	8s$    E >E, E)(E),FFc                >   | j                   | j                  | j                          | j                   | j                   }n| j                  | j                  }	 j                         | _        y # t
        $ r}|| _        Y d }~y d }~wt        $ r
 d| _        Y y w xY wN)r>   r?   rq   filenorE   OSErrorrj   r,   rp   es      r-   _check_filenozBytesIOWrapper._check_fileno   s    <<DMM$9JJL<<#J]]&J	%,,.DL 	DLL 	DL	   A1 1	B:BBBc                >   | j                   | j                  | j                          | j                   | j                   }n| j                  | j                  }	 j                         | _        y # t
        $ r}|| _        Y d }~y d }~wt        $ r
 d| _        Y y w xY wNF)r>   r?   rq   isattyrF   rv   rj   rw   s      r-   _check_isattyzBytesIOWrapper._check_isatty   s    <<DMM$9JJL<<#J]]&J	!%,,.DL 	DLL 	! DL	!rz   c                R    | j                   | j                          | j                   S r*   )rD   rq   r+   s    r-   ri   zBytesIOWrapper.name   s    ::JJLzzr0   c                   | j                   | j                  yd }| j                   	 | j                   j                  }n#| j                  	 | j                  j                  }|dS |S # t        $ r d }Y w xY w# t        $ r d }Y $w xY wr|   )r>   r?   closedrj   )r,   r   s     r-   r   zBytesIOWrapper.closed   s    <<DMM$9!%<<#,, ]]&-- u2F2 " 
 " s#   A) A: )A76A7:BBc                     y)NTr(   r+   s    r-   readablezBytesIOWrapper.readable   s    r0   c                     yr|   r(   r+   s    r-   writablezBytesIOWrapper.writable   s    r0   c                    t        d      )Nz!Cannot truncate on BytesIOWrapperNotImplementedErrorr,   sizes     r-   truncatezBytesIOWrapper.truncate   s    !"EFFr0   c                    | j                   | j                          t        | j                   t              r| j                   t	        | j                         S r*   )rF   r~   re   BaseExceptionboolr+   s    r-   r}   zBytesIOWrapper.isatty   s?    << dllM2,,%%r0   c                    | j                   | j                          t        | j                   t              r| j                   | j                   dS | j                   S rs   )rE   ry   re   r   r+   s    r-   ru   zBytesIOWrapper.fileno   sH    << dllM2,,-2?4<<?r0   c                   | j                   | j                  y | j                   	 | j                   j                          y | j                  	 | j                  j                          y y # t        $ r Y y w xY w# t        $ r Y y w xY wr*   )r>   r?   closerj   r+   s    r-   r   zBytesIOWrapper.close   s    <<DMM$9<<#""$ ]]&##% ' " 
 " s#   A+ A: +	A76A7:	BBc                     y r*   r(   r+   s    r-   flushzBytesIOWrapper.flush  s    r0   c                  t         r| j                  J ||dk  rW	 | j                  j                         }| j	                  |      \  }}| j
                  r| j
                  |z   }d| _        n/|}n+|t        | j
                        k(  r| j
                  }d| _        n|t        | j
                        k  r$| j
                  d | }| j
                  |d  | _        nt        || j                        \  }}t        |      |dkD  rdndz   }| j
                  }	t        |	      |k  rS	 | j                  j                  |      }
t        |
      dk  rn(| j	                  |
      \  }}|	|z  }	t        |	      |k  rSt        |	      |k(  r
d| _        |	}n|	d | }|	|d  | _        ~	| xj                  t        |      z  c_
        |S # t        $ r d}Y w xY w# t        $ r d}
Y w xY w)Nr    r0   rQ   )r   r?   readEOFErrorrA   rG   lendivmodrH   intrI   )r,   r   ret_strret_encodedenc_len	ret_bytesdmget_per_loop	got_bytesgot_strs              r-   _read_bytes_from_text_streamz+BytesIOWrapper._read_bytes_from_text_stream  s   ==,,,<4!8#}}113 $(<<#8 K~~ NN[8	!$'	S((I DNC''u-I!^^DE2DN$ 4 45DAqq6!a%QQ7L#~~Ii.4'!#'==#5#5l#CG w<!#'+||G'<$W[(	 i.4' 9~%!$%	%et,	!*45!13y>1G  *   ! G!s#   F> $G >GGGGc                   ||dk(  ry| j                   | j                  | j                          | j                   | j                   j                  |      }|S | j	                  |      }|S )z
        Read at most size bytes, returned as a bytes object.

        If the size argument is negative or omitted read until EOF is reached.
        Return an empty bytes object if already at EOF.
        r   r0   )r>   r?   rq   r   r   )r,   r   r   s      r-   r   zBytesIOWrapper.read/  sm     	<<DMM$9JJL<<#))$/I  99$?Ir0   c               <   | j                   | j                  | j                  | j                          | j                  s
t	               | j                   <||dk  r| j                   j                         S | j                   j                  |      S t	        d      )u   
        Read at most size bytes, with at most one call to the underlying raw stream’s
        read() or readinto() method. Returned as a bytes object.

        If the size argument is negative or omitted, read until EOF is reached.
        Return an empty bytes object at EOF.
        r   z2read1() not supported for TextIO in BytesIOWrapper)r>   r?   rB   rq   r   rc   r   s     r-   rc   zBytesIOWrapper.read1@  s     LL T]]%:t~~?UJJL~~%''<<#|tax||))++<<%%d++!"VWWr0   c               b   t         rt        |t        t        f      sJ t	        |      dk(  ry| j
                  | j                  | j                          | j
                  | j
                  j                  |      S t	        |      }| j                  |      }t	        |      }|dk(  ry||d| |S )z
        Read len(b) bytes into buffer b.

        Returns number of bytes read (0 for EOF), or error if the object
        is set not to block and has no data to read.
        r   N)
r   re   
memoryview	bytearrayr   r>   r?   rq   readintor   )r,   rm   r   	read_dataread_lens        r-   r   zBytesIOWrapper.readintoR  s     a*i!8999q6Q;<<DMM$9JJL<<#<<((++q6D#@@FI9~H1}$AixLOr0   c               6   t         rt        |t        t        f      sJ | j                  | j
                  | j                  | j                          | j                  s
t               | j                  | j                  j                  |      S t        d      )a  
        Read len(b) bytes into buffer b, with at most one call to the underlying raw
        stream's read() or readinto() method.

        Returns number of bytes read (0 for EOF), or error if the object
        is set not to block and has no data to read.
        z6readinto1() not supported for TextIO in BytesIOWrapper)
r   re   r   r   r>   r?   rB   rq   r   	readinto1r,   rm   s     r-   r   zBytesIOWrapper.readinto1j  s     a*i!8999LL T]]%:t~~?UJJL~~%''<<#<<))!,,!D
 	
r0   c                  | j                   | j                   s
t               | j                  | j                  | j                   | j	                          |dk(  st        d      |dk7  rt        d      | j                  | j                  j                  ||       n(| j                  | j                  j                  ||       d| _        d| _        y)Nr   z,Only SEEK_SET is supported on BytesIOWrapperz3Only seeking to zero is supported on BytesIOWrapperr0   )rC   r   r>   r?   rq   rd   rI   rG   )r,   offsetwhences      r-   rd   zBytesIOWrapper.seek~  s    ==$T]]%''LL T]]%:t}}?TJJL{%&TUUQ;%E  <<#LLff-]]&MMvv."#r0   c                    | j                   | j                  | j                  | j                          | j                  S r*   )r>   r?   rC   rq   r+   s    r-   rl   zBytesIOWrapper.seekable  s1    LL T]]%:t}}?TJJL}}r0   c                   | j                   | j                   st        d      | j                  ,	 | j                  j                         | _        | j                  S | j                  S # t
        $ r Y | j                  S w xY w)Nz/Cannot tell() pos because file is not seekable.)rC   r   r>   tellrI   rj   r+   s    r-   r   zBytesIOWrapper.tell  s{    ==$T]]%&WXX<<#*.,,*;*;*=' &&&t&&& " &&&s   A( (	A?>A?c                   t        d      )Nz Cannot write to a BytesIOWrapperr   r   s     r-   writezBytesIOWrapper.write  s    !"DEEr0   )rM   )r=   z Union[str, StringIO, TextIOBase])r5   r   )r5   r   r*   )r   Optional[int]r5   r   )r5   r   )rt   )r   r   r5   bytes)rm   r   r5   r   )r   )r   r   r   r   r5   r   )r7   r8   r9   r:   r.   rq   ry   r~   propertyri   r   r   r   r   r}   ru   r   r   r   r   rc   r   r   rd   rl   r   r   __classcell__r_   s   @r-   r<   r<   H   s    I $%L$L!  
 3 3 G&@)V"X$0
((
'Fr0   r<   c                  "    e Zd ZdZdddZddZy)r"   z
    TODO:
    Nc                b    t         j                  j                  | |       d | _        d| _        y )N	system_idF)r   r"   r.   content_type
auto_closer,   r   s     r-   r.   zInputSource.__init__  s*    &&ty&A+/r0   c                    | j                         }|rt        |d      r	 |j                          | j	                         }|rt        |d      r	 |j                          y y y # t        $ r Y =w xY w# t        $ r Y y w xY w)Nr   )getCharacterStreamrk   r   rh   getByteStream)r,   cfs      r-   r   zInputSource.close  s    ##%G$	  G$	 %1    s#   A" A1 "	A.-A.1	A=<A=r*   )r   Optional[str]r5   r6   )r7   r8   r9   __doc__r.   r   r(   r0   r-   r"   r"     s     
r0   r"   c                  B    e Zd ZdZd	d
dZddZddZddZddZddZ	y)r&   a  
    Constructs an RDFLib Parser InputSource from a Python data structure,
    for example, loaded from JSON with json.load or json.loads:

    >>> import json
    >>> as_string = """{
    ...   "@context" : {"ex" : "http://example.com/ns#"},
    ...   "@graph": [{"@type": "ex:item", "@id": "#example"}]
    ... }"""
    >>> as_python = json.loads(as_string)
    >>> source = create_input_source(data=as_python)
    >>> isinstance(source, PythonInputSource)
    True
    Nc                J    d | _         d| _        d | _        || _        || _        y r|   )r   r   	public_idr   data)r,   r   r   s      r-   r.   zPythonInputSource.__init__  s&     (,(1	r0   c                    | j                   S r*   r   r+   s    r-   getPublicIdzPythonInputSource.getPublicId      ~~r0   c                    || _         y r*   r   )r,   r   s     r-   setPublicIdzPythonInputSource.setPublicId  	    "r0   c                    | j                   S r*   r   r+   s    r-   getSystemIdzPythonInputSource.getSystemId  r   r0   c                    || _         y r*   r   r   s     r-   setSystemIdzPythonInputSource.setSystemId  r   r0   c                    d | _         y r*   )r   r+   s    r-   r   zPythonInputSource.close  s	    	r0   r*   )r   r   r   r   )r5   r   )r   r   r5   r6   )r   r   r5   r6   r   )
r7   r8   r9   r   r.   r   r   r   r   r   r(   r0   r-   r&   r&     s%    ##r0   r&   c                  4     e Zd ZdZ	 	 d	 	 	 	 	 d fdZ xZS )r#   zO
    Constructs an RDFLib Parser InputSource from a Python String or Bytes
    c                   t         t        |   |       t        |t              rKt        |      }| j                  |       | j                  |       t        ||      }| j                  |       y t        |      }| j                  |       t        ||      }| j                  |       | j                  |j                         y r*   )rX   r#   r.   re   rf   r   setCharacterStreamsetEncodingr<   setByteStreamr   r	   r@   )r,   valuer@   r   rb   b_streamc_streamr_   s          r-   r.   zStringInputSource.__init__  s     	/	:eS!e_F##F+X&%eX6Hx(U^Fv&$VX6H##H-X../r0   )rM   N)r   zUnion[str, bytes]r@   rf   r   r   )r7   r8   r9   r   r.   r   r   s   @r-   r#   r#     s6      #'	0 0 0 !	0 0r0   r#   z
User-agentz8rdflib-%s (https://rdflib.github.io/; eikeon@eikeon.com)c                  h     e Zd ZU dZded<   ed	d       Zed
d       ZdddZdd fdZ	ddZ
 xZS )r$   zU
    Constructs an RDFLib Parser InputSource from a URL to read it from the Web.
    	List[str]linksc                    |j                         }|j                         D cg c]  \  }}|j                         |k(  s| c}}S c c}}w r*   )r[   items)clsmessageri   keyvals        r-   getallmatchingheadersz$URLInputSource.getallmatchingheaders  s>     zz|$+MMOKOSsyy{d7JOKKKs   A Ac                    | j                  |j                  d      }g }|D ]F  }|j                  d      D cg c]  }|j                          }}|D ]  }|j	                  |        H |S c c}w )NLink,)r   headerssplitstripappend)r   response
linkslinesretarray	linkslinelinkstrr   links           r-   	get_linkszURLInputSource.get_links  sq    ..x/?/?H
 #I4=OOC4HI4HW]]_4HEI%  $  Js   A,c                L   |rd| dnd }d}g }| j                   D ]  }|j                  d      D cg c]  }|j                          }}||vr4|r)||v s;|j                  |d   j                  d             _|j                  |d   j                  d              |S c c}w )Nztype=""zrel="alternate";r   z<>)r   r   r   r   )r,   type_typestrrelstraltsr   ppartss           r-   get_alternateszURLInputSource.get_alternates  s    6;6%!2"JJD(,

381QWWYE8U"e#KKat 45E!HNN401   9s   B!c                F   t         t        |   |       || _        t	        t
              }|dk(  rd|d<   n|dk(  rd|d<   n|dv rd|d<   n|dk(  rd	|d<   n{|d
k(  rd|d<   np|dk(  rd|d<   ne|dk(  rd|d<   nZddlm} ddlm	} g } ||      D ],  }d|j                  v s|j                  |j                         . dj                  |      |d<   t        |d |      }t        |      }	|	j                         | _        | j!                  |	      | _        |dv ro| j%                  d      }
|
D ]X  }t'        | j                  |      }|| j                  k7  s)||k7  s/t        t        |            }	|	j                         | _         n | j)                  | j                         | j+                  |	j
                  d      }|r|d   nd | _        | j,                  $| j,                  j/                  dd      d   | _        | j1                  |	       |	j3                         | _        y )Nxmlzapplication/rdf+xml, */*;q=0.1Acceptn3ztext/n3, */*;q=0.1)turtlettlz,text/turtle, application/x-turtle, */*;q=0.1ntztext/plain, */*;q=0.1trigzapplication/trig, */*;q=0.1trixzapplication/trix, */*;q=0.1json-ldz6application/ld+json, application/json;q=0.9, */*;q=0.1r   )r!   )plugins)kind/z, )r  application/ld+jsonr  )r   zcontent-typer   rQ   )rX   r$   r.   urldictr   rdflib.parserr!   rdflib.pluginr  ri   r   joinr   r   geturlr   r   r  r   r   r   r   r   r   inforesponse_info)r,   r   format	myheadersr!   r  accr  reqr   r  r   	full_linkcontent_typesr_   s                 r-   r.   zURLInputSource.__init__-  s   nd,Y7 M	U?"BIht^"6Ih(("PIht^"9Ihv"?Ihv"?Ihy H h --C&)!&&=JJqvv& * #'))C.Ihiy1'}??$^^H-
77&&-B&CD#DHHd3	(Y)-C'	(:;H'0DH  	"2283C3C^T0=M!,4( $ 1 1 7 7Q ? BD8$%]]_r0   c                    | j                   S r*   )r  r+   s    r-   __repr__zURLInputSource.__repr__g  s    xxr0   )r   r   r5   r   )r   r   r5   r   r*   )r   r   r5   r   )NN)r   r   r  r   r5   rf   )r7   r8   r9   r   __annotations__classmethodr   r   r  r.   r#  r   r   s   @r-   r$   r$     sH     L L  8-tr0   r$   c                  2     e Zd Z	 d	 	 	 d fdZddZ xZS )r%   c                  t         j                  j                         j                         }t	        t        j                  |j
                        j                         j                         |      }t        t        | '  |       || _
        t        |t              rK| j                  |       | j                  |j                         	 |j                   }| j#                  |       y t*        rt        |t,              sJ | j#                  |       |.| j                  |       | j                  t/        ||             y y # t$        t&        f$ r) | j#                  t)        ||j                               Y y w xY w)Nbase)r@   )pathlibPathcwdas_urir   ri   absoluterX   r%   r.   filere   r   r   r   r@   rg   r   rj   LookupErrorr<   r   r   r	   )r,   r0  r@   r*  r   rm   r_   s         r-   r.   zFileInputSource.__init__m  s*    ||!((*7<<		2;;=DDFTR	ot-i8	dJ'##D)T]]+QKK""1% !$777t$#  *''dX(NO  #K0 Q"">$#OPQs   E 5E;:E;c                ,    t        | j                        S r*   )reprr0  r+   s    r-   r#  zFileInputSource.__repr__  s    DIIr0   r*   )r@   r   r0  z>Union[BinaryIO, TextIO, TextIOBase, RawIOBase, BufferedIOBase]r$  )r7   r8   r9   r.   r#  r   r   s   @r-   r%   r%   l  s$    
 #'	  	L<r0   r%   c           	        t        t        d | |||g            }t        |      dk7  rt        d      d}| kt        r|J |J |J t        | t              r| }nEt        | t              r| }n1t        | t        j                        rt        |       }n
t        | t              r| }nt        | d      rt        | t              s| }t               }t        | d      rK|j                  |        |j                  | j                         	 | j                   }	|j#                  |	       n|j#                  |       |t(        j*                  u r|j-                  d       nCt        |d      r7|j-                  |j.                         nt1        d	t3        |       d
| d      d}
d}|&t        r|J |J | J t5        ||||      \  }
}}}|t        r|J |J | J t7        |      }|pt        r|J |J | J t        |t8              rt;        |      }d}n@t        |t        t        t<        f      rt?        |      }d}ntA        dt3        |             |t1        d      |xjB                  |z  c_!        ||jE                  |       |S |jG                         |jE                  |
xs d       |S # t$        t&        f$ r |j#                  |        Y w xY w)zR
    Return an appropriate InputSource instance for the given
    parameters.
    c                
    | d uS r*   r(   )vs    r-   <lambda>z%create_input_source.<locals>.<lambda>  s    atmr0   rQ   z;exactly one of source, location, file or data must be givenNr   r@   zfile:///dev/stdinri   zUnexpected type 'z' for source ''F)r0  r  input_sourcelocationTz(parse data can only str, or bytes. not: zcould not create InputSourcer   )$listfilterr   
ValueErrorr   re   r"   rf   r+  PurePathr   rk   r   r   r   r@   rg   r   rj   r1  sysstdinr   ri   rh   type"_create_input_source_from_locationr%   r  r&   r   r#   RuntimeErrorr   r   r   )r2   publicIDr:  r0  r   r  non_empty_argumentsr9  r   rm   absolute_locationr   s               r-   create_input_sourcerG    s     #XtT*	
 1$I
 	
 L<<<<###fk*!L&#&!FG$4$45v;FE*(FI1N*}6:. 33F; ,,V__=;"MM$2215 !..q1		> ,,-@AQ' ,,QVV4>B6lFS  J<<<<>!> /%	
	
 ###<<>!>&t,###<<>!>dD!,T2LJsE956,T2LJ!I$t*VWW677:-$$X.  %%'/$$%6%<"=A +K8 ;$226:;s   J? ? K#"K#c                   t         j                  j                  |      r1t        j                  |      j                         j                         }t        j                  j                         j                         }t        t        j                  j                  |      |      }|j                  d      r(t        |j                  dd            }t        |d      } nt!        ||      }d}||| |fS )Nr)  zfile:///r  rbT)ospathexistsr+  r,  r/  r.  r-  r   rdflibutil_iri2urir]   r   r\   openr$   )r0  r  r9  r:  r*  rF  filenamer   s           r-   rB  rB    s     
ww~~h<<)224;;=<<$$&Dv{{33H=DI##J/ 1 9 9*c JKHd#%&7@J j$<<r0   )NNNNNN)r2   zMOptional[Union[IO[bytes], TextIO, InputSource, str, bytes, pathlib.PurePath]]rD  r   r:  r   r0  !Optional[Union[BinaryIO, TextIO]]r   z!Optional[Union[str, bytes, dict]]r  r   r5   r"   )
r0  rR  r  r   r9  zOptional[InputSource]r:  rf   r5   zMTuple[URIRef, bool, Optional[Union[BinaryIO, TextIO]], Optional[InputSource]])=r   
__future__r   rY   rJ  r+  r?  ior   r   r   r   r   r	   typingr
   r   r   r   r   r   r   r   r   r   urllib.parser   urllib.requestr   r   xml.saxr   rdflib.utilrM  r   rdflib._networkingr   rdflib.namespacer   rdflib.termr   email.messager   r   urllib.responser   typing_extensionsr   rdflib.graphr    __all__r!   r<   r"   r&   r#   r   r$   r%   rG  rB  r(   r0   r-   <module>rb     sx  
 #  	  
 V V   ! 0    ' & %!*(" ZF^ ZFz
)'' 2$ $N0 08 Lc[ cL k  L 	"".2.2 uu 	u
 u ,u ,u u up=
+== (= 	=
 S=r0   