six
Utilities for writing code that runs on Python 2 and 3
Module_six_moves_urllib
Bases: ModuleType
Create a six.moves.urllib namespace that resembles the Python 3 namespace
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
524 525 526 527 528 529 530 531 532 533 534 535 536 |
|
Module_six_moves_urllib_error
Bases: _LazyModule
Lazy loading of moved objects in six.moves.urllib_error
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
399 400 401 |
|
Module_six_moves_urllib_parse
Bases: _LazyModule
Lazy loading of moved objects in six.moves.urllib_parse
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
352 353 354 |
|
Module_six_moves_urllib_request
Bases: _LazyModule
Lazy loading of moved objects in six.moves.urllib_request
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
422 423 424 |
|
Module_six_moves_urllib_response
Bases: _LazyModule
Lazy loading of moved objects in six.moves.urllib_response
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
477 478 479 |
|
Module_six_moves_urllib_robotparser
Bases: _LazyModule
Lazy loading of moved objects in six.moves.urllib_robotparser
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
501 502 503 |
|
add_metaclass(metaclass)
Class decorator for creating a class with a metaclass.
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
|
add_move(move)
Add an item to six.moves.
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
544 545 546 |
|
ensure_binary(s, encoding='utf-8', errors='strict')
Coerce s to six.binary_type.
For Python 2
unicode
-> encoded tostr
str
->str
For Python 3
str
-> encoded tobytes
bytes
->bytes
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 |
|
ensure_str(s, encoding='utf-8', errors='strict')
Coerce s to str
.
For Python 2
unicode
-> encoded tostr
str
->str
For Python 3
str
->str
bytes
-> decoded tostr
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
|
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 tostr
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 |
|
exec_(_code_, _globs_=None, _locs_=None)
Execute code in a namespace.
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
778 779 780 781 782 783 784 785 786 787 788 |
|
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.
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 |
|
remove_move(name)
Remove item from six.moves.
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
549 550 551 552 553 554 555 556 557 |
|
with_metaclass(meta, *bases)
Create a base class with a metaclass.
Source code in client/ayon_fusion/vendor/urllib3/packages/six.py
930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 |
|