Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Classes | Functions | Variables
pip._vendor.urllib3.packages.six Namespace Reference

Classes

class  _LazyDescr
 
class  _LazyModule
 
class  _MovedItems
 
class  _SixMetaPathImporter
 
class  Iterator
 
class  Module_six_moves_urllib
 
class  Module_six_moves_urllib_error
 
class  Module_six_moves_urllib_parse
 
class  Module_six_moves_urllib_request
 
class  Module_six_moves_urllib_response
 
class  Module_six_moves_urllib_robotparser
 
class  MovedAttribute
 
class  MovedModule
 
class  X
 

Functions

 _add_doc (func, doc)
 
 _import_module (name)
 
 add_move (move)
 
 remove_move (name)
 
 advance_iterator (it)
 
 callable (obj)
 
 get_unbound_function (unbound)
 
 create_unbound_method (func, cls)
 
 create_bound_method (func, obj)
 
 iterkeys (d, **kw)
 
 itervalues (d, **kw)
 
 iteritems (d, **kw)
 
 iterlists (d, **kw)
 
 b (s)
 
 u (s)
 
 byte2int (bs)
 
 indexbytes (buf, i)
 
 assertCountEqual (self, *args, **kwargs)
 
 assertRaisesRegex (self, *args, **kwargs)
 
 assertRegex (self, *args, **kwargs)
 
 assertNotRegex (self, *args, **kwargs)
 
 reraise (tp, value, tb=None)
 
 exec_ (_code_, _globs_=None, _locs_=None)
 
 raise_from (value, from_value)
 
 print_ (*args, **kwargs)
 
 _update_wrapper (wrapper, wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES)
 
 wraps (wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES)
 
 with_metaclass (meta, *bases)
 
 add_metaclass (metaclass)
 
 ensure_binary (s, encoding="utf-8", errors="strict")
 
 ensure_str (s, encoding="utf-8", errors="strict")
 
 ensure_text (s, encoding="utf-8", errors="strict")
 
 python_2_unicode_compatible (klass)
 

Variables

int PY2 = 2
 
int PY3 = 3
 
tuple PY34 = (3, 4)
 
tuple string_types = (str,)
 
tuple integer_types = (int,)
 
tuple class_types = (type,)
 
 text_type = str
 
 binary_type = bytes
 
 MAXSIZE = sys.maxsize
 
 spec_from_loader = None
 
 _importer = _SixMetaPathImporter(__name__)
 
list _moved_attributes
 
 moves = _MovedItems(__name__ + ".moves")
 
list _urllib_parse_moved_attributes
 
list _urllib_error_moved_attributes
 
list _urllib_request_moved_attributes
 
list _urllib_response_moved_attributes
 
list _urllib_robotparser_moved_attributes
 
str _meth_func = "__func__"
 
str _meth_self = "__self__"
 
str _func_closure = "__closure__"
 
str _func_code = "__code__"
 
str _func_defaults = "__defaults__"
 
str _func_globals = "__globals__"
 
 advance_iterator = next
 
 next = advance_iterator
 
 callable = callable
 
 create_bound_method = types.MethodType
 
 Iterator = object
 
 get_method_function = operator.attrgetter(_meth_func)
 
 get_method_self = operator.attrgetter(_meth_self)
 
 get_function_closure = operator.attrgetter(_func_closure)
 
 get_function_code = operator.attrgetter(_func_code)
 
 get_function_defaults = operator.attrgetter(_func_defaults)
 
 get_function_globals = operator.attrgetter(_func_globals)
 
 viewkeys = operator.methodcaller("keys")
 
 viewvalues = operator.methodcaller("values")
 
 viewitems = operator.methodcaller("items")
 
 unichr = chr
 
 int2byte = struct.Struct(">B").pack
 
 byte2int = operator.itemgetter(0)
 
 indexbytes = operator.getitem
 
 iterbytes = iter
 
 StringIO = io.StringIO
 
 BytesIO = io.BytesIO
 
str _assertCountEqual = "assertCountEqual"
 
str _assertRaisesRegex = "assertRaisesRegexp"
 
str _assertRegex = "assertRegexpMatches"
 
str _assertNotRegex = "assertNotRegexpMatches"
 
 exec_ = getattr(moves.builtins, "exec")
 
 print_ = getattr(moves.builtins, "print", None)
 
 _print = print_
 
 wraps = functools.wraps
 
 submodule_search_locations
 

Detailed Description

Utilities for writing code that runs on Python 2 and 3

Function Documentation

◆ _add_doc()

pip._vendor.urllib3.packages.six._add_doc (   func,
  doc 
)
protected
Add documentation to a function.

◆ _import_module()

pip._vendor.urllib3.packages.six._import_module (   name)
protected
Import module, returning the module after the last dot.

◆ add_metaclass()

pip._vendor.urllib3.packages.six.add_metaclass (   metaclass)
Class decorator for creating a class with a metaclass.

◆ add_move()

pip._vendor.urllib3.packages.six.add_move (   move)
Add an item to six.moves.

◆ ensure_binary()

pip._vendor.urllib3.packages.six.ensure_binary (   s,
  encoding = "utf-8",
  errors = "strict" 
)
Coerce **s** to six.binary_type.

For Python 2:
  - `unicode` -> encoded to `str`
  - `str` -> `str`

For Python 3:
  - `str` -> encoded to `bytes`
  - `bytes` -> `bytes`

◆ ensure_str()

pip._vendor.urllib3.packages.six.ensure_str (   s,
  encoding = "utf-8",
  errors = "strict" 
)
Coerce *s* to `str`.

For Python 2:
  - `unicode` -> encoded to `str`
  - `str` -> `str`

For Python 3:
  - `str` -> `str`
  - `bytes` -> decoded to `str`

◆ ensure_text()

pip._vendor.urllib3.packages.six.ensure_text (   s,
  encoding = "utf-8",
  errors = "strict" 
)
Coerce *s* to six.text_type.

For Python 2:
  - `unicode` -> `unicode`
  - `str` -> `unicode`

For Python 3:
  - `str` -> `str`
  - `bytes` -> decoded to `str`

◆ exec_()

pip._vendor.urllib3.packages.six.exec_ (   _code_,
  _globs_ = None,
  _locs_ = None 
)
Execute code in a namespace.

◆ print_()

pip._vendor.urllib3.packages.six.print_ ( args,
**  kwargs 
)
The new-style print function for Python 2.4 and 2.5.

◆ python_2_unicode_compatible()

pip._vendor.urllib3.packages.six.python_2_unicode_compatible (   klass)
A class decorator that defines __unicode__ and __str__ methods under Python 2.
Under Python 3 it does nothing.

To support Python 2 and 3 with a single code base, define a __str__ method
returning text and apply this decorator to the class.

◆ remove_move()

pip._vendor.urllib3.packages.six.remove_move (   name)
Remove item from six.moves.

◆ with_metaclass()

pip._vendor.urllib3.packages.six.with_metaclass (   meta,
bases 
)
Create a base class with a metaclass.

Variable Documentation

◆ _urllib_error_moved_attributes

list pip._vendor.urllib3.packages.six._urllib_error_moved_attributes
protected
Initial value:
1= [
2 MovedAttribute("URLError", "urllib2", "urllib.error"),
3 MovedAttribute("HTTPError", "urllib2", "urllib.error"),
4 MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
5]

◆ _urllib_parse_moved_attributes

list pip._vendor.urllib3.packages.six._urllib_parse_moved_attributes
protected
Initial value:
1= [
2 MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
3 MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
4 MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
5 MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
6 MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
7 MovedAttribute("urljoin", "urlparse", "urllib.parse"),
8 MovedAttribute("urlparse", "urlparse", "urllib.parse"),
9 MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
10 MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
11 MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
12 MovedAttribute("quote", "urllib", "urllib.parse"),
13 MovedAttribute("quote_plus", "urllib", "urllib.parse"),
14 MovedAttribute("unquote", "urllib", "urllib.parse"),
15 MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
16 MovedAttribute(
17 "unquote_to_bytes", "urllib", "urllib.parse", "unquote", "unquote_to_bytes"
18 ),
19 MovedAttribute("urlencode", "urllib", "urllib.parse"),
20 MovedAttribute("splitquery", "urllib", "urllib.parse"),
21 MovedAttribute("splittag", "urllib", "urllib.parse"),
22 MovedAttribute("splituser", "urllib", "urllib.parse"),
23 MovedAttribute("splitvalue", "urllib", "urllib.parse"),
24 MovedAttribute("uses_fragment", "urlparse", "urllib.parse"),
25 MovedAttribute("uses_netloc", "urlparse", "urllib.parse"),
26 MovedAttribute("uses_params", "urlparse", "urllib.parse"),
27 MovedAttribute("uses_query", "urlparse", "urllib.parse"),
28 MovedAttribute("uses_relative", "urlparse", "urllib.parse"),
29]

◆ _urllib_response_moved_attributes

list pip._vendor.urllib3.packages.six._urllib_response_moved_attributes
protected
Initial value:
1= [
2 MovedAttribute("addbase", "urllib", "urllib.response"),
3 MovedAttribute("addclosehook", "urllib", "urllib.response"),
4 MovedAttribute("addinfo", "urllib", "urllib.response"),
5 MovedAttribute("addinfourl", "urllib", "urllib.response"),
6]

◆ _urllib_robotparser_moved_attributes

list pip._vendor.urllib3.packages.six._urllib_robotparser_moved_attributes
protected
Initial value:
1= [
2 MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
3]