├── README.md ├── globalData.py ├── libnative-lib.so_0x7eae047000_0x38000.so ├── main.py └── venv ├── bin ├── activate ├── activate.csh ├── activate.fish ├── easy_install ├── easy_install-3.7 ├── pip ├── pip3 ├── pip3.7 ├── python └── python3 ├── lib └── python3.7 │ └── site-packages │ ├── _distutils_hack │ ├── __init__.py │ └── override.py │ ├── capstone-4.0.2-py3.7.egg-info │ ├── PKG-INFO │ ├── SOURCES.txt │ ├── dependency_links.txt │ ├── installed-files.txt │ ├── top_level.txt │ └── zip-safe │ ├── capstone │ ├── __init__.py │ ├── arm.py │ ├── arm64.py │ ├── arm64_const.py │ ├── arm_const.py │ ├── evm.py │ ├── evm_const.py │ ├── include │ │ └── capstone │ │ │ ├── arm.h │ │ │ ├── arm64.h │ │ │ ├── capstone.h │ │ │ ├── evm.h │ │ │ ├── m680x.h │ │ │ ├── m68k.h │ │ │ ├── mips.h │ │ │ ├── platform.h │ │ │ ├── ppc.h │ │ │ ├── sparc.h │ │ │ ├── systemz.h │ │ │ ├── tms320c64x.h │ │ │ ├── x86.h │ │ │ └── xcore.h │ ├── lib │ │ ├── libcapstone.a │ │ └── libcapstone.dylib │ ├── m680x.py │ ├── m680x_const.py │ ├── m68k.py │ ├── m68k_const.py │ ├── mips.py │ ├── mips_const.py │ ├── ppc.py │ ├── ppc_const.py │ ├── sparc.py │ ├── sparc_const.py │ ├── systemz.py │ ├── sysz_const.py │ ├── tms320c64x.py │ ├── tms320c64x_const.py │ ├── x86.py │ ├── x86_const.py │ ├── xcore.py │ └── xcore_const.py │ ├── distutils-precedence.pth │ ├── easy_install.py │ ├── pip-20.2.3.dist-info │ ├── INSTALLER │ ├── LICENSE.txt │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ ├── entry_points.txt │ └── top_level.txt │ ├── pip │ ├── __init__.py │ ├── __main__.py │ ├── _internal │ │ ├── __init__.py │ │ ├── build_env.py │ │ ├── cache.py │ │ ├── cli │ │ │ ├── __init__.py │ │ │ ├── autocompletion.py │ │ │ ├── base_command.py │ │ │ ├── cmdoptions.py │ │ │ ├── command_context.py │ │ │ ├── main.py │ │ │ ├── main_parser.py │ │ │ ├── parser.py │ │ │ ├── progress_bars.py │ │ │ ├── req_command.py │ │ │ ├── spinners.py │ │ │ └── status_codes.py │ │ ├── commands │ │ │ ├── __init__.py │ │ │ ├── cache.py │ │ │ ├── check.py │ │ │ ├── completion.py │ │ │ ├── configuration.py │ │ │ ├── debug.py │ │ │ ├── download.py │ │ │ ├── freeze.py │ │ │ ├── hash.py │ │ │ ├── help.py │ │ │ ├── install.py │ │ │ ├── list.py │ │ │ ├── search.py │ │ │ ├── show.py │ │ │ ├── uninstall.py │ │ │ └── wheel.py │ │ ├── configuration.py │ │ ├── distributions │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── installed.py │ │ │ ├── sdist.py │ │ │ └── wheel.py │ │ ├── exceptions.py │ │ ├── index │ │ │ ├── __init__.py │ │ │ ├── collector.py │ │ │ └── package_finder.py │ │ ├── locations.py │ │ ├── main.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── candidate.py │ │ │ ├── direct_url.py │ │ │ ├── format_control.py │ │ │ ├── index.py │ │ │ ├── link.py │ │ │ ├── scheme.py │ │ │ ├── search_scope.py │ │ │ ├── selection_prefs.py │ │ │ ├── target_python.py │ │ │ └── wheel.py │ │ ├── network │ │ │ ├── __init__.py │ │ │ ├── auth.py │ │ │ ├── cache.py │ │ │ ├── download.py │ │ │ ├── lazy_wheel.py │ │ │ ├── session.py │ │ │ ├── utils.py │ │ │ └── xmlrpc.py │ │ ├── operations │ │ │ ├── __init__.py │ │ │ ├── build │ │ │ │ ├── __init__.py │ │ │ │ ├── metadata.py │ │ │ │ ├── metadata_legacy.py │ │ │ │ ├── wheel.py │ │ │ │ └── wheel_legacy.py │ │ │ ├── check.py │ │ │ ├── freeze.py │ │ │ ├── install │ │ │ │ ├── __init__.py │ │ │ │ ├── editable_legacy.py │ │ │ │ ├── legacy.py │ │ │ │ └── wheel.py │ │ │ └── prepare.py │ │ ├── pyproject.py │ │ ├── req │ │ │ ├── __init__.py │ │ │ ├── constructors.py │ │ │ ├── req_file.py │ │ │ ├── req_install.py │ │ │ ├── req_set.py │ │ │ ├── req_tracker.py │ │ │ └── req_uninstall.py │ │ ├── resolution │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── legacy │ │ │ │ ├── __init__.py │ │ │ │ └── resolver.py │ │ │ └── resolvelib │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── candidates.py │ │ │ │ ├── factory.py │ │ │ │ ├── provider.py │ │ │ │ ├── requirements.py │ │ │ │ └── resolver.py │ │ ├── self_outdated_check.py │ │ ├── utils │ │ │ ├── __init__.py │ │ │ ├── appdirs.py │ │ │ ├── compat.py │ │ │ ├── compatibility_tags.py │ │ │ ├── datetime.py │ │ │ ├── deprecation.py │ │ │ ├── direct_url_helpers.py │ │ │ ├── distutils_args.py │ │ │ ├── encoding.py │ │ │ ├── entrypoints.py │ │ │ ├── filesystem.py │ │ │ ├── filetypes.py │ │ │ ├── glibc.py │ │ │ ├── hashes.py │ │ │ ├── inject_securetransport.py │ │ │ ├── logging.py │ │ │ ├── misc.py │ │ │ ├── models.py │ │ │ ├── packaging.py │ │ │ ├── parallel.py │ │ │ ├── pkg_resources.py │ │ │ ├── setuptools_build.py │ │ │ ├── subprocess.py │ │ │ ├── temp_dir.py │ │ │ ├── typing.py │ │ │ ├── unpacking.py │ │ │ ├── urls.py │ │ │ ├── virtualenv.py │ │ │ └── wheel.py │ │ ├── vcs │ │ │ ├── __init__.py │ │ │ ├── bazaar.py │ │ │ ├── git.py │ │ │ ├── mercurial.py │ │ │ ├── subversion.py │ │ │ └── versioncontrol.py │ │ └── wheel_builder.py │ └── _vendor │ │ ├── __init__.py │ │ ├── appdirs.py │ │ ├── cachecontrol │ │ ├── __init__.py │ │ ├── _cmd.py │ │ ├── adapter.py │ │ ├── cache.py │ │ ├── caches │ │ │ ├── __init__.py │ │ │ ├── file_cache.py │ │ │ └── redis_cache.py │ │ ├── compat.py │ │ ├── controller.py │ │ ├── filewrapper.py │ │ ├── heuristics.py │ │ ├── serialize.py │ │ └── wrapper.py │ │ ├── certifi │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── cacert.pem │ │ └── core.py │ │ ├── chardet │ │ ├── __init__.py │ │ ├── big5freq.py │ │ ├── big5prober.py │ │ ├── chardistribution.py │ │ ├── charsetgroupprober.py │ │ ├── charsetprober.py │ │ ├── cli │ │ │ ├── __init__.py │ │ │ └── chardetect.py │ │ ├── codingstatemachine.py │ │ ├── compat.py │ │ ├── cp949prober.py │ │ ├── enums.py │ │ ├── escprober.py │ │ ├── escsm.py │ │ ├── eucjpprober.py │ │ ├── euckrfreq.py │ │ ├── euckrprober.py │ │ ├── euctwfreq.py │ │ ├── euctwprober.py │ │ ├── gb2312freq.py │ │ ├── gb2312prober.py │ │ ├── hebrewprober.py │ │ ├── jisfreq.py │ │ ├── jpcntx.py │ │ ├── langbulgarianmodel.py │ │ ├── langcyrillicmodel.py │ │ ├── langgreekmodel.py │ │ ├── langhebrewmodel.py │ │ ├── langhungarianmodel.py │ │ ├── langthaimodel.py │ │ ├── langturkishmodel.py │ │ ├── latin1prober.py │ │ ├── mbcharsetprober.py │ │ ├── mbcsgroupprober.py │ │ ├── mbcssm.py │ │ ├── sbcharsetprober.py │ │ ├── sbcsgroupprober.py │ │ ├── sjisprober.py │ │ ├── universaldetector.py │ │ ├── utf8prober.py │ │ └── version.py │ │ ├── colorama │ │ ├── __init__.py │ │ ├── ansi.py │ │ ├── ansitowin32.py │ │ ├── initialise.py │ │ ├── win32.py │ │ └── winterm.py │ │ ├── contextlib2.py │ │ ├── distlib │ │ ├── __init__.py │ │ ├── _backport │ │ │ ├── __init__.py │ │ │ ├── misc.py │ │ │ ├── shutil.py │ │ │ ├── sysconfig.cfg │ │ │ ├── sysconfig.py │ │ │ └── tarfile.py │ │ ├── compat.py │ │ ├── database.py │ │ ├── index.py │ │ ├── locators.py │ │ ├── manifest.py │ │ ├── markers.py │ │ ├── metadata.py │ │ ├── resources.py │ │ ├── scripts.py │ │ ├── t32.exe │ │ ├── t64.exe │ │ ├── util.py │ │ ├── version.py │ │ ├── w32.exe │ │ ├── w64.exe │ │ └── wheel.py │ │ ├── distro.py │ │ ├── html5lib │ │ ├── __init__.py │ │ ├── _ihatexml.py │ │ ├── _inputstream.py │ │ ├── _tokenizer.py │ │ ├── _trie │ │ │ ├── __init__.py │ │ │ ├── _base.py │ │ │ └── py.py │ │ ├── _utils.py │ │ ├── constants.py │ │ ├── filters │ │ │ ├── __init__.py │ │ │ ├── alphabeticalattributes.py │ │ │ ├── base.py │ │ │ ├── inject_meta_charset.py │ │ │ ├── lint.py │ │ │ ├── optionaltags.py │ │ │ ├── sanitizer.py │ │ │ └── whitespace.py │ │ ├── html5parser.py │ │ ├── serializer.py │ │ ├── treeadapters │ │ │ ├── __init__.py │ │ │ ├── genshi.py │ │ │ └── sax.py │ │ ├── treebuilders │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── dom.py │ │ │ ├── etree.py │ │ │ └── etree_lxml.py │ │ └── treewalkers │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── dom.py │ │ │ ├── etree.py │ │ │ ├── etree_lxml.py │ │ │ └── genshi.py │ │ ├── idna │ │ ├── __init__.py │ │ ├── codec.py │ │ ├── compat.py │ │ ├── core.py │ │ ├── idnadata.py │ │ ├── intranges.py │ │ ├── package_data.py │ │ └── uts46data.py │ │ ├── ipaddress.py │ │ ├── msgpack │ │ ├── __init__.py │ │ ├── _version.py │ │ ├── exceptions.py │ │ ├── ext.py │ │ └── fallback.py │ │ ├── packaging │ │ ├── __about__.py │ │ ├── __init__.py │ │ ├── _compat.py │ │ ├── _structures.py │ │ ├── _typing.py │ │ ├── markers.py │ │ ├── requirements.py │ │ ├── specifiers.py │ │ ├── tags.py │ │ ├── utils.py │ │ └── version.py │ │ ├── pep517 │ │ ├── __init__.py │ │ ├── _in_process.py │ │ ├── build.py │ │ ├── check.py │ │ ├── colorlog.py │ │ ├── compat.py │ │ ├── dirtools.py │ │ ├── envbuild.py │ │ ├── meta.py │ │ └── wrappers.py │ │ ├── pkg_resources │ │ ├── __init__.py │ │ └── py31compat.py │ │ ├── progress │ │ ├── __init__.py │ │ ├── bar.py │ │ ├── counter.py │ │ └── spinner.py │ │ ├── pyparsing.py │ │ ├── requests │ │ ├── __init__.py │ │ ├── __version__.py │ │ ├── _internal_utils.py │ │ ├── adapters.py │ │ ├── api.py │ │ ├── auth.py │ │ ├── certs.py │ │ ├── compat.py │ │ ├── cookies.py │ │ ├── exceptions.py │ │ ├── help.py │ │ ├── hooks.py │ │ ├── models.py │ │ ├── packages.py │ │ ├── sessions.py │ │ ├── status_codes.py │ │ ├── structures.py │ │ └── utils.py │ │ ├── resolvelib │ │ ├── __init__.py │ │ ├── compat │ │ │ ├── __init__.py │ │ │ └── collections_abc.py │ │ ├── providers.py │ │ ├── reporters.py │ │ ├── resolvers.py │ │ └── structs.py │ │ ├── retrying.py │ │ ├── six.py │ │ ├── toml │ │ ├── __init__.py │ │ ├── common.py │ │ ├── decoder.py │ │ ├── encoder.py │ │ ├── ordered.py │ │ └── tz.py │ │ ├── urllib3 │ │ ├── __init__.py │ │ ├── _collections.py │ │ ├── connection.py │ │ ├── connectionpool.py │ │ ├── contrib │ │ │ ├── __init__.py │ │ │ ├── _appengine_environ.py │ │ │ ├── _securetransport │ │ │ │ ├── __init__.py │ │ │ │ ├── bindings.py │ │ │ │ └── low_level.py │ │ │ ├── appengine.py │ │ │ ├── ntlmpool.py │ │ │ ├── pyopenssl.py │ │ │ ├── securetransport.py │ │ │ └── socks.py │ │ ├── exceptions.py │ │ ├── fields.py │ │ ├── filepost.py │ │ ├── packages │ │ │ ├── __init__.py │ │ │ ├── backports │ │ │ │ ├── __init__.py │ │ │ │ └── makefile.py │ │ │ ├── six.py │ │ │ └── ssl_match_hostname │ │ │ │ ├── __init__.py │ │ │ │ └── _implementation.py │ │ ├── poolmanager.py │ │ ├── request.py │ │ ├── response.py │ │ └── util │ │ │ ├── __init__.py │ │ │ ├── connection.py │ │ │ ├── queue.py │ │ │ ├── request.py │ │ │ ├── response.py │ │ │ ├── retry.py │ │ │ ├── ssl_.py │ │ │ ├── timeout.py │ │ │ ├── url.py │ │ │ └── wait.py │ │ ├── vendor.txt │ │ └── webencodings │ │ ├── __init__.py │ │ ├── labels.py │ │ ├── mklabels.py │ │ ├── tests.py │ │ └── x_user_defined.py │ ├── pkg_resources │ ├── __init__.py │ ├── _vendor │ │ ├── __init__.py │ │ ├── appdirs.py │ │ ├── packaging │ │ │ ├── __about__.py │ │ │ ├── __init__.py │ │ │ ├── _compat.py │ │ │ ├── _structures.py │ │ │ ├── _typing.py │ │ │ ├── markers.py │ │ │ ├── requirements.py │ │ │ ├── specifiers.py │ │ │ ├── tags.py │ │ │ ├── utils.py │ │ │ └── version.py │ │ └── pyparsing.py │ └── extern │ │ └── __init__.py │ ├── setuptools-50.3.0.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ ├── dependency_links.txt │ ├── entry_points.txt │ ├── top_level.txt │ └── zip-safe │ ├── setuptools │ ├── __init__.py │ ├── _deprecation_warning.py │ ├── _distutils │ │ ├── __init__.py │ │ ├── _msvccompiler.py │ │ ├── archive_util.py │ │ ├── bcppcompiler.py │ │ ├── ccompiler.py │ │ ├── cmd.py │ │ ├── command │ │ │ ├── __init__.py │ │ │ ├── bdist.py │ │ │ ├── bdist_dumb.py │ │ │ ├── bdist_msi.py │ │ │ ├── bdist_rpm.py │ │ │ ├── bdist_wininst.py │ │ │ ├── build.py │ │ │ ├── build_clib.py │ │ │ ├── build_ext.py │ │ │ ├── build_py.py │ │ │ ├── build_scripts.py │ │ │ ├── check.py │ │ │ ├── clean.py │ │ │ ├── config.py │ │ │ ├── install.py │ │ │ ├── install_data.py │ │ │ ├── install_egg_info.py │ │ │ ├── install_headers.py │ │ │ ├── install_lib.py │ │ │ ├── install_scripts.py │ │ │ ├── py37compat.py │ │ │ ├── register.py │ │ │ ├── sdist.py │ │ │ └── upload.py │ │ ├── config.py │ │ ├── core.py │ │ ├── cygwinccompiler.py │ │ ├── debug.py │ │ ├── dep_util.py │ │ ├── dir_util.py │ │ ├── dist.py │ │ ├── errors.py │ │ ├── extension.py │ │ ├── fancy_getopt.py │ │ ├── file_util.py │ │ ├── filelist.py │ │ ├── log.py │ │ ├── msvc9compiler.py │ │ ├── msvccompiler.py │ │ ├── py35compat.py │ │ ├── py38compat.py │ │ ├── spawn.py │ │ ├── sysconfig.py │ │ ├── text_file.py │ │ ├── unixccompiler.py │ │ ├── util.py │ │ ├── version.py │ │ └── versionpredicate.py │ ├── _imp.py │ ├── _vendor │ │ ├── __init__.py │ │ ├── ordered_set.py │ │ ├── packaging │ │ │ ├── __about__.py │ │ │ ├── __init__.py │ │ │ ├── _compat.py │ │ │ ├── _structures.py │ │ │ ├── _typing.py │ │ │ ├── markers.py │ │ │ ├── requirements.py │ │ │ ├── specifiers.py │ │ │ ├── tags.py │ │ │ ├── utils.py │ │ │ └── version.py │ │ └── pyparsing.py │ ├── archive_util.py │ ├── build_meta.py │ ├── cli-32.exe │ ├── cli-64.exe │ ├── cli.exe │ ├── command │ │ ├── __init__.py │ │ ├── alias.py │ │ ├── bdist_egg.py │ │ ├── bdist_rpm.py │ │ ├── bdist_wininst.py │ │ ├── build_clib.py │ │ ├── build_ext.py │ │ ├── build_py.py │ │ ├── develop.py │ │ ├── dist_info.py │ │ ├── easy_install.py │ │ ├── egg_info.py │ │ ├── install.py │ │ ├── install_egg_info.py │ │ ├── install_lib.py │ │ ├── install_scripts.py │ │ ├── launcher manifest.xml │ │ ├── py36compat.py │ │ ├── register.py │ │ ├── rotate.py │ │ ├── saveopts.py │ │ ├── sdist.py │ │ ├── setopt.py │ │ ├── test.py │ │ ├── upload.py │ │ └── upload_docs.py │ ├── config.py │ ├── dep_util.py │ ├── depends.py │ ├── dist.py │ ├── errors.py │ ├── extension.py │ ├── extern │ │ └── __init__.py │ ├── glob.py │ ├── gui-32.exe │ ├── gui-64.exe │ ├── gui.exe │ ├── installer.py │ ├── launch.py │ ├── lib2to3_ex.py │ ├── monkey.py │ ├── msvc.py │ ├── namespaces.py │ ├── package_index.py │ ├── py34compat.py │ ├── sandbox.py │ ├── script (dev).tmpl │ ├── script.tmpl │ ├── ssl_support.py │ ├── unicode_utils.py │ ├── version.py │ ├── wheel.py │ └── windows_support.py │ ├── unicorn-1.0.2rc6.dist-info │ ├── INSTALLER │ ├── METADATA │ ├── RECORD │ ├── REQUESTED │ ├── WHEEL │ └── top_level.txt │ └── unicorn │ ├── __init__.py │ ├── arm64_const.py │ ├── arm_const.py │ ├── include │ └── unicorn │ │ ├── arm.h │ │ ├── arm64.h │ │ ├── m68k.h │ │ ├── mips.h │ │ ├── platform.h │ │ ├── sparc.h │ │ ├── unicorn.h │ │ └── x86.h │ ├── lib │ ├── libunicorn.1.dylib │ └── libunicorn.dylib │ ├── m68k_const.py │ ├── mips_const.py │ ├── sparc_const.py │ ├── unicorn.py │ ├── unicorn_const.py │ └── x86_const.py └── pyvenv.cfg /README.md: -------------------------------------------------------------------------------- 1 | # unicornDemo 2 | unicorn demo 3 | -------------------------------------------------------------------------------- /globalData.py: -------------------------------------------------------------------------------- 1 | #上一次汇编指令 2 | global pre_codestr 3 | #上一次汇编的第一个寄存器名称 4 | global pre_regname 5 | #是否有记录上一次的数据 6 | global has_pre 7 | #监控的地址 8 | global watch_addrs -------------------------------------------------------------------------------- /libnative-lib.so_0x7eae047000_0x38000.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/libnative-lib.so_0x7eae047000_0x38000.so -------------------------------------------------------------------------------- /venv/bin/activate.csh: -------------------------------------------------------------------------------- 1 | # This file must be used with "source bin/activate.csh" *from csh*. 2 | # You cannot run it directly. 3 | # Created by Davide Di Blasi . 4 | # Ported to Python 3.3 venv by Andrew Svetlov 5 | 6 | alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; test "\!:*" != "nondestructive" && unalias deactivate' 7 | 8 | # Unset irrelevant variables. 9 | deactivate nondestructive 10 | 11 | setenv VIRTUAL_ENV "/Volumes/mac_disk/src/python_project/unicronDemo1/venv" 12 | 13 | set _OLD_VIRTUAL_PATH="$PATH" 14 | setenv PATH "$VIRTUAL_ENV/bin:$PATH" 15 | 16 | 17 | set _OLD_VIRTUAL_PROMPT="$prompt" 18 | 19 | if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then 20 | if ("venv" != "") then 21 | set env_name = "venv" 22 | else 23 | if (`basename "VIRTUAL_ENV"` == "__") then 24 | # special case for Aspen magic directories 25 | # see http://www.zetadev.com/software/aspen/ 26 | set env_name = `basename \`dirname "$VIRTUAL_ENV"\`` 27 | else 28 | set env_name = `basename "$VIRTUAL_ENV"` 29 | endif 30 | endif 31 | set prompt = "[$env_name] $prompt" 32 | unset env_name 33 | endif 34 | 35 | alias pydoc python -m pydoc 36 | 37 | rehash 38 | -------------------------------------------------------------------------------- /venv/bin/easy_install: -------------------------------------------------------------------------------- 1 | #!/Volumes/mac_disk/src/python_project/unicronDemo1/venv/bin/python 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from setuptools.command.easy_install import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /venv/bin/easy_install-3.7: -------------------------------------------------------------------------------- 1 | #!/Volumes/mac_disk/src/python_project/unicronDemo1/venv/bin/python 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from setuptools.command.easy_install import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /venv/bin/pip: -------------------------------------------------------------------------------- 1 | #!/Volumes/mac_disk/src/python_project/unicronDemo1/venv/bin/python 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from pip._internal.cli.main import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /venv/bin/pip3: -------------------------------------------------------------------------------- 1 | #!/Volumes/mac_disk/src/python_project/unicronDemo1/venv/bin/python 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from pip._internal.cli.main import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /venv/bin/pip3.7: -------------------------------------------------------------------------------- 1 | #!/Volumes/mac_disk/src/python_project/unicronDemo1/venv/bin/python 2 | # -*- coding: utf-8 -*- 3 | import re 4 | import sys 5 | from pip._internal.cli.main import main 6 | if __name__ == '__main__': 7 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /venv/bin/python: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/bin/python -------------------------------------------------------------------------------- /venv/bin/python3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/bin/python3 -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/_distutils_hack/override.py: -------------------------------------------------------------------------------- 1 | __import__('_distutils_hack').do_override() 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone-4.0.2-py3.7.egg-info/PKG-INFO: -------------------------------------------------------------------------------- 1 | Metadata-Version: 1.2 2 | Name: capstone 3 | Version: 4.0.2 4 | Summary: Capstone disassembly engine 5 | Home-page: http://www.capstone-engine.org 6 | Author: Nguyen Anh Quynh 7 | Author-email: aquynh@gmail.com 8 | License: UNKNOWN 9 | Description: UNKNOWN 10 | Platform: UNKNOWN 11 | Classifier: License :: OSI Approved :: BSD License 12 | Classifier: Programming Language :: Python :: 2 13 | Classifier: Programming Language :: Python :: 2.7 14 | Classifier: Programming Language :: Python :: 3 15 | Requires: ctypes 16 | Provides: capstone 17 | Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* 18 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone-4.0.2-py3.7.egg-info/SOURCES.txt: -------------------------------------------------------------------------------- 1 | README.txt 2 | setup.py 3 | capstone/__init__.py 4 | capstone/arm.py 5 | capstone/arm64.py 6 | capstone/arm64_const.py 7 | capstone/arm_const.py 8 | capstone/evm.py 9 | capstone/evm_const.py 10 | capstone/m680x.py 11 | capstone/m680x_const.py 12 | capstone/m68k.py 13 | capstone/m68k_const.py 14 | capstone/mips.py 15 | capstone/mips_const.py 16 | capstone/ppc.py 17 | capstone/ppc_const.py 18 | capstone/sparc.py 19 | capstone/sparc_const.py 20 | capstone/systemz.py 21 | capstone/sysz_const.py 22 | capstone/tms320c64x.py 23 | capstone/tms320c64x_const.py 24 | capstone/x86.py 25 | capstone/x86_const.py 26 | capstone/xcore.py 27 | capstone/xcore_const.py 28 | capstone.egg-info/PKG-INFO 29 | capstone.egg-info/SOURCES.txt 30 | capstone.egg-info/dependency_links.txt 31 | capstone.egg-info/top_level.txt 32 | capstone.egg-info/zip-safe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone-4.0.2-py3.7.egg-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone-4.0.2-py3.7.egg-info/top_level.txt: -------------------------------------------------------------------------------- 1 | capstone 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone-4.0.2-py3.7.egg-info/zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/arm.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .arm_const import * 6 | 7 | # define the API 8 | class ArmOpMem(ctypes.Structure): 9 | _fields_ = ( 10 | ('base', ctypes.c_uint), 11 | ('index', ctypes.c_uint), 12 | ('scale', ctypes.c_int), 13 | ('disp', ctypes.c_int), 14 | ('lshift', ctypes.c_int), 15 | ) 16 | 17 | class ArmOpShift(ctypes.Structure): 18 | _fields_ = ( 19 | ('type', ctypes.c_uint), 20 | ('value', ctypes.c_uint), 21 | ) 22 | 23 | class ArmOpValue(ctypes.Union): 24 | _fields_ = ( 25 | ('reg', ctypes.c_uint), 26 | ('imm', ctypes.c_int32), 27 | ('fp', ctypes.c_double), 28 | ('mem', ArmOpMem), 29 | ('setend', ctypes.c_int), 30 | ) 31 | 32 | class ArmOp(ctypes.Structure): 33 | _fields_ = ( 34 | ('vector_index', ctypes.c_int), 35 | ('shift', ArmOpShift), 36 | ('type', ctypes.c_uint), 37 | ('value', ArmOpValue), 38 | ('subtracted', ctypes.c_bool), 39 | ('access', ctypes.c_uint8), 40 | ('neon_lane', ctypes.c_int8), 41 | ) 42 | 43 | @property 44 | def imm(self): 45 | return self.value.imm 46 | 47 | @property 48 | def reg(self): 49 | return self.value.reg 50 | 51 | @property 52 | def fp(self): 53 | return self.value.fp 54 | 55 | @property 56 | def mem(self): 57 | return self.value.mem 58 | 59 | @property 60 | def setend(self): 61 | return self.value.setend 62 | 63 | 64 | class CsArm(ctypes.Structure): 65 | _fields_ = ( 66 | ('usermode', ctypes.c_bool), 67 | ('vector_size', ctypes.c_int), 68 | ('vector_data', ctypes.c_int), 69 | ('cps_mode', ctypes.c_int), 70 | ('cps_flag', ctypes.c_int), 71 | ('cc', ctypes.c_uint), 72 | ('update_flags', ctypes.c_bool), 73 | ('writeback', ctypes.c_bool), 74 | ('mem_barrier', ctypes.c_int), 75 | ('op_count', ctypes.c_uint8), 76 | ('operands', ArmOp * 36), 77 | ) 78 | 79 | def get_arch_info(a): 80 | return (a.usermode, a.vector_size, a.vector_data, a.cps_mode, a.cps_flag, a.cc, a.update_flags, \ 81 | a.writeback, a.mem_barrier, copy_ctypes_list(a.operands[:a.op_count])) 82 | 83 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/evm.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .evm_const import * 6 | 7 | # define the API 8 | class CsEvm(ctypes.Structure): 9 | _fields_ = ( 10 | ('pop', ctypes.c_byte), 11 | ('push', ctypes.c_byte), 12 | ('fee', ctypes.c_uint), 13 | ) 14 | 15 | def get_arch_info(a): 16 | return (a.pop, a.push, a.fee) 17 | 18 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/lib/libcapstone.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/capstone/lib/libcapstone.a -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/lib/libcapstone.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/capstone/lib/libcapstone.dylib -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/m680x.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Wolfgang Schwotzer 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .m680x_const import * 6 | 7 | # define the API 8 | class M680xOpIdx(ctypes.Structure): 9 | _fields_ = ( 10 | ('base_reg', ctypes.c_uint), 11 | ('offset_reg', ctypes.c_uint), 12 | ('offset', ctypes.c_int16), 13 | ('offset_addr', ctypes.c_uint16), 14 | ('offset_bits', ctypes.c_uint8), 15 | ('inc_dec', ctypes.c_int8), 16 | ('flags', ctypes.c_uint8), 17 | ) 18 | 19 | class M680xOpRel(ctypes.Structure): 20 | _fields_ = ( 21 | ('address', ctypes.c_uint16), 22 | ('offset', ctypes.c_int16), 23 | ) 24 | 25 | class M680xOpExt(ctypes.Structure): 26 | _fields_ = ( 27 | ('address', ctypes.c_uint16), 28 | ('indirect', ctypes.c_bool), 29 | ) 30 | 31 | class M680xOpValue(ctypes.Union): 32 | _fields_ = ( 33 | ('imm', ctypes.c_int32), 34 | ('reg', ctypes.c_uint), 35 | ('idx', M680xOpIdx), 36 | ('rel', M680xOpRel), 37 | ('ext', M680xOpExt), 38 | ('direct_addr', ctypes.c_uint8), 39 | ('const_val', ctypes.c_uint8), 40 | ) 41 | 42 | class M680xOp(ctypes.Structure): 43 | _fields_ = ( 44 | ('type', ctypes.c_uint), 45 | ('value', M680xOpValue), 46 | ('size', ctypes.c_uint8), 47 | ('access', ctypes.c_uint8), 48 | ) 49 | 50 | @property 51 | def imm(self): 52 | return self.value.imm 53 | 54 | @property 55 | def reg(self): 56 | return self.value.reg 57 | 58 | @property 59 | def idx(self): 60 | return self.value.idx 61 | 62 | @property 63 | def rel(self): 64 | return self.value.rel 65 | 66 | @property 67 | def ext(self): 68 | return self.value.ext 69 | 70 | @property 71 | def direct_addr(self): 72 | return self.value.direct_addr 73 | 74 | @property 75 | def const_val(self): 76 | return self.value.const_val 77 | 78 | 79 | class CsM680x(ctypes.Structure): 80 | _fields_ = ( 81 | ('flags', ctypes.c_uint8), 82 | ('op_count', ctypes.c_uint8), 83 | ('operands', M680xOp * 9), 84 | ) 85 | 86 | def get_arch_info(a): 87 | return (a.flags, copy_ctypes_list(a.operands[:a.op_count])) 88 | 89 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/mips.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .mips_const import * 6 | 7 | # define the API 8 | class MipsOpMem(ctypes.Structure): 9 | _fields_ = ( 10 | ('base', ctypes.c_uint), 11 | ('disp', ctypes.c_int64), 12 | ) 13 | 14 | class MipsOpValue(ctypes.Union): 15 | _fields_ = ( 16 | ('reg', ctypes.c_uint), 17 | ('imm', ctypes.c_int64), 18 | ('mem', MipsOpMem), 19 | ) 20 | 21 | class MipsOp(ctypes.Structure): 22 | _fields_ = ( 23 | ('type', ctypes.c_uint), 24 | ('value', MipsOpValue), 25 | ) 26 | 27 | @property 28 | def imm(self): 29 | return self.value.imm 30 | 31 | @property 32 | def reg(self): 33 | return self.value.reg 34 | 35 | @property 36 | def mem(self): 37 | return self.value.mem 38 | 39 | 40 | class CsMips(ctypes.Structure): 41 | _fields_ = ( 42 | ('op_count', ctypes.c_uint8), 43 | ('operands', MipsOp * 10), 44 | ) 45 | 46 | def get_arch_info(a): 47 | return copy_ctypes_list(a.operands[:a.op_count]) 48 | 49 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/ppc.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .ppc_const import * 6 | 7 | # define the API 8 | class PpcOpMem(ctypes.Structure): 9 | _fields_ = ( 10 | ('base', ctypes.c_uint), 11 | ('disp', ctypes.c_int32), 12 | ) 13 | 14 | class PpcOpCrx(ctypes.Structure): 15 | _fields_ = ( 16 | ('scale', ctypes.c_uint), 17 | ('reg', ctypes.c_uint), 18 | ('cond', ctypes.c_uint), 19 | ) 20 | 21 | class PpcOpValue(ctypes.Union): 22 | _fields_ = ( 23 | ('reg', ctypes.c_uint), 24 | ('imm', ctypes.c_int64), 25 | ('mem', PpcOpMem), 26 | ('crx', PpcOpCrx), 27 | ) 28 | 29 | class PpcOp(ctypes.Structure): 30 | _fields_ = ( 31 | ('type', ctypes.c_uint), 32 | ('value', PpcOpValue), 33 | ) 34 | 35 | @property 36 | def imm(self): 37 | return self.value.imm 38 | 39 | @property 40 | def reg(self): 41 | return self.value.reg 42 | 43 | @property 44 | def mem(self): 45 | return self.value.mem 46 | 47 | @property 48 | def crx(self): 49 | return self.value.crx 50 | 51 | 52 | class CsPpc(ctypes.Structure): 53 | _fields_ = ( 54 | ('bc', ctypes.c_uint), 55 | ('bh', ctypes.c_uint), 56 | ('update_cr0', ctypes.c_bool), 57 | ('op_count', ctypes.c_uint8), 58 | ('operands', PpcOp * 8), 59 | ) 60 | 61 | def get_arch_info(a): 62 | return (a.bc, a.bh, a.update_cr0, copy_ctypes_list(a.operands[:a.op_count])) 63 | 64 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/sparc.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .sparc_const import * 6 | 7 | # define the API 8 | class SparcOpMem(ctypes.Structure): 9 | _fields_ = ( 10 | ('base', ctypes.c_uint8), 11 | ('index', ctypes.c_uint8), 12 | ('disp', ctypes.c_int32), 13 | ) 14 | 15 | class SparcOpValue(ctypes.Union): 16 | _fields_ = ( 17 | ('reg', ctypes.c_uint), 18 | ('imm', ctypes.c_int64), 19 | ('mem', SparcOpMem), 20 | ) 21 | 22 | class SparcOp(ctypes.Structure): 23 | _fields_ = ( 24 | ('type', ctypes.c_uint), 25 | ('value', SparcOpValue), 26 | ) 27 | 28 | @property 29 | def imm(self): 30 | return self.value.imm 31 | 32 | @property 33 | def reg(self): 34 | return self.value.reg 35 | 36 | @property 37 | def mem(self): 38 | return self.value.mem 39 | 40 | 41 | class CsSparc(ctypes.Structure): 42 | _fields_ = ( 43 | ('cc', ctypes.c_uint), 44 | ('hint', ctypes.c_uint), 45 | ('op_count', ctypes.c_uint8), 46 | ('operands', SparcOp * 4), 47 | ) 48 | 49 | def get_arch_info(a): 50 | return (a.cc, a.hint, copy_ctypes_list(a.operands[:a.op_count])) 51 | 52 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/systemz.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .sysz_const import * 6 | 7 | # define the API 8 | class SyszOpMem(ctypes.Structure): 9 | _fields_ = ( 10 | ('base', ctypes.c_uint8), 11 | ('index', ctypes.c_uint8), 12 | ('length', ctypes.c_uint64), 13 | ('disp', ctypes.c_int64), 14 | ) 15 | 16 | class SyszOpValue(ctypes.Union): 17 | _fields_ = ( 18 | ('reg', ctypes.c_uint), 19 | ('imm', ctypes.c_int64), 20 | ('mem', SyszOpMem), 21 | ) 22 | 23 | class SyszOp(ctypes.Structure): 24 | _fields_ = ( 25 | ('type', ctypes.c_uint), 26 | ('value', SyszOpValue), 27 | ) 28 | 29 | @property 30 | def imm(self): 31 | return self.value.imm 32 | 33 | @property 34 | def reg(self): 35 | return self.value.reg 36 | 37 | @property 38 | def mem(self): 39 | return self.value.mem 40 | 41 | 42 | class CsSysz(ctypes.Structure): 43 | _fields_ = ( 44 | ('cc', ctypes.c_uint), 45 | ('op_count', ctypes.c_uint8), 46 | ('operands', SyszOp * 6), 47 | ) 48 | 49 | def get_arch_info(a): 50 | return (a.cc, copy_ctypes_list(a.operands[:a.op_count])) 51 | 52 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/tms320c64x.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Fotis Loukos 2 | 3 | import ctypes, copy 4 | from .tms320c64x_const import * 5 | 6 | # define the API 7 | class TMS320C64xOpMem(ctypes.Structure): 8 | _fields_ = ( 9 | ('base', ctypes.c_int), 10 | ('disp', ctypes.c_int), 11 | ('unit', ctypes.c_int), 12 | ('scaled', ctypes.c_int), 13 | ('disptype', ctypes.c_int), 14 | ('direction', ctypes.c_int), 15 | ('modify', ctypes.c_int), 16 | ) 17 | 18 | class TMS320C64xOpValue(ctypes.Union): 19 | _fields_ = ( 20 | ('reg', ctypes.c_uint), 21 | ('imm', ctypes.c_int32), 22 | ('mem', TMS320C64xOpMem), 23 | ) 24 | 25 | class TMS320C64xCondition(ctypes.Structure): 26 | _fields_ = ( 27 | ('reg', ctypes.c_uint), 28 | ('zero', ctypes.c_uint), 29 | ) 30 | 31 | class TMS320C64xFunctionalUnit(ctypes.Structure): 32 | _fields_ = ( 33 | ('unit', ctypes.c_uint), 34 | ('side', ctypes.c_uint), 35 | ('crosspath', ctypes.c_uint), 36 | ) 37 | 38 | class TMS320C64xOp(ctypes.Structure): 39 | _fields_ = ( 40 | ('type', ctypes.c_uint), 41 | ('value', TMS320C64xOpValue), 42 | ) 43 | 44 | @property 45 | def imm(self): 46 | return self.value.imm 47 | 48 | @property 49 | def reg(self): 50 | return self.value.reg 51 | 52 | @property 53 | def mem(self): 54 | return self.value.mem 55 | 56 | class CsTMS320C64x(ctypes.Structure): 57 | _fields_ = ( 58 | ('op_count', ctypes.c_uint8), 59 | ('operands', TMS320C64xOp * 8), 60 | ('condition', TMS320C64xCondition), 61 | ('funit', TMS320C64xFunctionalUnit), 62 | ('parallel', ctypes.c_uint), 63 | ) 64 | 65 | def get_arch_info(a): 66 | return (a.condition, a.funit, a.parallel, copy.deepcopy(a.operands[:a.op_count])) 67 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/capstone/xcore.py: -------------------------------------------------------------------------------- 1 | # Capstone Python bindings, by Nguyen Anh Quynnh 2 | 3 | import ctypes 4 | from . import copy_ctypes_list 5 | from .xcore_const import * 6 | 7 | # define the API 8 | class XcoreOpMem(ctypes.Structure): 9 | _fields_ = ( 10 | ('base', ctypes.c_uint8), 11 | ('index', ctypes.c_uint8), 12 | ('disp', ctypes.c_int32), 13 | ('direct', ctypes.c_int), 14 | ) 15 | 16 | class XcoreOpValue(ctypes.Union): 17 | _fields_ = ( 18 | ('reg', ctypes.c_uint), 19 | ('imm', ctypes.c_int32), 20 | ('mem', XcoreOpMem), 21 | ) 22 | 23 | class XcoreOp(ctypes.Structure): 24 | _fields_ = ( 25 | ('type', ctypes.c_uint), 26 | ('value', XcoreOpValue), 27 | ) 28 | 29 | @property 30 | def imm(self): 31 | return self.value.imm 32 | 33 | @property 34 | def reg(self): 35 | return self.value.reg 36 | 37 | @property 38 | def mem(self): 39 | return self.value.mem 40 | 41 | 42 | class CsXcore(ctypes.Structure): 43 | _fields_ = ( 44 | ('op_count', ctypes.c_uint8), 45 | ('operands', XcoreOp * 8), 46 | ) 47 | 48 | def get_arch_info(a): 49 | return (copy_ctypes_list(a.operands[:a.op_count])) 50 | 51 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/distutils-precedence.pth: -------------------------------------------------------------------------------- 1 | import os; var = 'SETUPTOOLS_USE_DISTUTILS'; enabled = os.environ.get(var, 'stdlib') == 'local'; enabled and __import__('_distutils_hack').add_shim(); 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/easy_install.py: -------------------------------------------------------------------------------- 1 | """Run the EasyInstall command""" 2 | 3 | if __name__ == '__main__': 4 | from setuptools.command.easy_install import main 5 | main() 6 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip-20.2.3.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip-20.2.3.dist-info/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2008-2019 The pip developers (see AUTHORS.txt file) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip-20.2.3.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip-20.2.3.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | pip = pip._internal.cli.main:main 3 | pip3 = pip._internal.cli.main:main 4 | pip3.8 = pip._internal.cli.main:main 5 | 6 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip-20.2.3.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/__init__.py: -------------------------------------------------------------------------------- 1 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 2 | 3 | if MYPY_CHECK_RUNNING: 4 | from typing import List, Optional 5 | 6 | 7 | __version__ = "20.2.3" 8 | 9 | 10 | def main(args=None): 11 | # type: (Optional[List[str]]) -> int 12 | """This is an internal API only meant for use by pip's own console scripts. 13 | 14 | For additional details, see https://github.com/pypa/pip/issues/7498. 15 | """ 16 | from pip._internal.utils.entrypoints import _wrapper 17 | 18 | return _wrapper(args) 19 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/__main__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | import os 4 | import sys 5 | 6 | # Remove '' and current working directory from the first entry 7 | # of sys.path, if present to avoid using current directory 8 | # in pip commands check, freeze, install, list and show, 9 | # when invoked as python -m pip 10 | if sys.path[0] in ('', os.getcwd()): 11 | sys.path.pop(0) 12 | 13 | # If we are running from a wheel, add the wheel to sys.path 14 | # This allows the usage python pip-*.whl/pip install pip-*.whl 15 | if __package__ == '': 16 | # __file__ is pip-*.whl/pip/__main__.py 17 | # first dirname call strips of '/__main__.py', second strips off '/pip' 18 | # Resulting path is the name of the wheel itself 19 | # Add that to sys.path so we can import pip 20 | path = os.path.dirname(os.path.dirname(__file__)) 21 | sys.path.insert(0, path) 22 | 23 | from pip._internal.cli.main import main as _main # isort:skip # noqa 24 | 25 | if __name__ == '__main__': 26 | sys.exit(_main()) 27 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/__init__.py: -------------------------------------------------------------------------------- 1 | import pip._internal.utils.inject_securetransport # noqa 2 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 3 | 4 | if MYPY_CHECK_RUNNING: 5 | from typing import Optional, List 6 | 7 | 8 | def main(args=None): 9 | # type: (Optional[List[str]]) -> int 10 | """This is preserved for old console scripts that may still be referencing 11 | it. 12 | 13 | For additional details, see https://github.com/pypa/pip/issues/7498. 14 | """ 15 | from pip._internal.utils.entrypoints import _wrapper 16 | 17 | return _wrapper(args) 18 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/cli/__init__.py: -------------------------------------------------------------------------------- 1 | """Subpackage containing all of pip's command line interface related code 2 | """ 3 | 4 | # This file intentionally does not import submodules 5 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/cli/command_context.py: -------------------------------------------------------------------------------- 1 | from contextlib import contextmanager 2 | 3 | from pip._vendor.contextlib2 import ExitStack 4 | 5 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 6 | 7 | if MYPY_CHECK_RUNNING: 8 | from typing import Iterator, ContextManager, TypeVar 9 | 10 | _T = TypeVar('_T', covariant=True) 11 | 12 | 13 | class CommandContextMixIn(object): 14 | def __init__(self): 15 | # type: () -> None 16 | super(CommandContextMixIn, self).__init__() 17 | self._in_main_context = False 18 | self._main_context = ExitStack() 19 | 20 | @contextmanager 21 | def main_context(self): 22 | # type: () -> Iterator[None] 23 | assert not self._in_main_context 24 | 25 | self._in_main_context = True 26 | try: 27 | with self._main_context: 28 | yield 29 | finally: 30 | self._in_main_context = False 31 | 32 | def enter_context(self, context_provider): 33 | # type: (ContextManager[_T]) -> _T 34 | assert self._in_main_context 35 | 36 | return self._main_context.enter_context(context_provider) 37 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/cli/status_codes.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | SUCCESS = 0 4 | ERROR = 1 5 | UNKNOWN_ERROR = 2 6 | VIRTUALENV_NOT_FOUND = 3 7 | PREVIOUS_BUILD_DIR_ERROR = 4 8 | NO_MATCHES_FOUND = 23 9 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/commands/check.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from pip._internal.cli.base_command import Command 4 | from pip._internal.cli.status_codes import ERROR, SUCCESS 5 | from pip._internal.operations.check import ( 6 | check_package_set, 7 | create_package_set_from_installed, 8 | ) 9 | from pip._internal.utils.misc import write_output 10 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 11 | 12 | logger = logging.getLogger(__name__) 13 | 14 | if MYPY_CHECK_RUNNING: 15 | from typing import List, Any 16 | from optparse import Values 17 | 18 | 19 | class CheckCommand(Command): 20 | """Verify installed packages have compatible dependencies.""" 21 | 22 | usage = """ 23 | %prog [options]""" 24 | 25 | def run(self, options, args): 26 | # type: (Values, List[Any]) -> int 27 | 28 | package_set, parsing_probs = create_package_set_from_installed() 29 | missing, conflicting = check_package_set(package_set) 30 | 31 | for project_name in missing: 32 | version = package_set[project_name].version 33 | for dependency in missing[project_name]: 34 | write_output( 35 | "%s %s requires %s, which is not installed.", 36 | project_name, version, dependency[0], 37 | ) 38 | 39 | for project_name in conflicting: 40 | version = package_set[project_name].version 41 | for dep_name, dep_version, req in conflicting[project_name]: 42 | write_output( 43 | "%s %s has requirement %s, but you have %s %s.", 44 | project_name, version, req, dep_name, dep_version, 45 | ) 46 | 47 | if missing or conflicting or parsing_probs: 48 | return ERROR 49 | else: 50 | write_output("No broken requirements found.") 51 | return SUCCESS 52 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/commands/hash.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | import hashlib 4 | import logging 5 | import sys 6 | 7 | from pip._internal.cli.base_command import Command 8 | from pip._internal.cli.status_codes import ERROR, SUCCESS 9 | from pip._internal.utils.hashes import FAVORITE_HASH, STRONG_HASHES 10 | from pip._internal.utils.misc import read_chunks, write_output 11 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 12 | 13 | if MYPY_CHECK_RUNNING: 14 | from optparse import Values 15 | from typing import List 16 | 17 | logger = logging.getLogger(__name__) 18 | 19 | 20 | class HashCommand(Command): 21 | """ 22 | Compute a hash of a local package archive. 23 | 24 | These can be used with --hash in a requirements file to do repeatable 25 | installs. 26 | """ 27 | 28 | usage = '%prog [options] ...' 29 | ignore_require_venv = True 30 | 31 | def add_options(self): 32 | # type: () -> None 33 | self.cmd_opts.add_option( 34 | '-a', '--algorithm', 35 | dest='algorithm', 36 | choices=STRONG_HASHES, 37 | action='store', 38 | default=FAVORITE_HASH, 39 | help='The hash algorithm to use: one of {}'.format( 40 | ', '.join(STRONG_HASHES))) 41 | self.parser.insert_option_group(0, self.cmd_opts) 42 | 43 | def run(self, options, args): 44 | # type: (Values, List[str]) -> int 45 | if not args: 46 | self.parser.print_usage(sys.stderr) 47 | return ERROR 48 | 49 | algorithm = options.algorithm 50 | for path in args: 51 | write_output('%s:\n--hash=%s:%s', 52 | path, algorithm, _hash_of_file(path, algorithm)) 53 | return SUCCESS 54 | 55 | 56 | def _hash_of_file(path, algorithm): 57 | # type: (str, str) -> str 58 | """Return the hash digest of a file.""" 59 | with open(path, 'rb') as archive: 60 | hash = hashlib.new(algorithm) 61 | for chunk in read_chunks(archive): 62 | hash.update(chunk) 63 | return hash.hexdigest() 64 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/commands/help.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from pip._internal.cli.base_command import Command 4 | from pip._internal.cli.status_codes import SUCCESS 5 | from pip._internal.exceptions import CommandError 6 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 7 | 8 | if MYPY_CHECK_RUNNING: 9 | from typing import List 10 | from optparse import Values 11 | 12 | 13 | class HelpCommand(Command): 14 | """Show help for commands""" 15 | 16 | usage = """ 17 | %prog """ 18 | ignore_require_venv = True 19 | 20 | def run(self, options, args): 21 | # type: (Values, List[str]) -> int 22 | from pip._internal.commands import ( 23 | commands_dict, create_command, get_similar_commands, 24 | ) 25 | 26 | try: 27 | # 'pip help' with no args is handled by pip.__init__.parseopt() 28 | cmd_name = args[0] # the command we need help for 29 | except IndexError: 30 | return SUCCESS 31 | 32 | if cmd_name not in commands_dict: 33 | guess = get_similar_commands(cmd_name) 34 | 35 | msg = ['unknown command "{}"'.format(cmd_name)] 36 | if guess: 37 | msg.append('maybe you meant "{}"'.format(guess)) 38 | 39 | raise CommandError(' - '.join(msg)) 40 | 41 | command = create_command(cmd_name) 42 | command.parser.print_help() 43 | 44 | return SUCCESS 45 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/distributions/__init__.py: -------------------------------------------------------------------------------- 1 | from pip._internal.distributions.sdist import SourceDistribution 2 | from pip._internal.distributions.wheel import WheelDistribution 3 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 4 | 5 | if MYPY_CHECK_RUNNING: 6 | from pip._internal.distributions.base import AbstractDistribution 7 | from pip._internal.req.req_install import InstallRequirement 8 | 9 | 10 | def make_distribution_for_install_requirement(install_req): 11 | # type: (InstallRequirement) -> AbstractDistribution 12 | """Returns a Distribution for the given InstallRequirement 13 | """ 14 | # Editable requirements will always be source distributions. They use the 15 | # legacy logic until we create a modern standard for them. 16 | if install_req.editable: 17 | return SourceDistribution(install_req) 18 | 19 | # If it's a wheel, it's a WheelDistribution 20 | if install_req.is_wheel: 21 | return WheelDistribution(install_req) 22 | 23 | # Otherwise, a SourceDistribution 24 | return SourceDistribution(install_req) 25 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/distributions/base.py: -------------------------------------------------------------------------------- 1 | import abc 2 | 3 | from pip._vendor.six import add_metaclass 4 | 5 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 6 | 7 | if MYPY_CHECK_RUNNING: 8 | from typing import Optional 9 | 10 | from pip._vendor.pkg_resources import Distribution 11 | from pip._internal.req import InstallRequirement 12 | from pip._internal.index.package_finder import PackageFinder 13 | 14 | 15 | @add_metaclass(abc.ABCMeta) 16 | class AbstractDistribution(object): 17 | """A base class for handling installable artifacts. 18 | 19 | The requirements for anything installable are as follows: 20 | 21 | - we must be able to determine the requirement name 22 | (or we can't correctly handle the non-upgrade case). 23 | 24 | - for packages with setup requirements, we must also be able 25 | to determine their requirements without installing additional 26 | packages (for the same reason as run-time dependencies) 27 | 28 | - we must be able to create a Distribution object exposing the 29 | above metadata. 30 | """ 31 | 32 | def __init__(self, req): 33 | # type: (InstallRequirement) -> None 34 | super(AbstractDistribution, self).__init__() 35 | self.req = req 36 | 37 | @abc.abstractmethod 38 | def get_pkg_resources_distribution(self): 39 | # type: () -> Optional[Distribution] 40 | raise NotImplementedError() 41 | 42 | @abc.abstractmethod 43 | def prepare_distribution_metadata(self, finder, build_isolation): 44 | # type: (PackageFinder, bool) -> None 45 | raise NotImplementedError() 46 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/distributions/installed.py: -------------------------------------------------------------------------------- 1 | from pip._internal.distributions.base import AbstractDistribution 2 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 3 | 4 | if MYPY_CHECK_RUNNING: 5 | from typing import Optional 6 | 7 | from pip._vendor.pkg_resources import Distribution 8 | from pip._internal.index.package_finder import PackageFinder 9 | 10 | 11 | class InstalledDistribution(AbstractDistribution): 12 | """Represents an installed package. 13 | 14 | This does not need any preparation as the required information has already 15 | been computed. 16 | """ 17 | 18 | def get_pkg_resources_distribution(self): 19 | # type: () -> Optional[Distribution] 20 | return self.req.satisfied_by 21 | 22 | def prepare_distribution_metadata(self, finder, build_isolation): 23 | # type: (PackageFinder, bool) -> None 24 | pass 25 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/distributions/wheel.py: -------------------------------------------------------------------------------- 1 | from zipfile import ZipFile 2 | 3 | from pip._internal.distributions.base import AbstractDistribution 4 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 5 | from pip._internal.utils.wheel import pkg_resources_distribution_for_wheel 6 | 7 | if MYPY_CHECK_RUNNING: 8 | from pip._vendor.pkg_resources import Distribution 9 | from pip._internal.index.package_finder import PackageFinder 10 | 11 | 12 | class WheelDistribution(AbstractDistribution): 13 | """Represents a wheel distribution. 14 | 15 | This does not need any preparation as wheels can be directly unpacked. 16 | """ 17 | 18 | def get_pkg_resources_distribution(self): 19 | # type: () -> Distribution 20 | """Loads the metadata from the wheel file into memory and returns a 21 | Distribution that uses it, not relying on the wheel file or 22 | requirement. 23 | """ 24 | # Set as part of preparation during download. 25 | assert self.req.local_file_path 26 | # Wheels are never unnamed. 27 | assert self.req.name 28 | 29 | with ZipFile(self.req.local_file_path, allowZip64=True) as z: 30 | return pkg_resources_distribution_for_wheel( 31 | z, self.req.name, self.req.local_file_path 32 | ) 33 | 34 | def prepare_distribution_metadata(self, finder, build_isolation): 35 | # type: (PackageFinder, bool) -> None 36 | pass 37 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/index/__init__.py: -------------------------------------------------------------------------------- 1 | """Index interaction code 2 | """ 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/main.py: -------------------------------------------------------------------------------- 1 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 2 | 3 | if MYPY_CHECK_RUNNING: 4 | from typing import Optional, List 5 | 6 | 7 | def main(args=None): 8 | # type: (Optional[List[str]]) -> int 9 | """This is preserved for old console scripts that may still be referencing 10 | it. 11 | 12 | For additional details, see https://github.com/pypa/pip/issues/7498. 13 | """ 14 | from pip._internal.utils.entrypoints import _wrapper 15 | 16 | return _wrapper(args) 17 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/models/__init__.py: -------------------------------------------------------------------------------- 1 | """A package that contains models that represent entities. 2 | """ 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/models/candidate.py: -------------------------------------------------------------------------------- 1 | from pip._vendor.packaging.version import parse as parse_version 2 | 3 | from pip._internal.utils.models import KeyBasedCompareMixin 4 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 5 | 6 | if MYPY_CHECK_RUNNING: 7 | from pip._vendor.packaging.version import _BaseVersion 8 | from pip._internal.models.link import Link 9 | 10 | 11 | class InstallationCandidate(KeyBasedCompareMixin): 12 | """Represents a potential "candidate" for installation. 13 | """ 14 | 15 | __slots__ = ["name", "version", "link"] 16 | 17 | def __init__(self, name, version, link): 18 | # type: (str, str, Link) -> None 19 | self.name = name 20 | self.version = parse_version(version) # type: _BaseVersion 21 | self.link = link 22 | 23 | super(InstallationCandidate, self).__init__( 24 | key=(self.name, self.version, self.link), 25 | defining_class=InstallationCandidate 26 | ) 27 | 28 | def __repr__(self): 29 | # type: () -> str 30 | return "".format( 31 | self.name, self.version, self.link, 32 | ) 33 | 34 | def __str__(self): 35 | # type: () -> str 36 | return '{!r} candidate (version {} at {})'.format( 37 | self.name, self.version, self.link, 38 | ) 39 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/models/index.py: -------------------------------------------------------------------------------- 1 | from pip._vendor.six.moves.urllib import parse as urllib_parse 2 | 3 | 4 | class PackageIndex(object): 5 | """Represents a Package Index and provides easier access to endpoints 6 | """ 7 | 8 | __slots__ = ['url', 'netloc', 'simple_url', 'pypi_url', 9 | 'file_storage_domain'] 10 | 11 | def __init__(self, url, file_storage_domain): 12 | # type: (str, str) -> None 13 | super(PackageIndex, self).__init__() 14 | self.url = url 15 | self.netloc = urllib_parse.urlsplit(url).netloc 16 | self.simple_url = self._url_for_path('simple') 17 | self.pypi_url = self._url_for_path('pypi') 18 | 19 | # This is part of a temporary hack used to block installs of PyPI 20 | # packages which depend on external urls only necessary until PyPI can 21 | # block such packages themselves 22 | self.file_storage_domain = file_storage_domain 23 | 24 | def _url_for_path(self, path): 25 | # type: (str) -> str 26 | return urllib_parse.urljoin(self.url, path) 27 | 28 | 29 | PyPI = PackageIndex( 30 | 'https://pypi.org/', file_storage_domain='files.pythonhosted.org' 31 | ) 32 | TestPyPI = PackageIndex( 33 | 'https://test.pypi.org/', file_storage_domain='test-files.pythonhosted.org' 34 | ) 35 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/models/scheme.py: -------------------------------------------------------------------------------- 1 | """ 2 | For types associated with installation schemes. 3 | 4 | For a general overview of available schemes and their context, see 5 | https://docs.python.org/3/install/index.html#alternate-installation. 6 | """ 7 | 8 | 9 | SCHEME_KEYS = ['platlib', 'purelib', 'headers', 'scripts', 'data'] 10 | 11 | 12 | class Scheme(object): 13 | """A Scheme holds paths which are used as the base directories for 14 | artifacts associated with a Python package. 15 | """ 16 | 17 | __slots__ = SCHEME_KEYS 18 | 19 | def __init__( 20 | self, 21 | platlib, # type: str 22 | purelib, # type: str 23 | headers, # type: str 24 | scripts, # type: str 25 | data, # type: str 26 | ): 27 | self.platlib = platlib 28 | self.purelib = purelib 29 | self.headers = headers 30 | self.scripts = scripts 31 | self.data = data 32 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/models/selection_prefs.py: -------------------------------------------------------------------------------- 1 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 2 | 3 | if MYPY_CHECK_RUNNING: 4 | from typing import Optional 5 | from pip._internal.models.format_control import FormatControl 6 | 7 | 8 | class SelectionPreferences(object): 9 | """ 10 | Encapsulates the candidate selection preferences for downloading 11 | and installing files. 12 | """ 13 | 14 | __slots__ = ['allow_yanked', 'allow_all_prereleases', 'format_control', 15 | 'prefer_binary', 'ignore_requires_python'] 16 | 17 | # Don't include an allow_yanked default value to make sure each call 18 | # site considers whether yanked releases are allowed. This also causes 19 | # that decision to be made explicit in the calling code, which helps 20 | # people when reading the code. 21 | def __init__( 22 | self, 23 | allow_yanked, # type: bool 24 | allow_all_prereleases=False, # type: bool 25 | format_control=None, # type: Optional[FormatControl] 26 | prefer_binary=False, # type: bool 27 | ignore_requires_python=None, # type: Optional[bool] 28 | ): 29 | # type: (...) -> None 30 | """Create a SelectionPreferences object. 31 | 32 | :param allow_yanked: Whether files marked as yanked (in the sense 33 | of PEP 592) are permitted to be candidates for install. 34 | :param format_control: A FormatControl object or None. Used to control 35 | the selection of source packages / binary packages when consulting 36 | the index and links. 37 | :param prefer_binary: Whether to prefer an old, but valid, binary 38 | dist over a new source dist. 39 | :param ignore_requires_python: Whether to ignore incompatible 40 | "Requires-Python" values in links. Defaults to False. 41 | """ 42 | if ignore_requires_python is None: 43 | ignore_requires_python = False 44 | 45 | self.allow_yanked = allow_yanked 46 | self.allow_all_prereleases = allow_all_prereleases 47 | self.format_control = format_control 48 | self.prefer_binary = prefer_binary 49 | self.ignore_requires_python = ignore_requires_python 50 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/network/__init__.py: -------------------------------------------------------------------------------- 1 | """Contains purely network-related utilities. 2 | """ 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/network/xmlrpc.py: -------------------------------------------------------------------------------- 1 | """xmlrpclib.Transport implementation 2 | """ 3 | 4 | import logging 5 | 6 | # NOTE: XMLRPC Client is not annotated in typeshed as on 2017-07-17, which is 7 | # why we ignore the type on this import 8 | from pip._vendor.six.moves import xmlrpc_client # type: ignore 9 | from pip._vendor.six.moves.urllib import parse as urllib_parse 10 | 11 | from pip._internal.exceptions import NetworkConnectionError 12 | from pip._internal.network.utils import raise_for_status 13 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 14 | 15 | if MYPY_CHECK_RUNNING: 16 | from typing import Dict 17 | from pip._internal.network.session import PipSession 18 | 19 | 20 | logger = logging.getLogger(__name__) 21 | 22 | 23 | class PipXmlrpcTransport(xmlrpc_client.Transport): 24 | """Provide a `xmlrpclib.Transport` implementation via a `PipSession` 25 | object. 26 | """ 27 | 28 | def __init__(self, index_url, session, use_datetime=False): 29 | # type: (str, PipSession, bool) -> None 30 | xmlrpc_client.Transport.__init__(self, use_datetime) 31 | index_parts = urllib_parse.urlparse(index_url) 32 | self._scheme = index_parts.scheme 33 | self._session = session 34 | 35 | def request(self, host, handler, request_body, verbose=False): 36 | # type: (str, str, Dict[str, str], bool) -> None 37 | parts = (self._scheme, host, handler, None, None, None) 38 | url = urllib_parse.urlunparse(parts) 39 | try: 40 | headers = {'Content-Type': 'text/xml'} 41 | response = self._session.post(url, data=request_body, 42 | headers=headers, stream=True) 43 | raise_for_status(response) 44 | self.verbose = verbose 45 | return self.parse_response(response.raw) 46 | except NetworkConnectionError as exc: 47 | assert exc.response 48 | logger.critical( 49 | "HTTP error %s while getting %s", 50 | exc.response.status_code, url, 51 | ) 52 | raise 53 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_internal/operations/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/build/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_internal/operations/build/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/build/metadata.py: -------------------------------------------------------------------------------- 1 | """Metadata generation logic for source distributions. 2 | """ 3 | 4 | import os 5 | 6 | from pip._internal.utils.subprocess import runner_with_spinner_message 7 | from pip._internal.utils.temp_dir import TempDirectory 8 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 9 | 10 | if MYPY_CHECK_RUNNING: 11 | from pip._internal.build_env import BuildEnvironment 12 | from pip._vendor.pep517.wrappers import Pep517HookCaller 13 | 14 | 15 | def generate_metadata(build_env, backend): 16 | # type: (BuildEnvironment, Pep517HookCaller) -> str 17 | """Generate metadata using mechanisms described in PEP 517. 18 | 19 | Returns the generated metadata directory. 20 | """ 21 | metadata_tmpdir = TempDirectory( 22 | kind="modern-metadata", globally_managed=True 23 | ) 24 | 25 | metadata_dir = metadata_tmpdir.path 26 | 27 | with build_env: 28 | # Note that Pep517HookCaller implements a fallback for 29 | # prepare_metadata_for_build_wheel, so we don't have to 30 | # consider the possibility that this hook doesn't exist. 31 | runner = runner_with_spinner_message("Preparing wheel metadata") 32 | with backend.subprocess_runner(runner): 33 | distinfo_dir = backend.prepare_metadata_for_build_wheel( 34 | metadata_dir 35 | ) 36 | 37 | return os.path.join(metadata_dir, distinfo_dir) 38 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/build/metadata_legacy.py: -------------------------------------------------------------------------------- 1 | """Metadata generation logic for legacy source distributions. 2 | """ 3 | 4 | import logging 5 | import os 6 | 7 | from pip._internal.exceptions import InstallationError 8 | from pip._internal.utils.setuptools_build import make_setuptools_egg_info_args 9 | from pip._internal.utils.subprocess import call_subprocess 10 | from pip._internal.utils.temp_dir import TempDirectory 11 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 12 | 13 | if MYPY_CHECK_RUNNING: 14 | from pip._internal.build_env import BuildEnvironment 15 | 16 | logger = logging.getLogger(__name__) 17 | 18 | 19 | def _find_egg_info(directory): 20 | # type: (str) -> str 21 | """Find an .egg-info subdirectory in `directory`. 22 | """ 23 | filenames = [ 24 | f for f in os.listdir(directory) if f.endswith(".egg-info") 25 | ] 26 | 27 | if not filenames: 28 | raise InstallationError( 29 | "No .egg-info directory found in {}".format(directory) 30 | ) 31 | 32 | if len(filenames) > 1: 33 | raise InstallationError( 34 | "More than one .egg-info directory found in {}".format( 35 | directory 36 | ) 37 | ) 38 | 39 | return os.path.join(directory, filenames[0]) 40 | 41 | 42 | def generate_metadata( 43 | build_env, # type: BuildEnvironment 44 | setup_py_path, # type: str 45 | source_dir, # type: str 46 | isolated, # type: bool 47 | details, # type: str 48 | ): 49 | # type: (...) -> str 50 | """Generate metadata using setup.py-based defacto mechanisms. 51 | 52 | Returns the generated metadata directory. 53 | """ 54 | logger.debug( 55 | 'Running setup.py (path:%s) egg_info for package %s', 56 | setup_py_path, details, 57 | ) 58 | 59 | egg_info_dir = TempDirectory( 60 | kind="pip-egg-info", globally_managed=True 61 | ).path 62 | 63 | args = make_setuptools_egg_info_args( 64 | setup_py_path, 65 | egg_info_dir=egg_info_dir, 66 | no_user_config=isolated, 67 | ) 68 | 69 | with build_env: 70 | call_subprocess( 71 | args, 72 | cwd=source_dir, 73 | command_desc='python setup.py egg_info', 74 | ) 75 | 76 | # Return the .egg-info directory. 77 | return _find_egg_info(egg_info_dir) 78 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/build/wheel.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | 4 | from pip._internal.utils.subprocess import runner_with_spinner_message 5 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 6 | 7 | if MYPY_CHECK_RUNNING: 8 | from typing import List, Optional 9 | from pip._vendor.pep517.wrappers import Pep517HookCaller 10 | 11 | logger = logging.getLogger(__name__) 12 | 13 | 14 | def build_wheel_pep517( 15 | name, # type: str 16 | backend, # type: Pep517HookCaller 17 | metadata_directory, # type: str 18 | build_options, # type: List[str] 19 | tempd, # type: str 20 | ): 21 | # type: (...) -> Optional[str] 22 | """Build one InstallRequirement using the PEP 517 build process. 23 | 24 | Returns path to wheel if successfully built. Otherwise, returns None. 25 | """ 26 | assert metadata_directory is not None 27 | if build_options: 28 | # PEP 517 does not support --build-options 29 | logger.error('Cannot build wheel for %s using PEP 517 when ' 30 | '--build-option is present', name) 31 | return None 32 | try: 33 | logger.debug('Destination directory: %s', tempd) 34 | 35 | runner = runner_with_spinner_message( 36 | 'Building wheel for {} (PEP 517)'.format(name) 37 | ) 38 | with backend.subprocess_runner(runner): 39 | wheel_name = backend.build_wheel( 40 | tempd, 41 | metadata_directory=metadata_directory, 42 | ) 43 | except Exception: 44 | logger.error('Failed building wheel for %s', name) 45 | return None 46 | return os.path.join(tempd, wheel_name) 47 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/install/__init__.py: -------------------------------------------------------------------------------- 1 | """For modules related to installing packages. 2 | """ 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/operations/install/editable_legacy.py: -------------------------------------------------------------------------------- 1 | """Legacy editable installation process, i.e. `setup.py develop`. 2 | """ 3 | import logging 4 | 5 | from pip._internal.utils.logging import indent_log 6 | from pip._internal.utils.setuptools_build import make_setuptools_develop_args 7 | from pip._internal.utils.subprocess import call_subprocess 8 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 9 | 10 | if MYPY_CHECK_RUNNING: 11 | from typing import List, Optional, Sequence 12 | 13 | from pip._internal.build_env import BuildEnvironment 14 | 15 | 16 | logger = logging.getLogger(__name__) 17 | 18 | 19 | def install_editable( 20 | install_options, # type: List[str] 21 | global_options, # type: Sequence[str] 22 | prefix, # type: Optional[str] 23 | home, # type: Optional[str] 24 | use_user_site, # type: bool 25 | name, # type: str 26 | setup_py_path, # type: str 27 | isolated, # type: bool 28 | build_env, # type: BuildEnvironment 29 | unpacked_source_directory, # type: str 30 | ): 31 | # type: (...) -> None 32 | """Install a package in editable mode. Most arguments are pass-through 33 | to setuptools. 34 | """ 35 | logger.info('Running setup.py develop for %s', name) 36 | 37 | args = make_setuptools_develop_args( 38 | setup_py_path, 39 | global_options=global_options, 40 | install_options=install_options, 41 | no_user_config=isolated, 42 | prefix=prefix, 43 | home=home, 44 | use_user_site=use_user_site, 45 | ) 46 | 47 | with indent_log(): 48 | with build_env: 49 | call_subprocess( 50 | args, 51 | cwd=unpacked_source_directory, 52 | ) 53 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/resolution/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_internal/resolution/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/resolution/base.py: -------------------------------------------------------------------------------- 1 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 2 | 3 | if MYPY_CHECK_RUNNING: 4 | from typing import Callable, List 5 | from pip._internal.req.req_install import InstallRequirement 6 | from pip._internal.req.req_set import RequirementSet 7 | 8 | InstallRequirementProvider = Callable[ 9 | [str, InstallRequirement], InstallRequirement 10 | ] 11 | 12 | 13 | class BaseResolver(object): 14 | def resolve(self, root_reqs, check_supported_wheels): 15 | # type: (List[InstallRequirement], bool) -> RequirementSet 16 | raise NotImplementedError() 17 | 18 | def get_installation_order(self, req_set): 19 | # type: (RequirementSet) -> List[InstallRequirement] 20 | raise NotImplementedError() 21 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_internal/resolution/legacy/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_internal/utils/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/appdirs.py: -------------------------------------------------------------------------------- 1 | """ 2 | This code wraps the vendored appdirs module to so the return values are 3 | compatible for the current pip code base. 4 | 5 | The intention is to rewrite current usages gradually, keeping the tests pass, 6 | and eventually drop this after all usages are changed. 7 | """ 8 | 9 | from __future__ import absolute_import 10 | 11 | import os 12 | 13 | from pip._vendor import appdirs as _appdirs 14 | 15 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 16 | 17 | if MYPY_CHECK_RUNNING: 18 | from typing import List 19 | 20 | 21 | def user_cache_dir(appname): 22 | # type: (str) -> str 23 | return _appdirs.user_cache_dir(appname, appauthor=False) 24 | 25 | 26 | def user_config_dir(appname, roaming=True): 27 | # type: (str, bool) -> str 28 | path = _appdirs.user_config_dir(appname, appauthor=False, roaming=roaming) 29 | if _appdirs.system == "darwin" and not os.path.isdir(path): 30 | path = os.path.expanduser('~/.config/') 31 | if appname: 32 | path = os.path.join(path, appname) 33 | return path 34 | 35 | 36 | # for the discussion regarding site_config_dir locations 37 | # see 38 | def site_config_dirs(appname): 39 | # type: (str) -> List[str] 40 | dirval = _appdirs.site_config_dir(appname, appauthor=False, multipath=True) 41 | if _appdirs.system not in ["win32", "darwin"]: 42 | # always look in /etc directly as well 43 | return dirval.split(os.pathsep) + ['/etc'] 44 | return [dirval] 45 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/datetime.py: -------------------------------------------------------------------------------- 1 | """For when pip wants to check the date or time. 2 | """ 3 | 4 | from __future__ import absolute_import 5 | 6 | import datetime 7 | 8 | 9 | def today_is_later_than(year, month, day): 10 | # type: (int, int, int) -> bool 11 | today = datetime.date.today() 12 | given = datetime.date(year, month, day) 13 | 14 | return today > given 15 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/distutils_args.py: -------------------------------------------------------------------------------- 1 | from distutils.errors import DistutilsArgError 2 | from distutils.fancy_getopt import FancyGetopt 3 | 4 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 5 | 6 | if MYPY_CHECK_RUNNING: 7 | from typing import Dict, List 8 | 9 | 10 | _options = [ 11 | ("exec-prefix=", None, ""), 12 | ("home=", None, ""), 13 | ("install-base=", None, ""), 14 | ("install-data=", None, ""), 15 | ("install-headers=", None, ""), 16 | ("install-lib=", None, ""), 17 | ("install-platlib=", None, ""), 18 | ("install-purelib=", None, ""), 19 | ("install-scripts=", None, ""), 20 | ("prefix=", None, ""), 21 | ("root=", None, ""), 22 | ("user", None, ""), 23 | ] 24 | 25 | 26 | # typeshed doesn't permit Tuple[str, None, str], see python/typeshed#3469. 27 | _distutils_getopt = FancyGetopt(_options) # type: ignore 28 | 29 | 30 | def parse_distutils_args(args): 31 | # type: (List[str]) -> Dict[str, str] 32 | """Parse provided arguments, returning an object that has the 33 | matched arguments. 34 | 35 | Any unknown arguments are ignored. 36 | """ 37 | result = {} 38 | for arg in args: 39 | try: 40 | _, match = _distutils_getopt.getopt(args=[arg]) 41 | except DistutilsArgError: 42 | # We don't care about any other options, which here may be 43 | # considered unrecognized since our option list is not 44 | # exhaustive. 45 | pass 46 | else: 47 | result.update(match.__dict__) 48 | return result 49 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/encoding.py: -------------------------------------------------------------------------------- 1 | import codecs 2 | import locale 3 | import re 4 | import sys 5 | 6 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 7 | 8 | if MYPY_CHECK_RUNNING: 9 | from typing import List, Tuple, Text 10 | 11 | BOMS = [ 12 | (codecs.BOM_UTF8, 'utf-8'), 13 | (codecs.BOM_UTF16, 'utf-16'), 14 | (codecs.BOM_UTF16_BE, 'utf-16-be'), 15 | (codecs.BOM_UTF16_LE, 'utf-16-le'), 16 | (codecs.BOM_UTF32, 'utf-32'), 17 | (codecs.BOM_UTF32_BE, 'utf-32-be'), 18 | (codecs.BOM_UTF32_LE, 'utf-32-le'), 19 | ] # type: List[Tuple[bytes, Text]] 20 | 21 | ENCODING_RE = re.compile(br'coding[:=]\s*([-\w.]+)') 22 | 23 | 24 | def auto_decode(data): 25 | # type: (bytes) -> Text 26 | """Check a bytes string for a BOM to correctly detect the encoding 27 | 28 | Fallback to locale.getpreferredencoding(False) like open() on Python3""" 29 | for bom, encoding in BOMS: 30 | if data.startswith(bom): 31 | return data[len(bom):].decode(encoding) 32 | # Lets check the first two lines as in PEP263 33 | for line in data.split(b'\n')[:2]: 34 | if line[0:1] == b'#' and ENCODING_RE.search(line): 35 | result = ENCODING_RE.search(line) 36 | assert result is not None 37 | encoding = result.groups()[0].decode('ascii') 38 | return data.decode(encoding) 39 | return data.decode( 40 | locale.getpreferredencoding(False) or sys.getdefaultencoding(), 41 | ) 42 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/entrypoints.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | from pip._internal.cli.main import main 4 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 5 | 6 | if MYPY_CHECK_RUNNING: 7 | from typing import Optional, List 8 | 9 | 10 | def _wrapper(args=None): 11 | # type: (Optional[List[str]]) -> int 12 | """Central wrapper for all old entrypoints. 13 | 14 | Historically pip has had several entrypoints defined. Because of issues 15 | arising from PATH, sys.path, multiple Pythons, their interactions, and most 16 | of them having a pip installed, users suffer every time an entrypoint gets 17 | moved. 18 | 19 | To alleviate this pain, and provide a mechanism for warning users and 20 | directing them to an appropriate place for help, we now define all of 21 | our old entrypoints as wrappers for the current one. 22 | """ 23 | sys.stderr.write( 24 | "WARNING: pip is being invoked by an old script wrapper. This will " 25 | "fail in a future version of pip.\n" 26 | "Please see https://github.com/pypa/pip/issues/5599 for advice on " 27 | "fixing the underlying issue.\n" 28 | "To avoid this problem you can invoke Python with '-m pip' instead of " 29 | "running pip directly.\n" 30 | ) 31 | return main(args) 32 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/filetypes.py: -------------------------------------------------------------------------------- 1 | """Filetype information. 2 | """ 3 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 4 | 5 | if MYPY_CHECK_RUNNING: 6 | from typing import Tuple 7 | 8 | WHEEL_EXTENSION = '.whl' 9 | BZ2_EXTENSIONS = ('.tar.bz2', '.tbz') # type: Tuple[str, ...] 10 | XZ_EXTENSIONS = ('.tar.xz', '.txz', '.tlz', 11 | '.tar.lz', '.tar.lzma') # type: Tuple[str, ...] 12 | ZIP_EXTENSIONS = ('.zip', WHEEL_EXTENSION) # type: Tuple[str, ...] 13 | TAR_EXTENSIONS = ('.tar.gz', '.tgz', '.tar') # type: Tuple[str, ...] 14 | ARCHIVE_EXTENSIONS = ( 15 | ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS 16 | ) 17 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/inject_securetransport.py: -------------------------------------------------------------------------------- 1 | """A helper module that injects SecureTransport, on import. 2 | 3 | The import should be done as early as possible, to ensure all requests and 4 | sessions (or whatever) are created after injecting SecureTransport. 5 | 6 | Note that we only do the injection on macOS, when the linked OpenSSL is too 7 | old to handle TLSv1.2. 8 | """ 9 | 10 | import sys 11 | 12 | 13 | def inject_securetransport(): 14 | # type: () -> None 15 | # Only relevant on macOS 16 | if sys.platform != "darwin": 17 | return 18 | 19 | try: 20 | import ssl 21 | except ImportError: 22 | return 23 | 24 | # Checks for OpenSSL 1.0.1 25 | if ssl.OPENSSL_VERSION_NUMBER >= 0x1000100f: 26 | return 27 | 28 | try: 29 | from pip._vendor.urllib3.contrib import securetransport 30 | except (ImportError, OSError): 31 | return 32 | 33 | securetransport.inject_into_urllib3() 34 | 35 | 36 | inject_securetransport() 37 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/models.py: -------------------------------------------------------------------------------- 1 | """Utilities for defining models 2 | """ 3 | # The following comment should be removed at some point in the future. 4 | # mypy: disallow-untyped-defs=False 5 | 6 | import operator 7 | 8 | 9 | class KeyBasedCompareMixin(object): 10 | """Provides comparison capabilities that is based on a key 11 | """ 12 | 13 | __slots__ = ['_compare_key', '_defining_class'] 14 | 15 | def __init__(self, key, defining_class): 16 | self._compare_key = key 17 | self._defining_class = defining_class 18 | 19 | def __hash__(self): 20 | return hash(self._compare_key) 21 | 22 | def __lt__(self, other): 23 | return self._compare(other, operator.__lt__) 24 | 25 | def __le__(self, other): 26 | return self._compare(other, operator.__le__) 27 | 28 | def __gt__(self, other): 29 | return self._compare(other, operator.__gt__) 30 | 31 | def __ge__(self, other): 32 | return self._compare(other, operator.__ge__) 33 | 34 | def __eq__(self, other): 35 | return self._compare(other, operator.__eq__) 36 | 37 | def __ne__(self, other): 38 | return self._compare(other, operator.__ne__) 39 | 40 | def _compare(self, other, method): 41 | if not isinstance(other, self._defining_class): 42 | return NotImplemented 43 | 44 | return method(self._compare_key, other._compare_key) 45 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/pkg_resources.py: -------------------------------------------------------------------------------- 1 | from pip._vendor.pkg_resources import yield_lines 2 | from pip._vendor.six import ensure_str 3 | 4 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 5 | 6 | if MYPY_CHECK_RUNNING: 7 | from typing import Dict, Iterable, List 8 | 9 | 10 | class DictMetadata(object): 11 | """IMetadataProvider that reads metadata files from a dictionary. 12 | """ 13 | def __init__(self, metadata): 14 | # type: (Dict[str, bytes]) -> None 15 | self._metadata = metadata 16 | 17 | def has_metadata(self, name): 18 | # type: (str) -> bool 19 | return name in self._metadata 20 | 21 | def get_metadata(self, name): 22 | # type: (str) -> str 23 | try: 24 | return ensure_str(self._metadata[name]) 25 | except UnicodeDecodeError as e: 26 | # Mirrors handling done in pkg_resources.NullProvider. 27 | e.reason += " in {} file".format(name) 28 | raise 29 | 30 | def get_metadata_lines(self, name): 31 | # type: (str) -> Iterable[str] 32 | return yield_lines(self.get_metadata(name)) 33 | 34 | def metadata_isdir(self, name): 35 | # type: (str) -> bool 36 | return False 37 | 38 | def metadata_listdir(self, name): 39 | # type: (str) -> List[str] 40 | return [] 41 | 42 | def run_script(self, script_name, namespace): 43 | # type: (str, str) -> None 44 | pass 45 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/typing.py: -------------------------------------------------------------------------------- 1 | """For neatly implementing static typing in pip. 2 | 3 | `mypy` - the static type analysis tool we use - uses the `typing` module, which 4 | provides core functionality fundamental to mypy's functioning. 5 | 6 | Generally, `typing` would be imported at runtime and used in that fashion - 7 | it acts as a no-op at runtime and does not have any run-time overhead by 8 | design. 9 | 10 | As it turns out, `typing` is not vendorable - it uses separate sources for 11 | Python 2/Python 3. Thus, this codebase can not expect it to be present. 12 | To work around this, mypy allows the typing import to be behind a False-y 13 | optional to prevent it from running at runtime and type-comments can be used 14 | to remove the need for the types to be accessible directly during runtime. 15 | 16 | This module provides the False-y guard in a nicely named fashion so that a 17 | curious maintainer can reach here to read this. 18 | 19 | In pip, all static-typing related imports should be guarded as follows: 20 | 21 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 22 | 23 | if MYPY_CHECK_RUNNING: 24 | from typing import ... 25 | 26 | Ref: https://github.com/python/mypy/issues/3216 27 | """ 28 | 29 | MYPY_CHECK_RUNNING = False 30 | 31 | 32 | if MYPY_CHECK_RUNNING: 33 | from typing import cast 34 | else: 35 | # typing's cast() is needed at runtime, but we don't want to import typing. 36 | # Thus, we use a dummy no-op version, which we tell mypy to ignore. 37 | def cast(type_, value): # type: ignore 38 | return value 39 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/utils/urls.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | 4 | from pip._vendor.six.moves.urllib import parse as urllib_parse 5 | from pip._vendor.six.moves.urllib import request as urllib_request 6 | 7 | from pip._internal.utils.typing import MYPY_CHECK_RUNNING 8 | 9 | if MYPY_CHECK_RUNNING: 10 | from typing import Optional, Text, Union 11 | 12 | 13 | def get_url_scheme(url): 14 | # type: (Union[str, Text]) -> Optional[Text] 15 | if ':' not in url: 16 | return None 17 | return url.split(':', 1)[0].lower() 18 | 19 | 20 | def path_to_url(path): 21 | # type: (Union[str, Text]) -> str 22 | """ 23 | Convert a path to a file: URL. The path will be made absolute and have 24 | quoted path parts. 25 | """ 26 | path = os.path.normpath(os.path.abspath(path)) 27 | url = urllib_parse.urljoin('file:', urllib_request.pathname2url(path)) 28 | return url 29 | 30 | 31 | def url_to_path(url): 32 | # type: (str) -> str 33 | """ 34 | Convert a file: URL to a path. 35 | """ 36 | assert url.startswith('file:'), ( 37 | "You can only turn file: urls into filenames (not {url!r})" 38 | .format(**locals())) 39 | 40 | _, netloc, path, _, _ = urllib_parse.urlsplit(url) 41 | 42 | if not netloc or netloc == 'localhost': 43 | # According to RFC 8089, same as empty authority. 44 | netloc = '' 45 | elif sys.platform == 'win32': 46 | # If we have a UNC path, prepend UNC share notation. 47 | netloc = '\\\\' + netloc 48 | else: 49 | raise ValueError( 50 | 'non-local file URIs are not supported on this platform: {url!r}' 51 | .format(**locals()) 52 | ) 53 | 54 | path = urllib_request.url2pathname(netloc + path) 55 | return path 56 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_internal/vcs/__init__.py: -------------------------------------------------------------------------------- 1 | # Expose a limited set of classes and functions so callers outside of 2 | # the vcs package don't need to import deeper than `pip._internal.vcs`. 3 | # (The test directory and imports protected by MYPY_CHECK_RUNNING may 4 | # still need to import from a vcs sub-package.) 5 | # Import all vcs modules to register each VCS in the VcsSupport object. 6 | import pip._internal.vcs.bazaar 7 | import pip._internal.vcs.git 8 | import pip._internal.vcs.mercurial 9 | import pip._internal.vcs.subversion # noqa: F401 10 | from pip._internal.vcs.versioncontrol import ( # noqa: F401 11 | RemoteNotFoundError, 12 | is_url, 13 | make_vcs_requirement_url, 14 | vcs, 15 | ) 16 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/__init__.py: -------------------------------------------------------------------------------- 1 | """CacheControl import Interface. 2 | 3 | Make it easy to import from cachecontrol without long namespaces. 4 | """ 5 | __author__ = "Eric Larson" 6 | __email__ = "eric@ionrock.org" 7 | __version__ = "0.12.6" 8 | 9 | from .wrapper import CacheControl 10 | from .adapter import CacheControlAdapter 11 | from .controller import CacheController 12 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/_cmd.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | from pip._vendor import requests 4 | 5 | from pip._vendor.cachecontrol.adapter import CacheControlAdapter 6 | from pip._vendor.cachecontrol.cache import DictCache 7 | from pip._vendor.cachecontrol.controller import logger 8 | 9 | from argparse import ArgumentParser 10 | 11 | 12 | def setup_logging(): 13 | logger.setLevel(logging.DEBUG) 14 | handler = logging.StreamHandler() 15 | logger.addHandler(handler) 16 | 17 | 18 | def get_session(): 19 | adapter = CacheControlAdapter( 20 | DictCache(), cache_etags=True, serializer=None, heuristic=None 21 | ) 22 | sess = requests.Session() 23 | sess.mount("http://", adapter) 24 | sess.mount("https://", adapter) 25 | 26 | sess.cache_controller = adapter.controller 27 | return sess 28 | 29 | 30 | def get_args(): 31 | parser = ArgumentParser() 32 | parser.add_argument("url", help="The URL to try and cache") 33 | return parser.parse_args() 34 | 35 | 36 | def main(args=None): 37 | args = get_args() 38 | sess = get_session() 39 | 40 | # Make a request to get a response 41 | resp = sess.get(args.url) 42 | 43 | # Turn on logging 44 | setup_logging() 45 | 46 | # try setting the cache 47 | sess.cache_controller.cache_response(resp.request, resp.raw) 48 | 49 | # Now try to get it 50 | if sess.cache_controller.cached_request(resp.request): 51 | print("Cached!") 52 | else: 53 | print("Not cached :(") 54 | 55 | 56 | if __name__ == "__main__": 57 | main() 58 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/cache.py: -------------------------------------------------------------------------------- 1 | """ 2 | The cache object API for implementing caches. The default is a thread 3 | safe in-memory dictionary. 4 | """ 5 | from threading import Lock 6 | 7 | 8 | class BaseCache(object): 9 | 10 | def get(self, key): 11 | raise NotImplementedError() 12 | 13 | def set(self, key, value): 14 | raise NotImplementedError() 15 | 16 | def delete(self, key): 17 | raise NotImplementedError() 18 | 19 | def close(self): 20 | pass 21 | 22 | 23 | class DictCache(BaseCache): 24 | 25 | def __init__(self, init_dict=None): 26 | self.lock = Lock() 27 | self.data = init_dict or {} 28 | 29 | def get(self, key): 30 | return self.data.get(key, None) 31 | 32 | def set(self, key, value): 33 | with self.lock: 34 | self.data.update({key: value}) 35 | 36 | def delete(self, key): 37 | with self.lock: 38 | if key in self.data: 39 | self.data.pop(key) 40 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.py: -------------------------------------------------------------------------------- 1 | from .file_cache import FileCache # noqa 2 | from .redis_cache import RedisCache # noqa 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | 3 | from datetime import datetime 4 | from pip._vendor.cachecontrol.cache import BaseCache 5 | 6 | 7 | class RedisCache(BaseCache): 8 | 9 | def __init__(self, conn): 10 | self.conn = conn 11 | 12 | def get(self, key): 13 | return self.conn.get(key) 14 | 15 | def set(self, key, value, expires=None): 16 | if not expires: 17 | self.conn.set(key, value) 18 | else: 19 | expires = expires - datetime.utcnow() 20 | self.conn.setex(key, int(expires.total_seconds()), value) 21 | 22 | def delete(self, key): 23 | self.conn.delete(key) 24 | 25 | def clear(self): 26 | """Helper for clearing all the keys in a database. Use with 27 | caution!""" 28 | for key in self.conn.keys(): 29 | self.conn.delete(key) 30 | 31 | def close(self): 32 | """Redis uses connection pooling, no need to close the connection.""" 33 | pass 34 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/compat.py: -------------------------------------------------------------------------------- 1 | try: 2 | from urllib.parse import urljoin 3 | except ImportError: 4 | from urlparse import urljoin 5 | 6 | 7 | try: 8 | import cPickle as pickle 9 | except ImportError: 10 | import pickle 11 | 12 | 13 | # Handle the case where the requests module has been patched to not have 14 | # urllib3 bundled as part of its source. 15 | try: 16 | from pip._vendor.requests.packages.urllib3.response import HTTPResponse 17 | except ImportError: 18 | from pip._vendor.urllib3.response import HTTPResponse 19 | 20 | try: 21 | from pip._vendor.requests.packages.urllib3.util import is_fp_closed 22 | except ImportError: 23 | from pip._vendor.urllib3.util import is_fp_closed 24 | 25 | # Replicate some six behaviour 26 | try: 27 | text_type = unicode 28 | except NameError: 29 | text_type = str 30 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/wrapper.py: -------------------------------------------------------------------------------- 1 | from .adapter import CacheControlAdapter 2 | from .cache import DictCache 3 | 4 | 5 | def CacheControl( 6 | sess, 7 | cache=None, 8 | cache_etags=True, 9 | serializer=None, 10 | heuristic=None, 11 | controller_class=None, 12 | adapter_class=None, 13 | cacheable_methods=None, 14 | ): 15 | 16 | cache = DictCache() if cache is None else cache 17 | adapter_class = adapter_class or CacheControlAdapter 18 | adapter = adapter_class( 19 | cache, 20 | cache_etags=cache_etags, 21 | serializer=serializer, 22 | heuristic=heuristic, 23 | controller_class=controller_class, 24 | cacheable_methods=cacheable_methods, 25 | ) 26 | sess.mount("http://", adapter) 27 | sess.mount("https://", adapter) 28 | 29 | return sess 30 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/certifi/__init__.py: -------------------------------------------------------------------------------- 1 | from .core import contents, where 2 | 3 | __version__ = "2020.06.20" 4 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/certifi/__main__.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | from pip._vendor.certifi import contents, where 4 | 5 | parser = argparse.ArgumentParser() 6 | parser.add_argument("-c", "--contents", action="store_true") 7 | args = parser.parse_args() 8 | 9 | if args.contents: 10 | print(contents()) 11 | else: 12 | print(where()) 13 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/__init__.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # This library is free software; you can redistribute it and/or 3 | # modify it under the terms of the GNU Lesser General Public 4 | # License as published by the Free Software Foundation; either 5 | # version 2.1 of the License, or (at your option) any later version. 6 | # 7 | # This library is distributed in the hope that it will be useful, 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | # Lesser General Public License for more details. 11 | # 12 | # You should have received a copy of the GNU Lesser General Public 13 | # License along with this library; if not, write to the Free Software 14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 15 | # 02110-1301 USA 16 | ######################### END LICENSE BLOCK ######################### 17 | 18 | 19 | from .compat import PY2, PY3 20 | from .universaldetector import UniversalDetector 21 | from .version import __version__, VERSION 22 | 23 | 24 | def detect(byte_str): 25 | """ 26 | Detect the encoding of the given byte string. 27 | 28 | :param byte_str: The byte sequence to examine. 29 | :type byte_str: ``bytes`` or ``bytearray`` 30 | """ 31 | if not isinstance(byte_str, bytearray): 32 | if not isinstance(byte_str, bytes): 33 | raise TypeError('Expected object of type bytes or bytearray, got: ' 34 | '{0}'.format(type(byte_str))) 35 | else: 36 | byte_str = bytearray(byte_str) 37 | detector = UniversalDetector() 38 | detector.feed(byte_str) 39 | return detector.close() 40 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/big5prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Communicator client code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import Big5DistributionAnalysis 31 | from .mbcssm import BIG5_SM_MODEL 32 | 33 | 34 | class Big5Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | super(Big5Prober, self).__init__() 37 | self.coding_sm = CodingStateMachine(BIG5_SM_MODEL) 38 | self.distribution_analyzer = Big5DistributionAnalysis() 39 | self.reset() 40 | 41 | @property 42 | def charset_name(self): 43 | return "Big5" 44 | 45 | @property 46 | def language(self): 47 | return "Chinese" 48 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/cli/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/compat.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # Contributor(s): 3 | # Dan Blanchard 4 | # Ian Cordasco 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU Lesser General Public 17 | # License along with this library; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 19 | # 02110-1301 USA 20 | ######################### END LICENSE BLOCK ######################### 21 | 22 | import sys 23 | 24 | 25 | if sys.version_info < (3, 0): 26 | PY2 = True 27 | PY3 = False 28 | base_str = (str, unicode) 29 | text_type = unicode 30 | else: 31 | PY2 = False 32 | PY3 = True 33 | base_str = (bytes, str) 34 | text_type = str 35 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/cp949prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .chardistribution import EUCKRDistributionAnalysis 29 | from .codingstatemachine import CodingStateMachine 30 | from .mbcharsetprober import MultiByteCharSetProber 31 | from .mbcssm import CP949_SM_MODEL 32 | 33 | 34 | class CP949Prober(MultiByteCharSetProber): 35 | def __init__(self): 36 | super(CP949Prober, self).__init__() 37 | self.coding_sm = CodingStateMachine(CP949_SM_MODEL) 38 | # NOTE: CP949 is a superset of EUC-KR, so the distribution should be 39 | # not different. 40 | self.distribution_analyzer = EUCKRDistributionAnalysis() 41 | self.reset() 42 | 43 | @property 44 | def charset_name(self): 45 | return "CP949" 46 | 47 | @property 48 | def language(self): 49 | return "Korean" 50 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/enums.py: -------------------------------------------------------------------------------- 1 | """ 2 | All of the Enums that are used throughout the chardet package. 3 | 4 | :author: Dan Blanchard (dan.blanchard@gmail.com) 5 | """ 6 | 7 | 8 | class InputState(object): 9 | """ 10 | This enum represents the different states a universal detector can be in. 11 | """ 12 | PURE_ASCII = 0 13 | ESC_ASCII = 1 14 | HIGH_BYTE = 2 15 | 16 | 17 | class LanguageFilter(object): 18 | """ 19 | This enum represents the different language filters we can apply to a 20 | ``UniversalDetector``. 21 | """ 22 | CHINESE_SIMPLIFIED = 0x01 23 | CHINESE_TRADITIONAL = 0x02 24 | JAPANESE = 0x04 25 | KOREAN = 0x08 26 | NON_CJK = 0x10 27 | ALL = 0x1F 28 | CHINESE = CHINESE_SIMPLIFIED | CHINESE_TRADITIONAL 29 | CJK = CHINESE | JAPANESE | KOREAN 30 | 31 | 32 | class ProbingState(object): 33 | """ 34 | This enum represents the different states a prober can be in. 35 | """ 36 | DETECTING = 0 37 | FOUND_IT = 1 38 | NOT_ME = 2 39 | 40 | 41 | class MachineState(object): 42 | """ 43 | This enum represents the different states a state machine can be in. 44 | """ 45 | START = 0 46 | ERROR = 1 47 | ITS_ME = 2 48 | 49 | 50 | class SequenceLikelihood(object): 51 | """ 52 | This enum represents the likelihood of a character following the previous one. 53 | """ 54 | NEGATIVE = 0 55 | UNLIKELY = 1 56 | LIKELY = 2 57 | POSITIVE = 3 58 | 59 | @classmethod 60 | def get_num_categories(cls): 61 | """:returns: The number of likelihood categories in the enum.""" 62 | return 4 63 | 64 | 65 | class CharacterCategory(object): 66 | """ 67 | This enum represents the different categories language models for 68 | ``SingleByteCharsetProber`` put characters into. 69 | 70 | Anything less than CONTROL is considered a letter. 71 | """ 72 | UNDEFINED = 255 73 | LINE_BREAK = 254 74 | SYMBOL = 253 75 | DIGIT = 252 76 | CONTROL = 251 77 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/euckrprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCKRDistributionAnalysis 31 | from .mbcssm import EUCKR_SM_MODEL 32 | 33 | 34 | class EUCKRProber(MultiByteCharSetProber): 35 | def __init__(self): 36 | super(EUCKRProber, self).__init__() 37 | self.coding_sm = CodingStateMachine(EUCKR_SM_MODEL) 38 | self.distribution_analyzer = EUCKRDistributionAnalysis() 39 | self.reset() 40 | 41 | @property 42 | def charset_name(self): 43 | return "EUC-KR" 44 | 45 | @property 46 | def language(self): 47 | return "Korean" 48 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/euctwprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import EUCTWDistributionAnalysis 31 | from .mbcssm import EUCTW_SM_MODEL 32 | 33 | class EUCTWProber(MultiByteCharSetProber): 34 | def __init__(self): 35 | super(EUCTWProber, self).__init__() 36 | self.coding_sm = CodingStateMachine(EUCTW_SM_MODEL) 37 | self.distribution_analyzer = EUCTWDistributionAnalysis() 38 | self.reset() 39 | 40 | @property 41 | def charset_name(self): 42 | return "EUC-TW" 43 | 44 | @property 45 | def language(self): 46 | return "Taiwan" 47 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/gb2312prober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is mozilla.org code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 1998 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # 12 | # This library is free software; you can redistribute it and/or 13 | # modify it under the terms of the GNU Lesser General Public 14 | # License as published by the Free Software Foundation; either 15 | # version 2.1 of the License, or (at your option) any later version. 16 | # 17 | # This library is distributed in the hope that it will be useful, 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 | # Lesser General Public License for more details. 21 | # 22 | # You should have received a copy of the GNU Lesser General Public 23 | # License along with this library; if not, write to the Free Software 24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25 | # 02110-1301 USA 26 | ######################### END LICENSE BLOCK ######################### 27 | 28 | from .mbcharsetprober import MultiByteCharSetProber 29 | from .codingstatemachine import CodingStateMachine 30 | from .chardistribution import GB2312DistributionAnalysis 31 | from .mbcssm import GB2312_SM_MODEL 32 | 33 | class GB2312Prober(MultiByteCharSetProber): 34 | def __init__(self): 35 | super(GB2312Prober, self).__init__() 36 | self.coding_sm = CodingStateMachine(GB2312_SM_MODEL) 37 | self.distribution_analyzer = GB2312DistributionAnalysis() 38 | self.reset() 39 | 40 | @property 41 | def charset_name(self): 42 | return "GB2312" 43 | 44 | @property 45 | def language(self): 46 | return "Chinese" 47 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/mbcsgroupprober.py: -------------------------------------------------------------------------------- 1 | ######################## BEGIN LICENSE BLOCK ######################## 2 | # The Original Code is Mozilla Universal charset detector code. 3 | # 4 | # The Initial Developer of the Original Code is 5 | # Netscape Communications Corporation. 6 | # Portions created by the Initial Developer are Copyright (C) 2001 7 | # the Initial Developer. All Rights Reserved. 8 | # 9 | # Contributor(s): 10 | # Mark Pilgrim - port to Python 11 | # Shy Shalom - original C code 12 | # Proofpoint, Inc. 13 | # 14 | # This library is free software; you can redistribute it and/or 15 | # modify it under the terms of the GNU Lesser General Public 16 | # License as published by the Free Software Foundation; either 17 | # version 2.1 of the License, or (at your option) any later version. 18 | # 19 | # This library is distributed in the hope that it will be useful, 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 22 | # Lesser General Public License for more details. 23 | # 24 | # You should have received a copy of the GNU Lesser General Public 25 | # License along with this library; if not, write to the Free Software 26 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 27 | # 02110-1301 USA 28 | ######################### END LICENSE BLOCK ######################### 29 | 30 | from .charsetgroupprober import CharSetGroupProber 31 | from .utf8prober import UTF8Prober 32 | from .sjisprober import SJISProber 33 | from .eucjpprober import EUCJPProber 34 | from .gb2312prober import GB2312Prober 35 | from .euckrprober import EUCKRProber 36 | from .cp949prober import CP949Prober 37 | from .big5prober import Big5Prober 38 | from .euctwprober import EUCTWProber 39 | 40 | 41 | class MBCSGroupProber(CharSetGroupProber): 42 | def __init__(self, lang_filter=None): 43 | super(MBCSGroupProber, self).__init__(lang_filter=lang_filter) 44 | self.probers = [ 45 | UTF8Prober(), 46 | SJISProber(), 47 | EUCJPProber(), 48 | GB2312Prober(), 49 | EUCKRProber(), 50 | CP949Prober(), 51 | Big5Prober(), 52 | EUCTWProber() 53 | ] 54 | self.reset() 55 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/chardet/version.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module exists only to simplify retrieving the version number of chardet 3 | from within setup.py and from chardet subpackages. 4 | 5 | :author: Dan Blanchard (dan.blanchard@gmail.com) 6 | """ 7 | 8 | __version__ = "3.0.4" 9 | VERSION = __version__.split('.') 10 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/colorama/__init__.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | from .initialise import init, deinit, reinit, colorama_text 3 | from .ansi import Fore, Back, Style, Cursor 4 | from .ansitowin32 import AnsiToWin32 5 | 6 | __version__ = '0.4.3' 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/colorama/initialise.py: -------------------------------------------------------------------------------- 1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. 2 | import atexit 3 | import contextlib 4 | import sys 5 | 6 | from .ansitowin32 import AnsiToWin32 7 | 8 | 9 | orig_stdout = None 10 | orig_stderr = None 11 | 12 | wrapped_stdout = None 13 | wrapped_stderr = None 14 | 15 | atexit_done = False 16 | 17 | 18 | def reset_all(): 19 | if AnsiToWin32 is not None: # Issue #74: objects might become None at exit 20 | AnsiToWin32(orig_stdout).reset_all() 21 | 22 | 23 | def init(autoreset=False, convert=None, strip=None, wrap=True): 24 | 25 | if not wrap and any([autoreset, convert, strip]): 26 | raise ValueError('wrap=False conflicts with any other arg=True') 27 | 28 | global wrapped_stdout, wrapped_stderr 29 | global orig_stdout, orig_stderr 30 | 31 | orig_stdout = sys.stdout 32 | orig_stderr = sys.stderr 33 | 34 | if sys.stdout is None: 35 | wrapped_stdout = None 36 | else: 37 | sys.stdout = wrapped_stdout = \ 38 | wrap_stream(orig_stdout, convert, strip, autoreset, wrap) 39 | if sys.stderr is None: 40 | wrapped_stderr = None 41 | else: 42 | sys.stderr = wrapped_stderr = \ 43 | wrap_stream(orig_stderr, convert, strip, autoreset, wrap) 44 | 45 | global atexit_done 46 | if not atexit_done: 47 | atexit.register(reset_all) 48 | atexit_done = True 49 | 50 | 51 | def deinit(): 52 | if orig_stdout is not None: 53 | sys.stdout = orig_stdout 54 | if orig_stderr is not None: 55 | sys.stderr = orig_stderr 56 | 57 | 58 | @contextlib.contextmanager 59 | def colorama_text(*args, **kwargs): 60 | init(*args, **kwargs) 61 | try: 62 | yield 63 | finally: 64 | deinit() 65 | 66 | 67 | def reinit(): 68 | if wrapped_stdout is not None: 69 | sys.stdout = wrapped_stdout 70 | if wrapped_stderr is not None: 71 | sys.stderr = wrapped_stderr 72 | 73 | 74 | def wrap_stream(stream, convert, strip, autoreset, wrap): 75 | if wrap: 76 | wrapper = AnsiToWin32(stream, 77 | convert=convert, strip=strip, autoreset=autoreset) 78 | if wrapper.should_wrap(): 79 | stream = wrapper.stream 80 | return stream 81 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2012-2019 Vinay Sajip. 4 | # Licensed to the Python Software Foundation under a contributor agreement. 5 | # See LICENSE.txt and CONTRIBUTORS.txt. 6 | # 7 | import logging 8 | 9 | __version__ = '0.3.1' 10 | 11 | class DistlibException(Exception): 12 | pass 13 | 14 | try: 15 | from logging import NullHandler 16 | except ImportError: # pragma: no cover 17 | class NullHandler(logging.Handler): 18 | def handle(self, record): pass 19 | def emit(self, record): pass 20 | def createLock(self): self.lock = None 21 | 22 | logger = logging.getLogger(__name__) 23 | logger.addHandler(NullHandler()) 24 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/__init__.py: -------------------------------------------------------------------------------- 1 | """Modules copied from Python 3 standard libraries, for internal use only. 2 | 3 | Individual classes and functions are found in d2._backport.misc. Intended 4 | usage is to always import things missing from 3.1 from that module: the 5 | built-in/stdlib objects will be used if found. 6 | """ 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/misc.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright (C) 2012 The Python Software Foundation. 4 | # See LICENSE.txt and CONTRIBUTORS.txt. 5 | # 6 | """Backports for individual classes and functions.""" 7 | 8 | import os 9 | import sys 10 | 11 | __all__ = ['cache_from_source', 'callable', 'fsencode'] 12 | 13 | 14 | try: 15 | from imp import cache_from_source 16 | except ImportError: 17 | def cache_from_source(py_file, debug=__debug__): 18 | ext = debug and 'c' or 'o' 19 | return py_file + ext 20 | 21 | 22 | try: 23 | callable = callable 24 | except NameError: 25 | from collections import Callable 26 | 27 | def callable(obj): 28 | return isinstance(obj, Callable) 29 | 30 | 31 | try: 32 | fsencode = os.fsencode 33 | except AttributeError: 34 | def fsencode(filename): 35 | if isinstance(filename, bytes): 36 | return filename 37 | elif isinstance(filename, str): 38 | return filename.encode(sys.getfilesystemencoding()) 39 | else: 40 | raise TypeError("expect bytes or str, not %s" % 41 | type(filename).__name__) 42 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/t32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/distlib/t32.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/t64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/distlib/t64.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/w32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/distlib/w32.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/distlib/w64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/distlib/w64.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | HTML parsing library based on the `WHATWG HTML specification 3 | `_. The parser is designed to be compatible with 4 | existing HTML found in the wild and implements well-defined error recovery that 5 | is largely compatible with modern desktop web browsers. 6 | 7 | Example usage:: 8 | 9 | from pip._vendor import html5lib 10 | with open("my_document.html", "rb") as f: 11 | tree = html5lib.parse(f) 12 | 13 | For convenience, this module re-exports the following names: 14 | 15 | * :func:`~.html5parser.parse` 16 | * :func:`~.html5parser.parseFragment` 17 | * :class:`~.html5parser.HTMLParser` 18 | * :func:`~.treebuilders.getTreeBuilder` 19 | * :func:`~.treewalkers.getTreeWalker` 20 | * :func:`~.serializer.serialize` 21 | """ 22 | 23 | from __future__ import absolute_import, division, unicode_literals 24 | 25 | from .html5parser import HTMLParser, parse, parseFragment 26 | from .treebuilders import getTreeBuilder 27 | from .treewalkers import getTreeWalker 28 | from .serializer import serialize 29 | 30 | __all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder", 31 | "getTreeWalker", "serialize"] 32 | 33 | # this has to be at the top level, see how setup.py parses this 34 | #: Distribution version number. 35 | __version__ = "1.1" 36 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/_trie/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | from .py import Trie 4 | 5 | __all__ = ["Trie"] 6 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/_trie/_base.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | try: 4 | from collections.abc import Mapping 5 | except ImportError: # Python 2.7 6 | from collections import Mapping 7 | 8 | 9 | class Trie(Mapping): 10 | """Abstract base class for tries""" 11 | 12 | def keys(self, prefix=None): 13 | # pylint:disable=arguments-differ 14 | keys = super(Trie, self).keys() 15 | 16 | if prefix is None: 17 | return set(keys) 18 | 19 | return {x for x in keys if x.startswith(prefix)} 20 | 21 | def has_keys_with_prefix(self, prefix): 22 | for key in self.keys(): 23 | if key.startswith(prefix): 24 | return True 25 | 26 | return False 27 | 28 | def longest_prefix(self, prefix): 29 | if prefix in self: 30 | return prefix 31 | 32 | for i in range(1, len(prefix) + 1): 33 | if prefix[:-i] in self: 34 | return prefix[:-i] 35 | 36 | raise KeyError(prefix) 37 | 38 | def longest_prefix_item(self, prefix): 39 | lprefix = self.longest_prefix(prefix) 40 | return (lprefix, self[lprefix]) 41 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/_trie/py.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | from pip._vendor.six import text_type 3 | 4 | from bisect import bisect_left 5 | 6 | from ._base import Trie as ABCTrie 7 | 8 | 9 | class Trie(ABCTrie): 10 | def __init__(self, data): 11 | if not all(isinstance(x, text_type) for x in data.keys()): 12 | raise TypeError("All keys must be strings") 13 | 14 | self._data = data 15 | self._keys = sorted(data.keys()) 16 | self._cachestr = "" 17 | self._cachepoints = (0, len(data)) 18 | 19 | def __contains__(self, key): 20 | return key in self._data 21 | 22 | def __len__(self): 23 | return len(self._data) 24 | 25 | def __iter__(self): 26 | return iter(self._data) 27 | 28 | def __getitem__(self, key): 29 | return self._data[key] 30 | 31 | def keys(self, prefix=None): 32 | if prefix is None or prefix == "" or not self._keys: 33 | return set(self._keys) 34 | 35 | if prefix.startswith(self._cachestr): 36 | lo, hi = self._cachepoints 37 | start = i = bisect_left(self._keys, prefix, lo, hi) 38 | else: 39 | start = i = bisect_left(self._keys, prefix) 40 | 41 | keys = set() 42 | if start == len(self._keys): 43 | return keys 44 | 45 | while self._keys[i].startswith(prefix): 46 | keys.add(self._keys[i]) 47 | i += 1 48 | 49 | self._cachestr = prefix 50 | self._cachepoints = (start, i) 51 | 52 | return keys 53 | 54 | def has_keys_with_prefix(self, prefix): 55 | if prefix in self._data: 56 | return True 57 | 58 | if prefix.startswith(self._cachestr): 59 | lo, hi = self._cachepoints 60 | i = bisect_left(self._keys, prefix, lo, hi) 61 | else: 62 | i = bisect_left(self._keys, prefix) 63 | 64 | if i == len(self._keys): 65 | return False 66 | 67 | return self._keys[i].startswith(prefix) 68 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | from . import base 4 | 5 | from collections import OrderedDict 6 | 7 | 8 | def _attr_key(attr): 9 | """Return an appropriate key for an attribute for sorting 10 | 11 | Attributes have a namespace that can be either ``None`` or a string. We 12 | can't compare the two because they're different types, so we convert 13 | ``None`` to an empty string first. 14 | 15 | """ 16 | return (attr[0][0] or ''), attr[0][1] 17 | 18 | 19 | class Filter(base.Filter): 20 | """Alphabetizes attributes for elements""" 21 | def __iter__(self): 22 | for token in base.Filter.__iter__(self): 23 | if token["type"] in ("StartTag", "EmptyTag"): 24 | attrs = OrderedDict() 25 | for name, value in sorted(token["data"].items(), 26 | key=_attr_key): 27 | attrs[name] = value 28 | token["data"] = attrs 29 | yield token 30 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/base.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | 4 | class Filter(object): 5 | def __init__(self, source): 6 | self.source = source 7 | 8 | def __iter__(self): 9 | return iter(self.source) 10 | 11 | def __getattr__(self, name): 12 | return getattr(self.source, name) 13 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | import re 4 | 5 | from . import base 6 | from ..constants import rcdataElements, spaceCharacters 7 | spaceCharacters = "".join(spaceCharacters) 8 | 9 | SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) 10 | 11 | 12 | class Filter(base.Filter): 13 | """Collapses whitespace except in pre, textarea, and script elements""" 14 | spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements)) 15 | 16 | def __iter__(self): 17 | preserve = 0 18 | for token in base.Filter.__iter__(self): 19 | type = token["type"] 20 | if type == "StartTag" \ 21 | and (preserve or token["name"] in self.spacePreserveElements): 22 | preserve += 1 23 | 24 | elif type == "EndTag" and preserve: 25 | preserve -= 1 26 | 27 | elif not preserve and type == "SpaceCharacters" and token["data"]: 28 | # Test on token["data"] above to not introduce spaces where there were not 29 | token["data"] = " " 30 | 31 | elif not preserve and type == "Characters": 32 | token["data"] = collapse_spaces(token["data"]) 33 | 34 | yield token 35 | 36 | 37 | def collapse_spaces(text): 38 | return SPACES_REGEX.sub(' ', text) 39 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py: -------------------------------------------------------------------------------- 1 | """Tree adapters let you convert from one tree structure to another 2 | 3 | Example: 4 | 5 | .. code-block:: python 6 | 7 | from pip._vendor import html5lib 8 | from pip._vendor.html5lib.treeadapters import genshi 9 | 10 | doc = 'Hi!' 11 | treebuilder = html5lib.getTreeBuilder('etree') 12 | parser = html5lib.HTMLParser(tree=treebuilder) 13 | tree = parser.parse(doc) 14 | TreeWalker = html5lib.getTreeWalker('etree') 15 | 16 | genshi_tree = genshi.to_genshi(TreeWalker(tree)) 17 | 18 | """ 19 | from __future__ import absolute_import, division, unicode_literals 20 | 21 | from . import sax 22 | 23 | __all__ = ["sax"] 24 | 25 | try: 26 | from . import genshi # noqa 27 | except ImportError: 28 | pass 29 | else: 30 | __all__.append("genshi") 31 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | from genshi.core import QName, Attrs 4 | from genshi.core import START, END, TEXT, COMMENT, DOCTYPE 5 | 6 | 7 | def to_genshi(walker): 8 | """Convert a tree to a genshi tree 9 | 10 | :arg walker: the treewalker to use to walk the tree to convert it 11 | 12 | :returns: generator of genshi nodes 13 | 14 | """ 15 | text = [] 16 | for token in walker: 17 | type = token["type"] 18 | if type in ("Characters", "SpaceCharacters"): 19 | text.append(token["data"]) 20 | elif text: 21 | yield TEXT, "".join(text), (None, -1, -1) 22 | text = [] 23 | 24 | if type in ("StartTag", "EmptyTag"): 25 | if token["namespace"]: 26 | name = "{%s}%s" % (token["namespace"], token["name"]) 27 | else: 28 | name = token["name"] 29 | attrs = Attrs([(QName("{%s}%s" % attr if attr[0] is not None else attr[1]), value) 30 | for attr, value in token["data"].items()]) 31 | yield (START, (QName(name), attrs), (None, -1, -1)) 32 | if type == "EmptyTag": 33 | type = "EndTag" 34 | 35 | if type == "EndTag": 36 | if token["namespace"]: 37 | name = "{%s}%s" % (token["namespace"], token["name"]) 38 | else: 39 | name = token["name"] 40 | 41 | yield END, QName(name), (None, -1, -1) 42 | 43 | elif type == "Comment": 44 | yield COMMENT, token["data"], (None, -1, -1) 45 | 46 | elif type == "Doctype": 47 | yield DOCTYPE, (token["name"], token["publicId"], 48 | token["systemId"]), (None, -1, -1) 49 | 50 | else: 51 | pass # FIXME: What to do? 52 | 53 | if text: 54 | yield TEXT, "".join(text), (None, -1, -1) 55 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/treeadapters/sax.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | from xml.sax.xmlreader import AttributesNSImpl 4 | 5 | from ..constants import adjustForeignAttributes, unadjustForeignAttributes 6 | 7 | prefix_mapping = {} 8 | for prefix, localName, namespace in adjustForeignAttributes.values(): 9 | if prefix is not None: 10 | prefix_mapping[prefix] = namespace 11 | 12 | 13 | def to_sax(walker, handler): 14 | """Call SAX-like content handler based on treewalker walker 15 | 16 | :arg walker: the treewalker to use to walk the tree to convert it 17 | 18 | :arg handler: SAX handler to use 19 | 20 | """ 21 | handler.startDocument() 22 | for prefix, namespace in prefix_mapping.items(): 23 | handler.startPrefixMapping(prefix, namespace) 24 | 25 | for token in walker: 26 | type = token["type"] 27 | if type == "Doctype": 28 | continue 29 | elif type in ("StartTag", "EmptyTag"): 30 | attrs = AttributesNSImpl(token["data"], 31 | unadjustForeignAttributes) 32 | handler.startElementNS((token["namespace"], token["name"]), 33 | token["name"], 34 | attrs) 35 | if type == "EmptyTag": 36 | handler.endElementNS((token["namespace"], token["name"]), 37 | token["name"]) 38 | elif type == "EndTag": 39 | handler.endElementNS((token["namespace"], token["name"]), 40 | token["name"]) 41 | elif type in ("Characters", "SpaceCharacters"): 42 | handler.characters(token["data"]) 43 | elif type == "Comment": 44 | pass 45 | else: 46 | assert False, "Unknown token type" 47 | 48 | for prefix, namespace in prefix_mapping.items(): 49 | handler.endPrefixMapping(prefix) 50 | handler.endDocument() 51 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import, division, unicode_literals 2 | 3 | from xml.dom import Node 4 | 5 | from . import base 6 | 7 | 8 | class TreeWalker(base.NonRecursiveTreeWalker): 9 | def getNodeDetails(self, node): 10 | if node.nodeType == Node.DOCUMENT_TYPE_NODE: 11 | return base.DOCTYPE, node.name, node.publicId, node.systemId 12 | 13 | elif node.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE): 14 | return base.TEXT, node.nodeValue 15 | 16 | elif node.nodeType == Node.ELEMENT_NODE: 17 | attrs = {} 18 | for attr in list(node.attributes.keys()): 19 | attr = node.getAttributeNode(attr) 20 | if attr.namespaceURI: 21 | attrs[(attr.namespaceURI, attr.localName)] = attr.value 22 | else: 23 | attrs[(None, attr.name)] = attr.value 24 | return (base.ELEMENT, node.namespaceURI, node.nodeName, 25 | attrs, node.hasChildNodes()) 26 | 27 | elif node.nodeType == Node.COMMENT_NODE: 28 | return base.COMMENT, node.nodeValue 29 | 30 | elif node.nodeType in (Node.DOCUMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE): 31 | return (base.DOCUMENT,) 32 | 33 | else: 34 | return base.UNKNOWN, node.nodeType 35 | 36 | def getFirstChild(self, node): 37 | return node.firstChild 38 | 39 | def getNextSibling(self, node): 40 | return node.nextSibling 41 | 42 | def getParentNode(self, node): 43 | return node.parentNode 44 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/idna/__init__.py: -------------------------------------------------------------------------------- 1 | from .package_data import __version__ 2 | from .core import * 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/idna/compat.py: -------------------------------------------------------------------------------- 1 | from .core import * 2 | from .codec import * 3 | 4 | def ToASCII(label): 5 | return encode(label) 6 | 7 | def ToUnicode(label): 8 | return decode(label) 9 | 10 | def nameprep(s): 11 | raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol") 12 | 13 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/idna/intranges.py: -------------------------------------------------------------------------------- 1 | """ 2 | Given a list of integers, made up of (hopefully) a small number of long runs 3 | of consecutive integers, compute a representation of the form 4 | ((start1, end1), (start2, end2) ...). Then answer the question "was x present 5 | in the original list?" in time O(log(# runs)). 6 | """ 7 | 8 | import bisect 9 | 10 | def intranges_from_list(list_): 11 | """Represent a list of integers as a sequence of ranges: 12 | ((start_0, end_0), (start_1, end_1), ...), such that the original 13 | integers are exactly those x such that start_i <= x < end_i for some i. 14 | 15 | Ranges are encoded as single integers (start << 32 | end), not as tuples. 16 | """ 17 | 18 | sorted_list = sorted(list_) 19 | ranges = [] 20 | last_write = -1 21 | for i in range(len(sorted_list)): 22 | if i+1 < len(sorted_list): 23 | if sorted_list[i] == sorted_list[i+1]-1: 24 | continue 25 | current_range = sorted_list[last_write+1:i+1] 26 | ranges.append(_encode_range(current_range[0], current_range[-1] + 1)) 27 | last_write = i 28 | 29 | return tuple(ranges) 30 | 31 | def _encode_range(start, end): 32 | return (start << 32) | end 33 | 34 | def _decode_range(r): 35 | return (r >> 32), (r & ((1 << 32) - 1)) 36 | 37 | 38 | def intranges_contain(int_, ranges): 39 | """Determine if `int_` falls into one of the ranges in `ranges`.""" 40 | tuple_ = _encode_range(int_, 0) 41 | pos = bisect.bisect_left(ranges, tuple_) 42 | # we could be immediately ahead of a tuple (start, end) 43 | # with start < int_ <= end 44 | if pos > 0: 45 | left, right = _decode_range(ranges[pos-1]) 46 | if left <= int_ < right: 47 | return True 48 | # or we could be immediately behind a tuple (int_, end) 49 | if pos < len(ranges): 50 | left, _ = _decode_range(ranges[pos]) 51 | if left == int_: 52 | return True 53 | return False 54 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/idna/package_data.py: -------------------------------------------------------------------------------- 1 | __version__ = '2.10' 2 | 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/msgpack/__init__.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | from ._version import version 3 | from .exceptions import * 4 | from .ext import ExtType, Timestamp 5 | 6 | import os 7 | import sys 8 | 9 | 10 | if os.environ.get("MSGPACK_PUREPYTHON") or sys.version_info[0] == 2: 11 | from .fallback import Packer, unpackb, Unpacker 12 | else: 13 | try: 14 | from ._cmsgpack import Packer, unpackb, Unpacker 15 | except ImportError: 16 | from .fallback import Packer, unpackb, Unpacker 17 | 18 | 19 | def pack(o, stream, **kwargs): 20 | """ 21 | Pack object `o` and write it to `stream` 22 | 23 | See :class:`Packer` for options. 24 | """ 25 | packer = Packer(**kwargs) 26 | stream.write(packer.pack(o)) 27 | 28 | 29 | def packb(o, **kwargs): 30 | """ 31 | Pack object `o` and return packed bytes 32 | 33 | See :class:`Packer` for options. 34 | """ 35 | return Packer(**kwargs).pack(o) 36 | 37 | 38 | def unpack(stream, **kwargs): 39 | """ 40 | Unpack an object from `stream`. 41 | 42 | Raises `ExtraData` when `stream` contains extra bytes. 43 | See :class:`Unpacker` for options. 44 | """ 45 | data = stream.read() 46 | return unpackb(data, **kwargs) 47 | 48 | 49 | # alias for compatibility to simplejson/marshal/pickle. 50 | load = unpack 51 | loads = unpackb 52 | 53 | dump = pack 54 | dumps = packb 55 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/msgpack/_version.py: -------------------------------------------------------------------------------- 1 | version = (1, 0, 0) 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/msgpack/exceptions.py: -------------------------------------------------------------------------------- 1 | class UnpackException(Exception): 2 | """Base class for some exceptions raised while unpacking. 3 | 4 | NOTE: unpack may raise exception other than subclass of 5 | UnpackException. If you want to catch all error, catch 6 | Exception instead. 7 | """ 8 | 9 | 10 | class BufferFull(UnpackException): 11 | pass 12 | 13 | 14 | class OutOfData(UnpackException): 15 | pass 16 | 17 | 18 | class FormatError(ValueError, UnpackException): 19 | """Invalid msgpack format""" 20 | 21 | 22 | class StackError(ValueError, UnpackException): 23 | """Too nested""" 24 | 25 | 26 | # Deprecated. Use ValueError instead 27 | UnpackValueError = ValueError 28 | 29 | 30 | class ExtraData(UnpackValueError): 31 | """ExtraData is raised when there is trailing data. 32 | 33 | This exception is raised while only one-shot (not streaming) 34 | unpack. 35 | """ 36 | 37 | def __init__(self, unpacked, extra): 38 | self.unpacked = unpacked 39 | self.extra = extra 40 | 41 | def __str__(self): 42 | return "unpack(b) received extra data." 43 | 44 | 45 | # Deprecated. Use Exception instead to catch all exception during packing. 46 | PackException = Exception 47 | PackValueError = ValueError 48 | PackOverflowError = OverflowError 49 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/packaging/__about__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __all__ = [ 7 | "__title__", 8 | "__summary__", 9 | "__uri__", 10 | "__version__", 11 | "__author__", 12 | "__email__", 13 | "__license__", 14 | "__copyright__", 15 | ] 16 | 17 | __title__ = "packaging" 18 | __summary__ = "Core utilities for Python packages" 19 | __uri__ = "https://github.com/pypa/packaging" 20 | 21 | __version__ = "20.4" 22 | 23 | __author__ = "Donald Stufft and individual contributors" 24 | __email__ = "donald@stufft.io" 25 | 26 | __license__ = "BSD-2-Clause or Apache-2.0" 27 | __copyright__ = "Copyright 2014-2019 %s" % __author__ 28 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/packaging/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | from .__about__ import ( 7 | __author__, 8 | __copyright__, 9 | __email__, 10 | __license__, 11 | __summary__, 12 | __title__, 13 | __uri__, 14 | __version__, 15 | ) 16 | 17 | __all__ = [ 18 | "__title__", 19 | "__summary__", 20 | "__uri__", 21 | "__version__", 22 | "__author__", 23 | "__email__", 24 | "__license__", 25 | "__copyright__", 26 | ] 27 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/packaging/_compat.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | import sys 7 | 8 | from ._typing import TYPE_CHECKING 9 | 10 | if TYPE_CHECKING: # pragma: no cover 11 | from typing import Any, Dict, Tuple, Type 12 | 13 | 14 | PY2 = sys.version_info[0] == 2 15 | PY3 = sys.version_info[0] == 3 16 | 17 | # flake8: noqa 18 | 19 | if PY3: 20 | string_types = (str,) 21 | else: 22 | string_types = (basestring,) 23 | 24 | 25 | def with_metaclass(meta, *bases): 26 | # type: (Type[Any], Tuple[Type[Any], ...]) -> Any 27 | """ 28 | Create a base class with a metaclass. 29 | """ 30 | # This requires a bit of explanation: the basic idea is to make a dummy 31 | # metaclass for one level of class instantiation that replaces itself with 32 | # the actual metaclass. 33 | class metaclass(meta): # type: ignore 34 | def __new__(cls, name, this_bases, d): 35 | # type: (Type[Any], str, Tuple[Any], Dict[Any, Any]) -> Any 36 | return meta(name, bases, d) 37 | 38 | return type.__new__(metaclass, "temporary_class", (), {}) 39 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/packaging/_typing.py: -------------------------------------------------------------------------------- 1 | """For neatly implementing static typing in packaging. 2 | 3 | `mypy` - the static type analysis tool we use - uses the `typing` module, which 4 | provides core functionality fundamental to mypy's functioning. 5 | 6 | Generally, `typing` would be imported at runtime and used in that fashion - 7 | it acts as a no-op at runtime and does not have any run-time overhead by 8 | design. 9 | 10 | As it turns out, `typing` is not vendorable - it uses separate sources for 11 | Python 2/Python 3. Thus, this codebase can not expect it to be present. 12 | To work around this, mypy allows the typing import to be behind a False-y 13 | optional to prevent it from running at runtime and type-comments can be used 14 | to remove the need for the types to be accessible directly during runtime. 15 | 16 | This module provides the False-y guard in a nicely named fashion so that a 17 | curious maintainer can reach here to read this. 18 | 19 | In packaging, all static-typing related imports should be guarded as follows: 20 | 21 | from pip._vendor.packaging._typing import TYPE_CHECKING 22 | 23 | if TYPE_CHECKING: 24 | from typing import ... 25 | 26 | Ref: https://github.com/python/mypy/issues/3216 27 | """ 28 | 29 | __all__ = ["TYPE_CHECKING", "cast"] 30 | 31 | # The TYPE_CHECKING constant defined by the typing module is False at runtime 32 | # but True while type checking. 33 | if False: # pragma: no cover 34 | from typing import TYPE_CHECKING 35 | else: 36 | TYPE_CHECKING = False 37 | 38 | # typing's cast syntax requires calling typing.cast at runtime, but we don't 39 | # want to import typing at runtime. Here, we inform the type checkers that 40 | # we're importing `typing.cast` as `cast` and re-implement typing.cast's 41 | # runtime behavior in a block that is ignored by type checkers. 42 | if TYPE_CHECKING: # pragma: no cover 43 | # not executed at runtime 44 | from typing import cast 45 | else: 46 | # executed at runtime 47 | def cast(type_, value): # noqa 48 | return value 49 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/packaging/utils.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | import re 7 | 8 | from ._typing import TYPE_CHECKING, cast 9 | from .version import InvalidVersion, Version 10 | 11 | if TYPE_CHECKING: # pragma: no cover 12 | from typing import NewType, Union 13 | 14 | NormalizedName = NewType("NormalizedName", str) 15 | 16 | _canonicalize_regex = re.compile(r"[-_.]+") 17 | 18 | 19 | def canonicalize_name(name): 20 | # type: (str) -> NormalizedName 21 | # This is taken from PEP 503. 22 | value = _canonicalize_regex.sub("-", name).lower() 23 | return cast("NormalizedName", value) 24 | 25 | 26 | def canonicalize_version(_version): 27 | # type: (str) -> Union[Version, str] 28 | """ 29 | This is very similar to Version.__str__, but has one subtle difference 30 | with the way it handles the release segment. 31 | """ 32 | 33 | try: 34 | version = Version(_version) 35 | except InvalidVersion: 36 | # Legacy versions cannot be normalized 37 | return _version 38 | 39 | parts = [] 40 | 41 | # Epoch 42 | if version.epoch != 0: 43 | parts.append("{0}!".format(version.epoch)) 44 | 45 | # Release segment 46 | # NB: This strips trailing '.0's to normalize 47 | parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in version.release))) 48 | 49 | # Pre-release 50 | if version.pre is not None: 51 | parts.append("".join(str(x) for x in version.pre)) 52 | 53 | # Post-release 54 | if version.post is not None: 55 | parts.append(".post{0}".format(version.post)) 56 | 57 | # Development release 58 | if version.dev is not None: 59 | parts.append(".dev{0}".format(version.dev)) 60 | 61 | # Local version segment 62 | if version.local is not None: 63 | parts.append("+{0}".format(version.local)) 64 | 65 | return "".join(parts) 66 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/pep517/__init__.py: -------------------------------------------------------------------------------- 1 | """Wrappers to build Python packages using PEP 517 hooks 2 | """ 3 | 4 | __version__ = '0.8.2' 5 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/pep517/compat.py: -------------------------------------------------------------------------------- 1 | """Python 2/3 compatibility""" 2 | import json 3 | import sys 4 | 5 | 6 | # Handle reading and writing JSON in UTF-8, on Python 3 and 2. 7 | 8 | if sys.version_info[0] >= 3: 9 | # Python 3 10 | def write_json(obj, path, **kwargs): 11 | with open(path, 'w', encoding='utf-8') as f: 12 | json.dump(obj, f, **kwargs) 13 | 14 | def read_json(path): 15 | with open(path, 'r', encoding='utf-8') as f: 16 | return json.load(f) 17 | 18 | else: 19 | # Python 2 20 | def write_json(obj, path, **kwargs): 21 | with open(path, 'wb') as f: 22 | json.dump(obj, f, encoding='utf-8', **kwargs) 23 | 24 | def read_json(path): 25 | with open(path, 'rb') as f: 26 | return json.load(f) 27 | 28 | 29 | # FileNotFoundError 30 | 31 | try: 32 | FileNotFoundError = FileNotFoundError 33 | except NameError: 34 | FileNotFoundError = IOError 35 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/pep517/dirtools.py: -------------------------------------------------------------------------------- 1 | import os 2 | import io 3 | import contextlib 4 | import tempfile 5 | import shutil 6 | import errno 7 | import zipfile 8 | 9 | 10 | @contextlib.contextmanager 11 | def tempdir(): 12 | """Create a temporary directory in a context manager.""" 13 | td = tempfile.mkdtemp() 14 | try: 15 | yield td 16 | finally: 17 | shutil.rmtree(td) 18 | 19 | 20 | def mkdir_p(*args, **kwargs): 21 | """Like `mkdir`, but does not raise an exception if the 22 | directory already exists. 23 | """ 24 | try: 25 | return os.mkdir(*args, **kwargs) 26 | except OSError as exc: 27 | if exc.errno != errno.EEXIST: 28 | raise 29 | 30 | 31 | def dir_to_zipfile(root): 32 | """Construct an in-memory zip file for a directory.""" 33 | buffer = io.BytesIO() 34 | zip_file = zipfile.ZipFile(buffer, 'w') 35 | for root, dirs, files in os.walk(root): 36 | for path in dirs: 37 | fs_path = os.path.join(root, path) 38 | rel_path = os.path.relpath(fs_path, root) 39 | zip_file.writestr(rel_path + '/', '') 40 | for path in files: 41 | fs_path = os.path.join(root, path) 42 | rel_path = os.path.relpath(fs_path, root) 43 | zip_file.write(fs_path, rel_path) 44 | return zip_file 45 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/pkg_resources/py31compat.py: -------------------------------------------------------------------------------- 1 | import os 2 | import errno 3 | import sys 4 | 5 | from pip._vendor import six 6 | 7 | 8 | def _makedirs_31(path, exist_ok=False): 9 | try: 10 | os.makedirs(path) 11 | except OSError as exc: 12 | if not exist_ok or exc.errno != errno.EEXIST: 13 | raise 14 | 15 | 16 | # rely on compatibility behavior until mode considerations 17 | # and exists_ok considerations are disentangled. 18 | # See https://github.com/pypa/setuptools/pull/1083#issuecomment-315168663 19 | needs_makedirs = ( 20 | six.PY2 or 21 | (3, 4) <= sys.version_info < (3, 4, 1) 22 | ) 23 | makedirs = _makedirs_31 if needs_makedirs else os.makedirs 24 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/progress/counter.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright (c) 2012 Giorgos Verigakis 4 | # 5 | # Permission to use, copy, modify, and distribute this software for any 6 | # purpose with or without fee is hereby granted, provided that the above 7 | # copyright notice and this permission notice appear in all copies. 8 | # 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | from __future__ import unicode_literals 18 | from . import Infinite, Progress 19 | 20 | 21 | class Counter(Infinite): 22 | def update(self): 23 | self.write(str(self.index)) 24 | 25 | 26 | class Countdown(Progress): 27 | def update(self): 28 | self.write(str(self.remaining)) 29 | 30 | 31 | class Stack(Progress): 32 | phases = (' ', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█') 33 | 34 | def update(self): 35 | nphases = len(self.phases) 36 | i = min(nphases - 1, int(self.progress * nphases)) 37 | self.write(self.phases[i]) 38 | 39 | 40 | class Pie(Stack): 41 | phases = ('○', '◔', '◑', '◕', '●') 42 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/progress/spinner.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright (c) 2012 Giorgos Verigakis 4 | # 5 | # Permission to use, copy, modify, and distribute this software for any 6 | # purpose with or without fee is hereby granted, provided that the above 7 | # copyright notice and this permission notice appear in all copies. 8 | # 9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | from __future__ import unicode_literals 18 | from . import Infinite 19 | 20 | 21 | class Spinner(Infinite): 22 | phases = ('-', '\\', '|', '/') 23 | hide_cursor = True 24 | 25 | def update(self): 26 | i = self.index % len(self.phases) 27 | self.write(self.phases[i]) 28 | 29 | 30 | class PieSpinner(Spinner): 31 | phases = ['◷', '◶', '◵', '◴'] 32 | 33 | 34 | class MoonSpinner(Spinner): 35 | phases = ['◑', '◒', '◐', '◓'] 36 | 37 | 38 | class LineSpinner(Spinner): 39 | phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻'] 40 | 41 | 42 | class PixelSpinner(Spinner): 43 | phases = ['⣾', '⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽'] 44 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/requests/__version__.py: -------------------------------------------------------------------------------- 1 | # .-. .-. .-. . . .-. .-. .-. .-. 2 | # |( |- |.| | | |- `-. | `-. 3 | # ' ' `-' `-`.`-' `-' `-' ' `-' 4 | 5 | __title__ = 'requests' 6 | __description__ = 'Python HTTP for Humans.' 7 | __url__ = 'https://requests.readthedocs.io' 8 | __version__ = '2.24.0' 9 | __build__ = 0x022400 10 | __author__ = 'Kenneth Reitz' 11 | __author_email__ = 'me@kennethreitz.org' 12 | __license__ = 'Apache 2.0' 13 | __copyright__ = 'Copyright 2020 Kenneth Reitz' 14 | __cake__ = u'\u2728 \U0001f370 \u2728' 15 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/requests/_internal_utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests._internal_utils 5 | ~~~~~~~~~~~~~~ 6 | 7 | Provides utility functions that are consumed internally by Requests 8 | which depend on extremely few external helpers (such as compat) 9 | """ 10 | 11 | from .compat import is_py2, builtin_str, str 12 | 13 | 14 | def to_native_string(string, encoding='ascii'): 15 | """Given a string object, regardless of type, returns a representation of 16 | that string in the native string type, encoding and decoding where 17 | necessary. This assumes ASCII unless told otherwise. 18 | """ 19 | if isinstance(string, builtin_str): 20 | out = string 21 | else: 22 | if is_py2: 23 | out = string.encode(encoding) 24 | else: 25 | out = string.decode(encoding) 26 | 27 | return out 28 | 29 | 30 | def unicode_is_ascii(u_string): 31 | """Determine if unicode string only contains ASCII characters. 32 | 33 | :param str u_string: unicode string to check. Must be unicode 34 | and not Python 2 `str`. 35 | :rtype: bool 36 | """ 37 | assert isinstance(u_string, str) 38 | try: 39 | u_string.encode('ascii') 40 | return True 41 | except UnicodeEncodeError: 42 | return False 43 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/requests/certs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | requests.certs 6 | ~~~~~~~~~~~~~~ 7 | 8 | This module returns the preferred default CA certificate bundle. There is 9 | only one — the one from the certifi package. 10 | 11 | If you are packaging Requests, e.g., for a Linux distribution or a managed 12 | environment, you can change the definition of where() to return a separately 13 | packaged CA bundle. 14 | """ 15 | from pip._vendor.certifi import where 16 | 17 | if __name__ == '__main__': 18 | print(where()) 19 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/requests/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | requests.hooks 5 | ~~~~~~~~~~~~~~ 6 | 7 | This module provides the capabilities for the Requests hooks system. 8 | 9 | Available hooks: 10 | 11 | ``response``: 12 | The response generated from a Request. 13 | """ 14 | HOOKS = ['response'] 15 | 16 | 17 | def default_hooks(): 18 | return {event: [] for event in HOOKS} 19 | 20 | # TODO: response is the only one 21 | 22 | 23 | def dispatch_hook(key, hooks, hook_data, **kwargs): 24 | """Dispatches a hook dictionary on a given piece of data.""" 25 | hooks = hooks or {} 26 | hooks = hooks.get(key) 27 | if hooks: 28 | if hasattr(hooks, '__call__'): 29 | hooks = [hooks] 30 | for hook in hooks: 31 | _hook_data = hook(hook_data, **kwargs) 32 | if _hook_data is not None: 33 | hook_data = _hook_data 34 | return hook_data 35 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/requests/packages.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # This code exists for backwards compatibility reasons. 4 | # I don't like it either. Just look the other way. :) 5 | 6 | for package in ('urllib3', 'idna', 'chardet'): 7 | vendored_package = "pip._vendor." + package 8 | locals()[package] = __import__(vendored_package) 9 | # This traversal is apparently necessary such that the identities are 10 | # preserved (requests.packages.urllib3.* is urllib3.*) 11 | for mod in list(sys.modules): 12 | if mod == vendored_package or mod.startswith(vendored_package + '.'): 13 | unprefixed_mod = mod[len("pip._vendor."):] 14 | sys.modules['pip._vendor.requests.packages.' + unprefixed_mod] = sys.modules[mod] 15 | 16 | # Kinda cool, though, right? 17 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/resolvelib/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | "__version__", 3 | "AbstractProvider", 4 | "AbstractResolver", 5 | "BaseReporter", 6 | "InconsistentCandidate", 7 | "Resolver", 8 | "RequirementsConflicted", 9 | "ResolutionError", 10 | "ResolutionImpossible", 11 | "ResolutionTooDeep", 12 | ] 13 | 14 | __version__ = "0.4.0" 15 | 16 | 17 | from .providers import AbstractProvider, AbstractResolver 18 | from .reporters import BaseReporter 19 | from .resolvers import ( 20 | InconsistentCandidate, 21 | RequirementsConflicted, 22 | Resolver, 23 | ResolutionError, 24 | ResolutionImpossible, 25 | ResolutionTooDeep, 26 | ) 27 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/resolvelib/compat/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/resolvelib/compat/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py: -------------------------------------------------------------------------------- 1 | __all__ = ["Sequence"] 2 | 3 | try: 4 | from collections.abc import Sequence 5 | except ImportError: 6 | from collections import Sequence 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/resolvelib/reporters.py: -------------------------------------------------------------------------------- 1 | class BaseReporter(object): 2 | """Delegate class to provider progress reporting for the resolver. 3 | """ 4 | 5 | def starting(self): 6 | """Called before the resolution actually starts. 7 | """ 8 | 9 | def starting_round(self, index): 10 | """Called before each round of resolution starts. 11 | 12 | The index is zero-based. 13 | """ 14 | 15 | def ending_round(self, index, state): 16 | """Called before each round of resolution ends. 17 | 18 | This is NOT called if the resolution ends at this round. Use `ending` 19 | if you want to report finalization. The index is zero-based. 20 | """ 21 | 22 | def ending(self, state): 23 | """Called before the resolution ends successfully. 24 | """ 25 | 26 | def adding_requirement(self, requirement, parent): 27 | """Called when adding a new requirement into the resolve criteria. 28 | 29 | :param requirement: The additional requirement to be applied to filter 30 | the available candidaites. 31 | :param parent: The candidate that requires ``requirement`` as a 32 | dependency, or None if ``requirement`` is one of the root 33 | requirements passed in from ``Resolver.resolve()``. 34 | """ 35 | 36 | def backtracking(self, candidate): 37 | """Called when rejecting a candidate during backtracking. 38 | """ 39 | 40 | def pinning(self, candidate): 41 | """Called when adding a candidate to the potential solution. 42 | """ 43 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/resolvelib/structs.py: -------------------------------------------------------------------------------- 1 | class DirectedGraph(object): 2 | """A graph structure with directed edges. 3 | """ 4 | 5 | def __init__(self): 6 | self._vertices = set() 7 | self._forwards = {} # -> Set[] 8 | self._backwards = {} # -> Set[] 9 | 10 | def __iter__(self): 11 | return iter(self._vertices) 12 | 13 | def __len__(self): 14 | return len(self._vertices) 15 | 16 | def __contains__(self, key): 17 | return key in self._vertices 18 | 19 | def copy(self): 20 | """Return a shallow copy of this graph. 21 | """ 22 | other = DirectedGraph() 23 | other._vertices = set(self._vertices) 24 | other._forwards = {k: set(v) for k, v in self._forwards.items()} 25 | other._backwards = {k: set(v) for k, v in self._backwards.items()} 26 | return other 27 | 28 | def add(self, key): 29 | """Add a new vertex to the graph. 30 | """ 31 | if key in self._vertices: 32 | raise ValueError("vertex exists") 33 | self._vertices.add(key) 34 | self._forwards[key] = set() 35 | self._backwards[key] = set() 36 | 37 | def remove(self, key): 38 | """Remove a vertex from the graph, disconnecting all edges from/to it. 39 | """ 40 | self._vertices.remove(key) 41 | for f in self._forwards.pop(key): 42 | self._backwards[f].remove(key) 43 | for t in self._backwards.pop(key): 44 | self._forwards[t].remove(key) 45 | 46 | def connected(self, f, t): 47 | return f in self._backwards[t] and t in self._forwards[f] 48 | 49 | def connect(self, f, t): 50 | """Connect two existing vertices. 51 | 52 | Nothing happens if the vertices are already connected. 53 | """ 54 | if t not in self._vertices: 55 | raise KeyError(t) 56 | self._forwards[f].add(t) 57 | self._backwards[t].add(f) 58 | 59 | def iter_edges(self): 60 | for f, children in self._forwards.items(): 61 | for t in children: 62 | yield f, t 63 | 64 | def iter_children(self, key): 65 | return iter(self._forwards[key]) 66 | 67 | def iter_parents(self, key): 68 | return iter(self._backwards[key]) 69 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/toml/__init__.py: -------------------------------------------------------------------------------- 1 | """Python module which parses and emits TOML. 2 | 3 | Released under the MIT license. 4 | """ 5 | 6 | from pip._vendor.toml import encoder 7 | from pip._vendor.toml import decoder 8 | 9 | __version__ = "0.10.1" 10 | _spec_ = "0.5.0" 11 | 12 | load = decoder.load 13 | loads = decoder.loads 14 | TomlDecoder = decoder.TomlDecoder 15 | TomlDecodeError = decoder.TomlDecodeError 16 | TomlPreserveCommentDecoder = decoder.TomlPreserveCommentDecoder 17 | 18 | dump = encoder.dump 19 | dumps = encoder.dumps 20 | TomlEncoder = encoder.TomlEncoder 21 | TomlArraySeparatorEncoder = encoder.TomlArraySeparatorEncoder 22 | TomlPreserveInlineDictEncoder = encoder.TomlPreserveInlineDictEncoder 23 | TomlNumpyEncoder = encoder.TomlNumpyEncoder 24 | TomlPreserveCommentEncoder = encoder.TomlPreserveCommentEncoder 25 | TomlPathlibEncoder = encoder.TomlPathlibEncoder 26 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/toml/common.py: -------------------------------------------------------------------------------- 1 | # content after the \ 2 | escapes = ['0', 'b', 'f', 'n', 'r', 't', '"'] 3 | # What it should be replaced by 4 | escapedchars = ['\0', '\b', '\f', '\n', '\r', '\t', '\"'] 5 | # Used for substitution 6 | escape_to_escapedchars = dict(zip(_escapes, _escapedchars)) 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/toml/ordered.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | from pip._vendor.toml import TomlEncoder 3 | from pip._vendor.toml import TomlDecoder 4 | 5 | 6 | class TomlOrderedDecoder(TomlDecoder): 7 | 8 | def __init__(self): 9 | super(self.__class__, self).__init__(_dict=OrderedDict) 10 | 11 | 12 | class TomlOrderedEncoder(TomlEncoder): 13 | 14 | def __init__(self): 15 | super(self.__class__, self).__init__(_dict=OrderedDict) 16 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/toml/tz.py: -------------------------------------------------------------------------------- 1 | from datetime import tzinfo, timedelta 2 | 3 | 4 | class TomlTz(tzinfo): 5 | def __init__(self, toml_offset): 6 | if toml_offset == "Z": 7 | self._raw_offset = "+00:00" 8 | else: 9 | self._raw_offset = toml_offset 10 | self._sign = -1 if self._raw_offset[0] == '-' else 1 11 | self._hours = int(self._raw_offset[1:3]) 12 | self._minutes = int(self._raw_offset[4:6]) 13 | 14 | def tzname(self, dt): 15 | return "UTC" + self._raw_offset 16 | 17 | def utcoffset(self, dt): 18 | return self._sign * timedelta(hours=self._hours, minutes=self._minutes) 19 | 20 | def dst(self, dt): 21 | return timedelta(0) 22 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/urllib3/contrib/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py: -------------------------------------------------------------------------------- 1 | """ 2 | This module provides means to detect the App Engine environment. 3 | """ 4 | 5 | import os 6 | 7 | 8 | def is_appengine(): 9 | return is_local_appengine() or is_prod_appengine() 10 | 11 | 12 | def is_appengine_sandbox(): 13 | """Reports if the app is running in the first generation sandbox. 14 | 15 | The second generation runtimes are technically still in a sandbox, but it 16 | is much less restrictive, so generally you shouldn't need to check for it. 17 | see https://cloud.google.com/appengine/docs/standard/runtimes 18 | """ 19 | return is_appengine() and os.environ["APPENGINE_RUNTIME"] == "python27" 20 | 21 | 22 | def is_local_appengine(): 23 | return "APPENGINE_RUNTIME" in os.environ and os.environ.get( 24 | "SERVER_SOFTWARE", "" 25 | ).startswith("Development/") 26 | 27 | 28 | def is_prod_appengine(): 29 | return "APPENGINE_RUNTIME" in os.environ and os.environ.get( 30 | "SERVER_SOFTWARE", "" 31 | ).startswith("Google App Engine/") 32 | 33 | 34 | def is_prod_appengine_mvms(): 35 | """Deprecated.""" 36 | return False 37 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/packages/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | from . import ssl_match_hostname 4 | 5 | __all__ = ("ssl_match_hostname",) 6 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | backports.makefile 4 | ~~~~~~~~~~~~~~~~~~ 5 | 6 | Backports the Python 3 ``socket.makefile`` method for use with anything that 7 | wants to create a "fake" socket object. 8 | """ 9 | import io 10 | 11 | from socket import SocketIO 12 | 13 | 14 | def backport_makefile( 15 | self, mode="r", buffering=None, encoding=None, errors=None, newline=None 16 | ): 17 | """ 18 | Backport of ``socket.makefile`` from Python 3.5. 19 | """ 20 | if not set(mode) <= {"r", "w", "b"}: 21 | raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,)) 22 | writing = "w" in mode 23 | reading = "r" in mode or not writing 24 | assert reading or writing 25 | binary = "b" in mode 26 | rawmode = "" 27 | if reading: 28 | rawmode += "r" 29 | if writing: 30 | rawmode += "w" 31 | raw = SocketIO(self, rawmode) 32 | self._makefile_refs += 1 33 | if buffering is None: 34 | buffering = -1 35 | if buffering < 0: 36 | buffering = io.DEFAULT_BUFFER_SIZE 37 | if buffering == 0: 38 | if not binary: 39 | raise ValueError("unbuffered streams must be binary") 40 | return raw 41 | if reading and writing: 42 | buffer = io.BufferedRWPair(raw, raw, buffering) 43 | elif reading: 44 | buffer = io.BufferedReader(raw, buffering) 45 | else: 46 | assert writing 47 | buffer = io.BufferedWriter(raw, buffering) 48 | if binary: 49 | return buffer 50 | text = io.TextIOWrapper(buffer, encoding, errors, newline) 51 | text.mode = mode 52 | return text 53 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | try: 4 | # Our match_hostname function is the same as 3.5's, so we only want to 5 | # import the match_hostname function if it's at least that good. 6 | if sys.version_info < (3, 5): 7 | raise ImportError("Fallback to vendored code") 8 | 9 | from ssl import CertificateError, match_hostname 10 | except ImportError: 11 | try: 12 | # Backport of the function from a pypi module 13 | from backports.ssl_match_hostname import CertificateError, match_hostname 14 | except ImportError: 15 | # Our vendored copy 16 | from ._implementation import CertificateError, match_hostname 17 | 18 | # Not needed, but documenting what we provide. 19 | __all__ = ("CertificateError", "match_hostname") 20 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/util/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # For backwards compatibility, provide imports that used to be here. 4 | from .connection import is_connection_dropped 5 | from .request import make_headers 6 | from .response import is_fp_closed 7 | from .ssl_ import ( 8 | SSLContext, 9 | HAS_SNI, 10 | IS_PYOPENSSL, 11 | IS_SECURETRANSPORT, 12 | assert_fingerprint, 13 | resolve_cert_reqs, 14 | resolve_ssl_version, 15 | ssl_wrap_socket, 16 | PROTOCOL_TLS, 17 | ) 18 | from .timeout import current_time, Timeout 19 | 20 | from .retry import Retry 21 | from .url import get_host, parse_url, split_first, Url 22 | from .wait import wait_for_read, wait_for_write 23 | 24 | __all__ = ( 25 | "HAS_SNI", 26 | "IS_PYOPENSSL", 27 | "IS_SECURETRANSPORT", 28 | "SSLContext", 29 | "PROTOCOL_TLS", 30 | "Retry", 31 | "Timeout", 32 | "Url", 33 | "assert_fingerprint", 34 | "current_time", 35 | "is_connection_dropped", 36 | "is_fp_closed", 37 | "get_host", 38 | "parse_url", 39 | "make_headers", 40 | "resolve_cert_reqs", 41 | "resolve_ssl_version", 42 | "split_first", 43 | "ssl_wrap_socket", 44 | "wait_for_read", 45 | "wait_for_write", 46 | ) 47 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/urllib3/util/queue.py: -------------------------------------------------------------------------------- 1 | import collections 2 | from ..packages import six 3 | from ..packages.six.moves import queue 4 | 5 | if six.PY2: 6 | # Queue is imported for side effects on MS Windows. See issue #229. 7 | import Queue as _unused_module_Queue # noqa: F401 8 | 9 | 10 | class LifoQueue(queue.Queue): 11 | def _init(self, _): 12 | self.queue = collections.deque() 13 | 14 | def _qsize(self, len=len): 15 | return len(self.queue) 16 | 17 | def _put(self, item): 18 | self.queue.append(item) 19 | 20 | def _get(self): 21 | return self.queue.pop() 22 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/vendor.txt: -------------------------------------------------------------------------------- 1 | appdirs==1.4.4 2 | CacheControl==0.12.6 3 | colorama==0.4.3 4 | contextlib2==0.6.0.post1 5 | distlib==0.3.1 6 | distro==1.5.0 7 | html5lib==1.1 8 | ipaddress==1.0.23 # Only needed on 2.6 and 2.7 9 | msgpack==1.0.0 10 | packaging==20.4 11 | pep517==0.8.2 12 | progress==1.5 13 | pyparsing==2.4.7 14 | requests==2.24.0 15 | certifi==2020.06.20 16 | chardet==3.0.4 17 | idna==2.10 18 | urllib3==1.25.9 19 | resolvelib==0.4.0 20 | retrying==1.3.3 21 | setuptools==44.0.0 22 | six==1.15.0 23 | toml==0.10.1 24 | webencodings==0.5.1 25 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pip/_vendor/webencodings/mklabels.py: -------------------------------------------------------------------------------- 1 | """ 2 | 3 | webencodings.mklabels 4 | ~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | Regenarate the webencodings.labels module. 7 | 8 | :copyright: Copyright 2012 by Simon Sapin 9 | :license: BSD, see LICENSE for details. 10 | 11 | """ 12 | 13 | import json 14 | try: 15 | from urllib import urlopen 16 | except ImportError: 17 | from urllib.request import urlopen 18 | 19 | 20 | def assert_lower(string): 21 | assert string == string.lower() 22 | return string 23 | 24 | 25 | def generate(url): 26 | parts = ['''\ 27 | """ 28 | 29 | webencodings.labels 30 | ~~~~~~~~~~~~~~~~~~~ 31 | 32 | Map encoding labels to their name. 33 | 34 | :copyright: Copyright 2012 by Simon Sapin 35 | :license: BSD, see LICENSE for details. 36 | 37 | """ 38 | 39 | # XXX Do not edit! 40 | # This file is automatically generated by mklabels.py 41 | 42 | LABELS = { 43 | '''] 44 | labels = [ 45 | (repr(assert_lower(label)).lstrip('u'), 46 | repr(encoding['name']).lstrip('u')) 47 | for category in json.loads(urlopen(url).read().decode('ascii')) 48 | for encoding in category['encodings'] 49 | for label in encoding['labels']] 50 | max_len = max(len(label) for label, name in labels) 51 | parts.extend( 52 | ' %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name) 53 | for label, name in labels) 54 | parts.append('}') 55 | return ''.join(parts) 56 | 57 | 58 | if __name__ == '__main__': 59 | print(generate('http://encoding.spec.whatwg.org/encodings.json')) 60 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pkg_resources/_vendor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/pkg_resources/_vendor/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__about__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __all__ = [ 7 | "__title__", 8 | "__summary__", 9 | "__uri__", 10 | "__version__", 11 | "__author__", 12 | "__email__", 13 | "__license__", 14 | "__copyright__", 15 | ] 16 | 17 | __title__ = "packaging" 18 | __summary__ = "Core utilities for Python packages" 19 | __uri__ = "https://github.com/pypa/packaging" 20 | 21 | __version__ = "20.4" 22 | 23 | __author__ = "Donald Stufft and individual contributors" 24 | __email__ = "donald@stufft.io" 25 | 26 | __license__ = "BSD-2-Clause or Apache-2.0" 27 | __copyright__ = "Copyright 2014-2019 %s" % __author__ 28 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | from .__about__ import ( 7 | __author__, 8 | __copyright__, 9 | __email__, 10 | __license__, 11 | __summary__, 12 | __title__, 13 | __uri__, 14 | __version__, 15 | ) 16 | 17 | __all__ = [ 18 | "__title__", 19 | "__summary__", 20 | "__uri__", 21 | "__version__", 22 | "__author__", 23 | "__email__", 24 | "__license__", 25 | "__copyright__", 26 | ] 27 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_compat.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | import sys 7 | 8 | from ._typing import TYPE_CHECKING 9 | 10 | if TYPE_CHECKING: # pragma: no cover 11 | from typing import Any, Dict, Tuple, Type 12 | 13 | 14 | PY2 = sys.version_info[0] == 2 15 | PY3 = sys.version_info[0] == 3 16 | 17 | # flake8: noqa 18 | 19 | if PY3: 20 | string_types = (str,) 21 | else: 22 | string_types = (basestring,) 23 | 24 | 25 | def with_metaclass(meta, *bases): 26 | # type: (Type[Any], Tuple[Type[Any], ...]) -> Any 27 | """ 28 | Create a base class with a metaclass. 29 | """ 30 | # This requires a bit of explanation: the basic idea is to make a dummy 31 | # metaclass for one level of class instantiation that replaces itself with 32 | # the actual metaclass. 33 | class metaclass(meta): # type: ignore 34 | def __new__(cls, name, this_bases, d): 35 | # type: (Type[Any], str, Tuple[Any], Dict[Any, Any]) -> Any 36 | return meta(name, bases, d) 37 | 38 | return type.__new__(metaclass, "temporary_class", (), {}) 39 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/_typing.py: -------------------------------------------------------------------------------- 1 | """For neatly implementing static typing in packaging. 2 | 3 | `mypy` - the static type analysis tool we use - uses the `typing` module, which 4 | provides core functionality fundamental to mypy's functioning. 5 | 6 | Generally, `typing` would be imported at runtime and used in that fashion - 7 | it acts as a no-op at runtime and does not have any run-time overhead by 8 | design. 9 | 10 | As it turns out, `typing` is not vendorable - it uses separate sources for 11 | Python 2/Python 3. Thus, this codebase can not expect it to be present. 12 | To work around this, mypy allows the typing import to be behind a False-y 13 | optional to prevent it from running at runtime and type-comments can be used 14 | to remove the need for the types to be accessible directly during runtime. 15 | 16 | This module provides the False-y guard in a nicely named fashion so that a 17 | curious maintainer can reach here to read this. 18 | 19 | In packaging, all static-typing related imports should be guarded as follows: 20 | 21 | from packaging._typing import TYPE_CHECKING 22 | 23 | if TYPE_CHECKING: 24 | from typing import ... 25 | 26 | Ref: https://github.com/python/mypy/issues/3216 27 | """ 28 | 29 | __all__ = ["TYPE_CHECKING", "cast"] 30 | 31 | # The TYPE_CHECKING constant defined by the typing module is False at runtime 32 | # but True while type checking. 33 | if False: # pragma: no cover 34 | from typing import TYPE_CHECKING 35 | else: 36 | TYPE_CHECKING = False 37 | 38 | # typing's cast syntax requires calling typing.cast at runtime, but we don't 39 | # want to import typing at runtime. Here, we inform the type checkers that 40 | # we're importing `typing.cast` as `cast` and re-implement typing.cast's 41 | # runtime behavior in a block that is ignored by type checkers. 42 | if TYPE_CHECKING: # pragma: no cover 43 | # not executed at runtime 44 | from typing import cast 45 | else: 46 | # executed at runtime 47 | def cast(type_, value): # noqa 48 | return value 49 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/pkg_resources/_vendor/packaging/utils.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | import re 7 | 8 | from ._typing import TYPE_CHECKING, cast 9 | from .version import InvalidVersion, Version 10 | 11 | if TYPE_CHECKING: # pragma: no cover 12 | from typing import NewType, Union 13 | 14 | NormalizedName = NewType("NormalizedName", str) 15 | 16 | _canonicalize_regex = re.compile(r"[-_.]+") 17 | 18 | 19 | def canonicalize_name(name): 20 | # type: (str) -> NormalizedName 21 | # This is taken from PEP 503. 22 | value = _canonicalize_regex.sub("-", name).lower() 23 | return cast("NormalizedName", value) 24 | 25 | 26 | def canonicalize_version(_version): 27 | # type: (str) -> Union[Version, str] 28 | """ 29 | This is very similar to Version.__str__, but has one subtle difference 30 | with the way it handles the release segment. 31 | """ 32 | 33 | try: 34 | version = Version(_version) 35 | except InvalidVersion: 36 | # Legacy versions cannot be normalized 37 | return _version 38 | 39 | parts = [] 40 | 41 | # Epoch 42 | if version.epoch != 0: 43 | parts.append("{0}!".format(version.epoch)) 44 | 45 | # Release segment 46 | # NB: This strips trailing '.0's to normalize 47 | parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in version.release))) 48 | 49 | # Pre-release 50 | if version.pre is not None: 51 | parts.append("".join(str(x) for x in version.pre)) 52 | 53 | # Post-release 54 | if version.post is not None: 55 | parts.append(".post{0}".format(version.post)) 56 | 57 | # Development release 58 | if version.dev is not None: 59 | parts.append(".dev{0}".format(version.dev)) 60 | 61 | # Local version segment 62 | if version.local is not None: 63 | parts.append("+{0}".format(version.local)) 64 | 65 | return "".join(parts) 66 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools-50.3.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools-50.3.0.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2016 Jason R Coombs 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools-50.3.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | 6 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools-50.3.0.dist-info/dependency_links.txt: -------------------------------------------------------------------------------- 1 | https://files.pythonhosted.org/packages/source/c/certifi/certifi-2016.9.26.tar.gz#md5=baa81e951a29958563689d868ef1064d 2 | https://files.pythonhosted.org/packages/source/w/wincertstore/wincertstore-0.2.zip#md5=ae728f2f007185648d0c7a8679b361e2 3 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools-50.3.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | _distutils_hack 2 | easy_install 3 | pkg_resources 4 | setuptools 5 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools-50.3.0.dist-info/zip-safe: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_deprecation_warning.py: -------------------------------------------------------------------------------- 1 | class SetuptoolsDeprecationWarning(Warning): 2 | """ 3 | Base class for warning deprecations in ``setuptools`` 4 | 5 | This class is not derived from ``DeprecationWarning``, and as such is 6 | visible by default. 7 | """ 8 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/__init__.py: -------------------------------------------------------------------------------- 1 | """distutils 2 | 3 | The main package for the Python Module Distribution Utilities. Normally 4 | used from a setup script as 5 | 6 | from distutils.core import setup 7 | 8 | setup (...) 9 | """ 10 | 11 | import sys 12 | 13 | __version__ = sys.version[:sys.version.index(' ')] 14 | 15 | local = True 16 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/command/__init__.py: -------------------------------------------------------------------------------- 1 | """distutils.command 2 | 3 | Package containing implementation of all the standard Distutils 4 | commands.""" 5 | 6 | __all__ = ['build', 7 | 'build_py', 8 | 'build_ext', 9 | 'build_clib', 10 | 'build_scripts', 11 | 'clean', 12 | 'install', 13 | 'install_lib', 14 | 'install_headers', 15 | 'install_scripts', 16 | 'install_data', 17 | 'sdist', 18 | 'register', 19 | 'bdist', 20 | 'bdist_dumb', 21 | 'bdist_rpm', 22 | 'bdist_wininst', 23 | 'check', 24 | 'upload', 25 | # These two are reserved for future use: 26 | #'bdist_sdux', 27 | #'bdist_pkgtool', 28 | # Note: 29 | # bdist_packager is not included because it only provides 30 | # an abstract base class 31 | ] 32 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/command/install_headers.py: -------------------------------------------------------------------------------- 1 | """distutils.command.install_headers 2 | 3 | Implements the Distutils 'install_headers' command, to install C/C++ header 4 | files to the Python include directory.""" 5 | 6 | from distutils.core import Command 7 | 8 | 9 | # XXX force is never used 10 | class install_headers(Command): 11 | 12 | description = "install C/C++ header files" 13 | 14 | user_options = [('install-dir=', 'd', 15 | "directory to install header files to"), 16 | ('force', 'f', 17 | "force installation (overwrite existing files)"), 18 | ] 19 | 20 | boolean_options = ['force'] 21 | 22 | def initialize_options(self): 23 | self.install_dir = None 24 | self.force = 0 25 | self.outfiles = [] 26 | 27 | def finalize_options(self): 28 | self.set_undefined_options('install', 29 | ('install_headers', 'install_dir'), 30 | ('force', 'force')) 31 | 32 | 33 | def run(self): 34 | headers = self.distribution.headers 35 | if not headers: 36 | return 37 | 38 | self.mkpath(self.install_dir) 39 | for header in headers: 40 | (out, _) = self.copy_file(header, self.install_dir) 41 | self.outfiles.append(out) 42 | 43 | def get_inputs(self): 44 | return self.distribution.headers or [] 45 | 46 | def get_outputs(self): 47 | return self.outfiles 48 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/command/install_scripts.py: -------------------------------------------------------------------------------- 1 | """distutils.command.install_scripts 2 | 3 | Implements the Distutils 'install_scripts' command, for installing 4 | Python scripts.""" 5 | 6 | # contributed by Bastian Kleineidam 7 | 8 | import os 9 | from distutils.core import Command 10 | from distutils import log 11 | from stat import ST_MODE 12 | 13 | 14 | class install_scripts(Command): 15 | 16 | description = "install scripts (Python or otherwise)" 17 | 18 | user_options = [ 19 | ('install-dir=', 'd', "directory to install scripts to"), 20 | ('build-dir=','b', "build directory (where to install from)"), 21 | ('force', 'f', "force installation (overwrite existing files)"), 22 | ('skip-build', None, "skip the build steps"), 23 | ] 24 | 25 | boolean_options = ['force', 'skip-build'] 26 | 27 | def initialize_options(self): 28 | self.install_dir = None 29 | self.force = 0 30 | self.build_dir = None 31 | self.skip_build = None 32 | 33 | def finalize_options(self): 34 | self.set_undefined_options('build', ('build_scripts', 'build_dir')) 35 | self.set_undefined_options('install', 36 | ('install_scripts', 'install_dir'), 37 | ('force', 'force'), 38 | ('skip_build', 'skip_build'), 39 | ) 40 | 41 | def run(self): 42 | if not self.skip_build: 43 | self.run_command('build_scripts') 44 | self.outfiles = self.copy_tree(self.build_dir, self.install_dir) 45 | if os.name == 'posix': 46 | # Set the executable bits (owner, group, and world) on 47 | # all the scripts we just installed. 48 | for file in self.get_outputs(): 49 | if self.dry_run: 50 | log.info("changing mode of %s", file) 51 | else: 52 | mode = ((os.stat(file)[ST_MODE]) | 0o555) & 0o7777 53 | log.info("changing mode of %s to %o", file, mode) 54 | os.chmod(file, mode) 55 | 56 | def get_inputs(self): 57 | return self.distribution.scripts or [] 58 | 59 | def get_outputs(self): 60 | return self.outfiles or [] 61 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/command/py37compat.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | 4 | def _pythonlib_compat(): 5 | """ 6 | On Python 3.7 and earlier, distutils would include the Python 7 | library. See pypa/distutils#9. 8 | """ 9 | from distutils import sysconfig 10 | if not sysconfig.get_config_var('Py_ENABLED_SHARED'): 11 | return 12 | 13 | yield 'python{}.{}{}'.format( 14 | sys.hexversion >> 24, 15 | (sys.hexversion >> 16) & 0xff, 16 | sysconfig.get_config_var('ABIFLAGS'), 17 | ) 18 | 19 | 20 | def compose(f1, f2): 21 | return lambda *args, **kwargs: f1(f2(*args, **kwargs)) 22 | 23 | 24 | pythonlib = ( 25 | compose(list, _pythonlib_compat) 26 | if sys.version_info < (3, 8) 27 | and sys.platform != 'darwin' 28 | and sys.platform[:3] != 'aix' 29 | else list 30 | ) 31 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/debug.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | # If DISTUTILS_DEBUG is anything other than the empty string, we run in 4 | # debug mode. 5 | DEBUG = os.environ.get('DISTUTILS_DEBUG') 6 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/log.py: -------------------------------------------------------------------------------- 1 | """A simple log mechanism styled after PEP 282.""" 2 | 3 | # The class here is styled after PEP 282 so that it could later be 4 | # replaced with a standard Python logging implementation. 5 | 6 | DEBUG = 1 7 | INFO = 2 8 | WARN = 3 9 | ERROR = 4 10 | FATAL = 5 11 | 12 | import sys 13 | 14 | class Log: 15 | 16 | def __init__(self, threshold=WARN): 17 | self.threshold = threshold 18 | 19 | def _log(self, level, msg, args): 20 | if level not in (DEBUG, INFO, WARN, ERROR, FATAL): 21 | raise ValueError('%s wrong log level' % str(level)) 22 | 23 | if level >= self.threshold: 24 | if args: 25 | msg = msg % args 26 | if level in (WARN, ERROR, FATAL): 27 | stream = sys.stderr 28 | else: 29 | stream = sys.stdout 30 | try: 31 | stream.write('%s\n' % msg) 32 | except UnicodeEncodeError: 33 | # emulate backslashreplace error handler 34 | encoding = stream.encoding 35 | msg = msg.encode(encoding, "backslashreplace").decode(encoding) 36 | stream.write('%s\n' % msg) 37 | stream.flush() 38 | 39 | def log(self, level, msg, *args): 40 | self._log(level, msg, args) 41 | 42 | def debug(self, msg, *args): 43 | self._log(DEBUG, msg, args) 44 | 45 | def info(self, msg, *args): 46 | self._log(INFO, msg, args) 47 | 48 | def warn(self, msg, *args): 49 | self._log(WARN, msg, args) 50 | 51 | def error(self, msg, *args): 52 | self._log(ERROR, msg, args) 53 | 54 | def fatal(self, msg, *args): 55 | self._log(FATAL, msg, args) 56 | 57 | _global_log = Log() 58 | log = _global_log.log 59 | debug = _global_log.debug 60 | info = _global_log.info 61 | warn = _global_log.warn 62 | error = _global_log.error 63 | fatal = _global_log.fatal 64 | 65 | def set_threshold(level): 66 | # return the old threshold for use from tests 67 | old = _global_log.threshold 68 | _global_log.threshold = level 69 | return old 70 | 71 | def set_verbosity(v): 72 | if v <= 0: 73 | set_threshold(WARN) 74 | elif v == 1: 75 | set_threshold(INFO) 76 | elif v >= 2: 77 | set_threshold(DEBUG) 78 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/py35compat.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import subprocess 3 | 4 | 5 | def __optim_args_from_interpreter_flags(): 6 | """Return a list of command-line arguments reproducing the current 7 | optimization settings in sys.flags.""" 8 | args = [] 9 | value = sys.flags.optimize 10 | if value > 0: 11 | args.append("-" + "O" * value) 12 | return args 13 | 14 | 15 | _optim_args_from_interpreter_flags = getattr( 16 | subprocess, 17 | "_optim_args_from_interpreter_flags", 18 | __optim_args_from_interpreter_flags, 19 | ) 20 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_distutils/py38compat.py: -------------------------------------------------------------------------------- 1 | def aix_platform(osname, version, release): 2 | try: 3 | import _aix_support 4 | return _aix_support.aix_platform() 5 | except ImportError: 6 | pass 7 | return "%s-%s.%s" % (osname, version, release) 8 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_vendor/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/_vendor/__init__.py -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_vendor/packaging/__about__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | __all__ = [ 7 | "__title__", 8 | "__summary__", 9 | "__uri__", 10 | "__version__", 11 | "__author__", 12 | "__email__", 13 | "__license__", 14 | "__copyright__", 15 | ] 16 | 17 | __title__ = "packaging" 18 | __summary__ = "Core utilities for Python packages" 19 | __uri__ = "https://github.com/pypa/packaging" 20 | 21 | __version__ = "20.4" 22 | 23 | __author__ = "Donald Stufft and individual contributors" 24 | __email__ = "donald@stufft.io" 25 | 26 | __license__ = "BSD-2-Clause or Apache-2.0" 27 | __copyright__ = "Copyright 2014-2019 %s" % __author__ 28 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_vendor/packaging/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | from .__about__ import ( 7 | __author__, 8 | __copyright__, 9 | __email__, 10 | __license__, 11 | __summary__, 12 | __title__, 13 | __uri__, 14 | __version__, 15 | ) 16 | 17 | __all__ = [ 18 | "__title__", 19 | "__summary__", 20 | "__uri__", 21 | "__version__", 22 | "__author__", 23 | "__email__", 24 | "__license__", 25 | "__copyright__", 26 | ] 27 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_vendor/packaging/_compat.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | import sys 7 | 8 | from ._typing import TYPE_CHECKING 9 | 10 | if TYPE_CHECKING: # pragma: no cover 11 | from typing import Any, Dict, Tuple, Type 12 | 13 | 14 | PY2 = sys.version_info[0] == 2 15 | PY3 = sys.version_info[0] == 3 16 | 17 | # flake8: noqa 18 | 19 | if PY3: 20 | string_types = (str,) 21 | else: 22 | string_types = (basestring,) 23 | 24 | 25 | def with_metaclass(meta, *bases): 26 | # type: (Type[Any], Tuple[Type[Any], ...]) -> Any 27 | """ 28 | Create a base class with a metaclass. 29 | """ 30 | # This requires a bit of explanation: the basic idea is to make a dummy 31 | # metaclass for one level of class instantiation that replaces itself with 32 | # the actual metaclass. 33 | class metaclass(meta): # type: ignore 34 | def __new__(cls, name, this_bases, d): 35 | # type: (Type[Any], str, Tuple[Any], Dict[Any, Any]) -> Any 36 | return meta(name, bases, d) 37 | 38 | return type.__new__(metaclass, "temporary_class", (), {}) 39 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_vendor/packaging/_typing.py: -------------------------------------------------------------------------------- 1 | """For neatly implementing static typing in packaging. 2 | 3 | `mypy` - the static type analysis tool we use - uses the `typing` module, which 4 | provides core functionality fundamental to mypy's functioning. 5 | 6 | Generally, `typing` would be imported at runtime and used in that fashion - 7 | it acts as a no-op at runtime and does not have any run-time overhead by 8 | design. 9 | 10 | As it turns out, `typing` is not vendorable - it uses separate sources for 11 | Python 2/Python 3. Thus, this codebase can not expect it to be present. 12 | To work around this, mypy allows the typing import to be behind a False-y 13 | optional to prevent it from running at runtime and type-comments can be used 14 | to remove the need for the types to be accessible directly during runtime. 15 | 16 | This module provides the False-y guard in a nicely named fashion so that a 17 | curious maintainer can reach here to read this. 18 | 19 | In packaging, all static-typing related imports should be guarded as follows: 20 | 21 | from packaging._typing import TYPE_CHECKING 22 | 23 | if TYPE_CHECKING: 24 | from typing import ... 25 | 26 | Ref: https://github.com/python/mypy/issues/3216 27 | """ 28 | 29 | __all__ = ["TYPE_CHECKING", "cast"] 30 | 31 | # The TYPE_CHECKING constant defined by the typing module is False at runtime 32 | # but True while type checking. 33 | if False: # pragma: no cover 34 | from typing import TYPE_CHECKING 35 | else: 36 | TYPE_CHECKING = False 37 | 38 | # typing's cast syntax requires calling typing.cast at runtime, but we don't 39 | # want to import typing at runtime. Here, we inform the type checkers that 40 | # we're importing `typing.cast` as `cast` and re-implement typing.cast's 41 | # runtime behavior in a block that is ignored by type checkers. 42 | if TYPE_CHECKING: # pragma: no cover 43 | # not executed at runtime 44 | from typing import cast 45 | else: 46 | # executed at runtime 47 | def cast(type_, value): # noqa 48 | return value 49 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/_vendor/packaging/utils.py: -------------------------------------------------------------------------------- 1 | # This file is dual licensed under the terms of the Apache License, Version 2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository 3 | # for complete details. 4 | from __future__ import absolute_import, division, print_function 5 | 6 | import re 7 | 8 | from ._typing import TYPE_CHECKING, cast 9 | from .version import InvalidVersion, Version 10 | 11 | if TYPE_CHECKING: # pragma: no cover 12 | from typing import NewType, Union 13 | 14 | NormalizedName = NewType("NormalizedName", str) 15 | 16 | _canonicalize_regex = re.compile(r"[-_.]+") 17 | 18 | 19 | def canonicalize_name(name): 20 | # type: (str) -> NormalizedName 21 | # This is taken from PEP 503. 22 | value = _canonicalize_regex.sub("-", name).lower() 23 | return cast("NormalizedName", value) 24 | 25 | 26 | def canonicalize_version(_version): 27 | # type: (str) -> Union[Version, str] 28 | """ 29 | This is very similar to Version.__str__, but has one subtle difference 30 | with the way it handles the release segment. 31 | """ 32 | 33 | try: 34 | version = Version(_version) 35 | except InvalidVersion: 36 | # Legacy versions cannot be normalized 37 | return _version 38 | 39 | parts = [] 40 | 41 | # Epoch 42 | if version.epoch != 0: 43 | parts.append("{0}!".format(version.epoch)) 44 | 45 | # Release segment 46 | # NB: This strips trailing '.0's to normalize 47 | parts.append(re.sub(r"(\.0)+$", "", ".".join(str(x) for x in version.release))) 48 | 49 | # Pre-release 50 | if version.pre is not None: 51 | parts.append("".join(str(x) for x in version.pre)) 52 | 53 | # Post-release 54 | if version.post is not None: 55 | parts.append(".post{0}".format(version.post)) 56 | 57 | # Development release 58 | if version.dev is not None: 59 | parts.append(".dev{0}".format(version.dev)) 60 | 61 | # Local version segment 62 | if version.local is not None: 63 | parts.append("+{0}".format(version.local)) 64 | 65 | return "".join(parts) 66 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/cli-32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/cli-32.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/cli-64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/cli-64.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/cli.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/cli.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = [ 2 | 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 3 | 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 4 | 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', 5 | 'bdist_wininst', 'upload_docs', 'build_clib', 'dist_info', 6 | ] 7 | 8 | from distutils.command.bdist import bdist 9 | import sys 10 | 11 | from setuptools.command import install_scripts 12 | 13 | if 'egg' not in bdist.format_commands: 14 | bdist.format_command['egg'] = ('bdist_egg', "Python .egg file") 15 | bdist.format_commands.append('egg') 16 | 17 | del bdist, sys 18 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/bdist_rpm.py: -------------------------------------------------------------------------------- 1 | import distutils.command.bdist_rpm as orig 2 | 3 | 4 | class bdist_rpm(orig.bdist_rpm): 5 | """ 6 | Override the default bdist_rpm behavior to do the following: 7 | 8 | 1. Run egg_info to ensure the name and version are properly calculated. 9 | 2. Always run 'install' using --single-version-externally-managed to 10 | disable eggs in RPM distributions. 11 | """ 12 | 13 | def run(self): 14 | # ensure distro name is up-to-date 15 | self.run_command('egg_info') 16 | 17 | orig.bdist_rpm.run(self) 18 | 19 | def _make_spec_file(self): 20 | spec = orig.bdist_rpm._make_spec_file(self) 21 | spec = [ 22 | line.replace( 23 | "setup.py install ", 24 | "setup.py install --single-version-externally-managed " 25 | ).replace( 26 | "%setup", 27 | "%setup -n %{name}-%{unmangled_version}" 28 | ) 29 | for line in spec 30 | ] 31 | return spec 32 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/bdist_wininst.py: -------------------------------------------------------------------------------- 1 | import distutils.command.bdist_wininst as orig 2 | import warnings 3 | 4 | from setuptools import SetuptoolsDeprecationWarning 5 | 6 | 7 | class bdist_wininst(orig.bdist_wininst): 8 | def reinitialize_command(self, command, reinit_subcommands=0): 9 | """ 10 | Supplement reinitialize_command to work around 11 | http://bugs.python.org/issue20819 12 | """ 13 | cmd = self.distribution.reinitialize_command( 14 | command, reinit_subcommands) 15 | if command in ('install', 'install_lib'): 16 | cmd.install_lib = None 17 | return cmd 18 | 19 | def run(self): 20 | warnings.warn( 21 | "bdist_wininst is deprecated and will be removed in a future " 22 | "version. Use bdist_wheel (wheel packages) instead.", 23 | SetuptoolsDeprecationWarning 24 | ) 25 | 26 | self._is_running = True 27 | try: 28 | orig.bdist_wininst.run(self) 29 | finally: 30 | self._is_running = False 31 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/dist_info.py: -------------------------------------------------------------------------------- 1 | """ 2 | Create a dist_info directory 3 | As defined in the wheel specification 4 | """ 5 | 6 | import os 7 | 8 | from distutils.core import Command 9 | from distutils import log 10 | 11 | 12 | class dist_info(Command): 13 | 14 | description = 'create a .dist-info directory' 15 | 16 | user_options = [ 17 | ('egg-base=', 'e', "directory containing .egg-info directories" 18 | " (default: top of the source tree)"), 19 | ] 20 | 21 | def initialize_options(self): 22 | self.egg_base = None 23 | 24 | def finalize_options(self): 25 | pass 26 | 27 | def run(self): 28 | egg_info = self.get_finalized_command('egg_info') 29 | egg_info.egg_base = self.egg_base 30 | egg_info.finalize_options() 31 | egg_info.run() 32 | dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info' 33 | log.info("creating '{}'".format(os.path.abspath(dist_info_dir))) 34 | 35 | bdist_wheel = self.get_finalized_command('bdist_wheel') 36 | bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir) 37 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/launcher manifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/register.py: -------------------------------------------------------------------------------- 1 | from distutils import log 2 | import distutils.command.register as orig 3 | 4 | from setuptools.errors import RemovedCommandError 5 | 6 | 7 | class register(orig.register): 8 | """Formerly used to register packages on PyPI.""" 9 | 10 | def run(self): 11 | msg = ( 12 | "The register command has been removed, use twine to upload " 13 | + "instead (https://pypi.org/p/twine)" 14 | ) 15 | 16 | self.announce("ERROR: " + msg, log.ERROR) 17 | 18 | raise RemovedCommandError(msg) 19 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/saveopts.py: -------------------------------------------------------------------------------- 1 | from setuptools.command.setopt import edit_config, option_base 2 | 3 | 4 | class saveopts(option_base): 5 | """Save command-line options to a file""" 6 | 7 | description = "save supplied options to setup.cfg or other config file" 8 | 9 | def run(self): 10 | dist = self.distribution 11 | settings = {} 12 | 13 | for cmd in dist.command_options: 14 | 15 | if cmd == 'saveopts': 16 | continue # don't save our own options! 17 | 18 | for opt, (src, val) in dist.get_option_dict(cmd).items(): 19 | if src == "command line": 20 | settings.setdefault(cmd, {})[opt] = val 21 | 22 | edit_config(self.filename, settings, self.dry_run) 23 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/command/upload.py: -------------------------------------------------------------------------------- 1 | from distutils import log 2 | from distutils.command import upload as orig 3 | 4 | from setuptools.errors import RemovedCommandError 5 | 6 | 7 | class upload(orig.upload): 8 | """Formerly used to upload packages to PyPI.""" 9 | 10 | def run(self): 11 | msg = ( 12 | "The upload command has been removed, use twine to upload " 13 | + "instead (https://pypi.org/p/twine)" 14 | ) 15 | 16 | self.announce("ERROR: " + msg, log.ERROR) 17 | raise RemovedCommandError(msg) 18 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/dep_util.py: -------------------------------------------------------------------------------- 1 | from distutils.dep_util import newer_group 2 | 3 | 4 | # yes, this is was almost entirely copy-pasted from 5 | # 'newer_pairwise()', this is just another convenience 6 | # function. 7 | def newer_pairwise_group(sources_groups, targets): 8 | """Walk both arguments in parallel, testing if each source group is newer 9 | than its corresponding target. Returns a pair of lists (sources_groups, 10 | targets) where sources is newer than target, according to the semantics 11 | of 'newer_group()'. 12 | """ 13 | if len(sources_groups) != len(targets): 14 | raise ValueError( 15 | "'sources_group' and 'targets' must be the same length") 16 | 17 | # build a pair of lists (sources_groups, targets) where source is newer 18 | n_sources = [] 19 | n_targets = [] 20 | for i in range(len(sources_groups)): 21 | if newer_group(sources_groups[i], targets[i]): 22 | n_sources.append(sources_groups[i]) 23 | n_targets.append(targets[i]) 24 | 25 | return n_sources, n_targets 26 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/errors.py: -------------------------------------------------------------------------------- 1 | """setuptools.errors 2 | 3 | Provides exceptions used by setuptools modules. 4 | """ 5 | 6 | from distutils.errors import DistutilsError 7 | 8 | 9 | class RemovedCommandError(DistutilsError, RuntimeError): 10 | """Error used for commands that have been removed in setuptools. 11 | 12 | Since ``setuptools`` is built on ``distutils``, simply removing a command 13 | from ``setuptools`` will make the behavior fall back to ``distutils``; this 14 | error is raised if a command exists in ``distutils`` but has been actively 15 | removed in ``setuptools``. 16 | """ 17 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/extension.py: -------------------------------------------------------------------------------- 1 | import re 2 | import functools 3 | import distutils.core 4 | import distutils.errors 5 | import distutils.extension 6 | 7 | from .monkey import get_unpatched 8 | 9 | 10 | def _have_cython(): 11 | """ 12 | Return True if Cython can be imported. 13 | """ 14 | cython_impl = 'Cython.Distutils.build_ext' 15 | try: 16 | # from (cython_impl) import build_ext 17 | __import__(cython_impl, fromlist=['build_ext']).build_ext 18 | return True 19 | except Exception: 20 | pass 21 | return False 22 | 23 | 24 | # for compatibility 25 | have_pyrex = _have_cython 26 | 27 | _Extension = get_unpatched(distutils.core.Extension) 28 | 29 | 30 | class Extension(_Extension): 31 | """Extension that uses '.c' files in place of '.pyx' files""" 32 | 33 | def __init__(self, name, sources, *args, **kw): 34 | # The *args is needed for compatibility as calls may use positional 35 | # arguments. py_limited_api may be set only via keyword. 36 | self.py_limited_api = kw.pop("py_limited_api", False) 37 | _Extension.__init__(self, name, sources, *args, **kw) 38 | 39 | def _convert_pyx_sources_to_lang(self): 40 | """ 41 | Replace sources with .pyx extensions to sources with the target 42 | language extension. This mechanism allows language authors to supply 43 | pre-converted sources but to prefer the .pyx sources. 44 | """ 45 | if _have_cython(): 46 | # the build has Cython, so allow it to compile the .pyx files 47 | return 48 | lang = self.language or '' 49 | target_ext = '.cpp' if lang.lower() == 'c++' else '.c' 50 | sub = functools.partial(re.sub, '.pyx$', target_ext) 51 | self.sources = list(map(sub, self.sources)) 52 | 53 | 54 | class Library(Extension): 55 | """Just like a regular Extension, but built as a library instead""" 56 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/gui-32.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/gui-32.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/gui-64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/gui-64.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/gui.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/setuptools/gui.exe -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/launch.py: -------------------------------------------------------------------------------- 1 | """ 2 | Launch the Python script on the command line after 3 | setuptools is bootstrapped via import. 4 | """ 5 | 6 | # Note that setuptools gets imported implicitly by the 7 | # invocation of this script using python -m setuptools.launch 8 | 9 | import tokenize 10 | import sys 11 | 12 | 13 | def run(): 14 | """ 15 | Run the script in sys.argv[1] as if it had 16 | been invoked naturally. 17 | """ 18 | __builtins__ 19 | script_name = sys.argv[1] 20 | namespace = dict( 21 | __file__=script_name, 22 | __name__='__main__', 23 | __doc__=None, 24 | ) 25 | sys.argv[:] = sys.argv[1:] 26 | 27 | open_ = getattr(tokenize, 'open', open) 28 | with open_(script_name) as fid: 29 | script = fid.read() 30 | norm_script = script.replace('\\r\\n', '\\n') 31 | code = compile(norm_script, script_name, 'exec') 32 | exec(code, namespace) 33 | 34 | 35 | if __name__ == '__main__': 36 | run() 37 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/py34compat.py: -------------------------------------------------------------------------------- 1 | import importlib 2 | 3 | try: 4 | import importlib.util 5 | except ImportError: 6 | pass 7 | 8 | 9 | try: 10 | module_from_spec = importlib.util.module_from_spec 11 | except AttributeError: 12 | def module_from_spec(spec): 13 | return spec.loader.load_module(spec.name) 14 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/script (dev).tmpl: -------------------------------------------------------------------------------- 1 | # EASY-INSTALL-DEV-SCRIPT: %(spec)r,%(script_name)r 2 | __requires__ = %(spec)r 3 | __import__('pkg_resources').require(%(spec)r) 4 | __file__ = %(dev_path)r 5 | with open(__file__) as f: 6 | exec(compile(f.read(), __file__, 'exec')) 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/script.tmpl: -------------------------------------------------------------------------------- 1 | # EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r 2 | __requires__ = %(spec)r 3 | __import__('pkg_resources').run_script(%(spec)r, %(script_name)r) 4 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/unicode_utils.py: -------------------------------------------------------------------------------- 1 | import unicodedata 2 | import sys 3 | 4 | 5 | # HFS Plus uses decomposed UTF-8 6 | def decompose(path): 7 | if isinstance(path, str): 8 | return unicodedata.normalize('NFD', path) 9 | try: 10 | path = path.decode('utf-8') 11 | path = unicodedata.normalize('NFD', path) 12 | path = path.encode('utf-8') 13 | except UnicodeError: 14 | pass # Not UTF-8 15 | return path 16 | 17 | 18 | def filesys_decode(path): 19 | """ 20 | Ensure that the given path is decoded, 21 | NONE when no expected encoding works 22 | """ 23 | 24 | if isinstance(path, str): 25 | return path 26 | 27 | fs_enc = sys.getfilesystemencoding() or 'utf-8' 28 | candidates = fs_enc, 'utf-8' 29 | 30 | for enc in candidates: 31 | try: 32 | return path.decode(enc) 33 | except UnicodeDecodeError: 34 | continue 35 | 36 | 37 | def try_encode(string, enc): 38 | "turn unicode encoding into a functional routine" 39 | try: 40 | return string.encode(enc) 41 | except UnicodeEncodeError: 42 | return None 43 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/version.py: -------------------------------------------------------------------------------- 1 | import pkg_resources 2 | 3 | try: 4 | __version__ = pkg_resources.get_distribution('setuptools').version 5 | except Exception: 6 | __version__ = 'unknown' 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/setuptools/windows_support.py: -------------------------------------------------------------------------------- 1 | import platform 2 | import ctypes 3 | 4 | 5 | def windows_only(func): 6 | if platform.system() != 'Windows': 7 | return lambda *args, **kwargs: None 8 | return func 9 | 10 | 11 | @windows_only 12 | def hide_file(path): 13 | """ 14 | Set the hidden attribute on a file or directory. 15 | 16 | From http://stackoverflow.com/questions/19622133/ 17 | 18 | `path` must be text. 19 | """ 20 | __import__('ctypes.wintypes') 21 | SetFileAttributes = ctypes.windll.kernel32.SetFileAttributesW 22 | SetFileAttributes.argtypes = ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD 23 | SetFileAttributes.restype = ctypes.wintypes.BOOL 24 | 25 | FILE_ATTRIBUTE_HIDDEN = 0x02 26 | 27 | ret = SetFileAttributes(path, FILE_ATTRIBUTE_HIDDEN) 28 | if not ret: 29 | raise ctypes.WinError() 30 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn-1.0.2rc6.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn-1.0.2rc6.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: unicorn 3 | Version: 1.0.2rc6 4 | Summary: Unicorn CPU emulator engine 5 | Home-page: https://www.unicorn-engine.org 6 | Author: Nguyen Anh Quynh 7 | Author-email: aquynh@gmail.com 8 | License: UNKNOWN 9 | Platform: UNKNOWN 10 | Classifier: License :: OSI Approved :: BSD License 11 | Classifier: Programming Language :: Python :: 2 12 | Classifier: Programming Language :: Python :: 3 13 | Requires: ctypes 14 | Provides: unicorn 15 | Description-Content-Type: text/markdown 16 | 17 | 18 | Unicorn is a lightweight, multi-platform, multi-architecture CPU emulator framework 19 | based on [QEMU](https://qemu.org). 20 | 21 | Unicorn offers some unparalleled features: 22 | 23 | - Multi-architecture: ARM, ARM64 (ARMv8), M68K, MIPS, SPARC, and X86 (16, 32, 64-bit) 24 | - Clean/simple/lightweight/intuitive architecture-neutral API 25 | - Implemented in pure C language, with bindings for Crystal, Clojure, Visual Basic, Perl, Rust, Ruby, Python, Java, .NET, Go, Delphi/Free Pascal, Haskell, Pharo, and Lua. 26 | - Native support for Windows & *nix (with Mac OSX, Linux, *BSD & Solaris confirmed) 27 | - High performance via Just-In-Time compilation 28 | - Support for fine-grained instrumentation at various levels 29 | - Thread-safety by design 30 | - Distributed under free software license GPLv2 31 | 32 | Further information is available at https://www.unicorn-engine.org 33 | 34 | 35 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn-1.0.2rc6.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/unicorn-1.0.2rc6.dist-info/REQUESTED -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn-1.0.2rc6.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-macosx_10_14_x86_64 5 | Tag: py3-none-macosx_10_14_x86_64 6 | 7 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn-1.0.2rc6.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | unicorn 2 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn/__init__.py: -------------------------------------------------------------------------------- 1 | # Unicorn Python bindings, by Nguyen Anh Quynnh 2 | from . import arm_const, arm64_const, mips_const, sparc_const, m68k_const, x86_const 3 | from .unicorn_const import * 4 | from .unicorn import Uc, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__ 5 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn/include/unicorn/m68k.h: -------------------------------------------------------------------------------- 1 | /* Unicorn Emulator Engine */ 2 | /* By Nguyen Anh Quynh , 2014-2017 */ 3 | /* This file is released under LGPL2. 4 | See COPYING.LGPL2 in root directory for more details 5 | */ 6 | 7 | #ifndef UNICORN_M68K_H 8 | #define UNICORN_M68K_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifdef _MSC_VER 15 | #pragma warning(disable:4201) 16 | #endif 17 | 18 | //> M68K registers 19 | typedef enum uc_m68k_reg { 20 | UC_M68K_REG_INVALID = 0, 21 | 22 | UC_M68K_REG_A0, 23 | UC_M68K_REG_A1, 24 | UC_M68K_REG_A2, 25 | UC_M68K_REG_A3, 26 | UC_M68K_REG_A4, 27 | UC_M68K_REG_A5, 28 | UC_M68K_REG_A6, 29 | UC_M68K_REG_A7, 30 | 31 | UC_M68K_REG_D0, 32 | UC_M68K_REG_D1, 33 | UC_M68K_REG_D2, 34 | UC_M68K_REG_D3, 35 | UC_M68K_REG_D4, 36 | UC_M68K_REG_D5, 37 | UC_M68K_REG_D6, 38 | UC_M68K_REG_D7, 39 | 40 | UC_M68K_REG_SR, 41 | UC_M68K_REG_PC, 42 | 43 | UC_M68K_REG_ENDING, // <-- mark the end of the list of registers 44 | } uc_m68k_reg; 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn/lib/libunicorn.1.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/unicorn/lib/libunicorn.1.dylib -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn/lib/libunicorn.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dqzg12300/unicornDemo/27280d0b2be2504975c700a816813033163fed69/venv/lib/python3.7/site-packages/unicorn/lib/libunicorn.dylib -------------------------------------------------------------------------------- /venv/lib/python3.7/site-packages/unicorn/m68k_const.py: -------------------------------------------------------------------------------- 1 | # For Unicorn Engine. AUTO-GENERATED FILE, DO NOT EDIT [m68k_const.py] 2 | 3 | # M68K registers 4 | 5 | UC_M68K_REG_INVALID = 0 6 | UC_M68K_REG_A0 = 1 7 | UC_M68K_REG_A1 = 2 8 | UC_M68K_REG_A2 = 3 9 | UC_M68K_REG_A3 = 4 10 | UC_M68K_REG_A4 = 5 11 | UC_M68K_REG_A5 = 6 12 | UC_M68K_REG_A6 = 7 13 | UC_M68K_REG_A7 = 8 14 | UC_M68K_REG_D0 = 9 15 | UC_M68K_REG_D1 = 10 16 | UC_M68K_REG_D2 = 11 17 | UC_M68K_REG_D3 = 12 18 | UC_M68K_REG_D4 = 13 19 | UC_M68K_REG_D5 = 14 20 | UC_M68K_REG_D6 = 15 21 | UC_M68K_REG_D7 = 16 22 | UC_M68K_REG_SR = 17 23 | UC_M68K_REG_PC = 18 24 | UC_M68K_REG_ENDING = 19 25 | -------------------------------------------------------------------------------- /venv/pyvenv.cfg: -------------------------------------------------------------------------------- 1 | home = /Applications/Xcode.app/Contents/Developer/usr/bin 2 | include-system-site-packages = false 3 | version = 3.7.3 4 | --------------------------------------------------------------------------------