{"id":13398746,"url":"https://github.com/brettcannon/caniusepython3","last_synced_at":"2025-03-14T02:31:33.432Z","repository":{"id":14145115,"uuid":"16850784","full_name":"brettcannon/caniusepython3","owner":"brettcannon","description":"Can I Use Python 3?","archived":true,"fork":false,"pushed_at":"2021-01-01T23:13:22.000Z","size":391,"stargazers_count":412,"open_issues_count":8,"forks_count":64,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-10-08T09:50:24.401Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brettcannon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-14T22:05:51.000Z","updated_at":"2024-01-02T18:46:39.000Z","dependencies_parsed_at":"2022-09-26T20:00:57.527Z","dependency_job_id":null,"html_url":"https://github.com/brettcannon/caniusepython3","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettcannon%2Fcaniusepython3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettcannon%2Fcaniusepython3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettcannon%2Fcaniusepython3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettcannon%2Fcaniusepython3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brettcannon","download_url":"https://codeload.github.com/brettcannon/caniusepython3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243511660,"owners_count":20302595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:31.313Z","updated_at":"2025-03-14T02:31:33.007Z","avatar_url":"https://github.com/brettcannon.png","language":"Python","funding_links":[],"categories":["What is this about?","资源列表","Command-line Tools","Python"],"sub_categories":["命令行工具"],"readme":"** NOTE ** This project is no longer actively developed!\n\n# Can I Use Python 3?\n\n[![Build Status](https://travis-ci.org/brettcannon/caniusepython3.svg?branch=master)](https://travis-ci.org/brettcannon/caniusepython3)\n\nYou can read the documentation on how to use caniusepython3 from its\n[PyPI page](https://pypi.python.org/pypi/caniusepython3). A [web interface](https://github.com/jezdez/caniusepython3.com)\nis also available.\n\n# How do you tell if a project has been ported to Python 3?\n\nOn [PyPI](https://pypi.python.org/) each project can specify various\n[trove classifiers](https://pypi.python.org/pypi?%3Aaction=list_classifiers)\n(typically in a project's `setup.py` through a [`classifier`](https://docs.python.org/3/distutils/setupscript.html#additional-meta-data)\nargument to `setup()`).\nThere are various classifiers related to what version of Python a project can\nrun on. E.g.:\n\n    Programming Language :: Python :: 3\n    Programming Language :: Python :: 3.0\n    Programming Language :: Python :: 3.1\n    Programming Language :: Python :: 3.2\n    Programming Language :: Python :: 3.3\n    Programming Language :: Python :: 3.4\n    Programming Language :: Python :: 3.5\n    Programming Language :: Python :: 3.6\n    Programming Language :: Python :: 3.7\n\nAs long as a trove classifier for some version of Python 3 is specified then the\nproject is considered to support Python 3 (project owners: it is preferred you\n**at least** specify `Programming Language :: Python :: 3` as that is how you\nend up listed on the [Python 3 Packages list on PyPI](https://pypi.python.org/pypi?%3Aaction=packages_rss);\nyou can represent Python 2 support with `Programming Language :: Python`). Note\nthat Python 3.0 through 3.4 have reached their [End Of Life](https://docs.python.org/devguide/index.html#branchstatus).\n\nThe other way is through a [manual override](https://github.com/brettcannon/caniusepython3/blob/master/caniusepython3/overrides.json) in\n`caniusepython3` itself. Projects ends up on this list because:\n\n- They are now part of [Python's standard library](http://docs.python.org/3/py-modindex.html) in some release of Python 3\n- Their Python 3 port is under a different name\n- They are missing a Python 3 trove classifier but have actually been ported\n\nIf any of these various requirements are met, then a project is considered to\nsupport Python 3 and thus will be added to the manual overrides list. You can\nsee the list of overrides when you use caniusepython3's CLI with verbose output\nturned on.\n\n## What if I know of a project that should be added to the overrides file?\n\nIf a project has Python 3 support in a release on PyPI but they have not added the\nproper trove classifier, then either submit a\n[pull request](https://github.com/brettcannon/caniusepython3/pulls) or file an\n[issue](https://github.com/brettcannon/caniusepython3/issues) with the name of the\nproject and a link to some proof that a release available on PyPI has indeed been\nported (e.g. PyPI page stating the support, tox.ini file showing tests being run\nagainst Python 3, etc.). Projects that have Python 3 support in their version control\nsystem but not yet available on PyPI will **not** be considered for inclusion in the\noverrides file.\n\n# How can I get a project ported to Python 3?\n\nTypically projects which have not switched to Python 3 yet are waiting for:\n\n- A dependency to be ported to Python 3\n- Someone to volunteer to put in the time and effort to do the port\n\nSince `caniusepython3` will tell you what dependencies are blocking a project\nthat you depend on from being ported, you can try to port a project farther\ndown your dependency graph to help a more direct dependency make the transition.\n\nWhich brings up the second point: volunteering to do a port. Most projects\nhappily accept help, they just have not done the port yet because they have\nnot had the time (\"volunteering\" can also take the form of paying someone to do\nthe port on your behalf). Some projects are simply waiting for people to ask for it,\nso even speaking up politely and requesting a port can get the process started.\n\nIf you are looking for help to port a project, you can always search online for\nvarious sources of help. If you want a specific starting point there are\n[HOWTOs](http://docs.python.org/3/howto/index.html) in the Python documentation\non [porting pure Python modules](http://docs.python.org/3/howto/pyporting.html)\nand [extension modules](http://docs.python.org/3/howto/cporting.html).\n\n# Can I use it as a pre-commit hook?\n\nYes! Begin by installing [pre-commit](https://pre-commit.com/):\n\n```\npip install pre-commit\npre-commit install\n```\n\nYou can add the following hook in your `.pre-commit-config.yaml` file.\n\n```yaml\n    - repo: https://github.com/brettcannon/caniusepython3\n      rev: v7.1.0  # Update as desired to new releases/tags\n      hooks:\n          - id: caniusepython3\n            files: requirements\\.txt$  # Update to match your requirements files accordingly.\n            args: [\n                -r  # Causes caniusepython3 to treat the `files` argument as a requirements file.\n          ]\n            stages: [commit]  # Change it to `manual`, if `caniusepython3` takes too long between commits, so as to only run them manually in build jobs.\n```\n\nIf you are running manually somewhere, we can run the following command:\n\n```\npre-commit run --hook-stage manual caniusepython3 --files  requirements.txt\n```\n\n# Change Log\n\n# 7.3.0\n\n- Usual overrides updates\n- Removed argparse as a requirement\n- Added Python 3.9 support\n- Silenced a warning from setuptools about importing distutils (via distlib)\n  before setuptools itself\n- Made it a bit more clear that false-negatives are possible (by design)\n- Marked the project as retired\n\n# 7.2.0\n\n- Add an `--index`/`-i` flag to specify an index URL (thanks [macleodbroad-wf](https://github.com/macleodbroad-wf))\n- Add support for [pre-commit](https://pre-commit.com/) (thanks [Milind Shakya](https://github.com/milind-shakya-sp))\n- Update overrides data (thanks [Andriy Yablonskyy](https://github.com/yablonsky))\n\n# 7.1.0\n\n- Remove unused imports from Pylint checker\n- Usual overrides updates\n- Introduce the `--exclude` flag (thanks [Milind Shakya](https://github.com/milind-shakya-sp))\n\n# 7.0.0\n\n- Drop Python 3.3 support\n- Usual overrides updates\n\n# 6.0.0\n\n- Refactor some code to avoid a warning in Python 3.6\n- Stop calling pip's internals (pip 10 would break everything)\n- Fix \"No handler found\" output under Python 2.7\n  (patch by [arnuschky](https://github.com/arnuschky))\n- Usual overrides updates\n\n# 5.0.0\n\n- Return a `3` error code when a command completes successfully but there are\n  found blockers (patch by [pcattori](https://github.com/pcattori);\n  accidentally left out of the 4.0.0 release)\n- Officially support Python 3.6\n- Usual overrides updates\n\n# 4.0.0\n\n- Stop using PyPI's XML-RPC API and move to its JSON one for better performance\n  (and switch to https://pypi.org)\n- Load the overrides data from GitHub when possible, falling back to the data\n  included with the package when necessary (thanks to\n  [shafrom](https://github.com/shaform) for adding local, one-day caching)\n\n# 3.4.1\n\n- Update the URL used for PyPI to https://pypi.org\n  (patch by [Chris Fournier](https://github.com/cfournie))\n- Usual override updates\n\n# 3.4.0\n\n- Fix a dict comprehension failure with the pylint checker\n  (patch by [Jeroen Oldenburger](https://github.com/jeroenoldenburger))\n- Usual override updates\n- Python 3.5 support\n- Tests have been made less flaky\n- Use pypi.io instead of pypi.python.org\n- Normalize project names to help guarantee lookup success\n\n# 3.3.0\n\n- Made tests more robust in the face of PyPI timing out\n- Added Python 3.5 support\n- Dropped Python 2.6 and 3.2 support\n- Updated tests to not use Twisted as a Python 2-only project\n- Fixed a bug where the pylint checker was incorrectly missing `from __future__ import unicode_literals` ([issue #103](https://github.com/brettcannon/caniusepython3/issues/103); reported by [David Euresti](https://github.com/euresti))\n- Usual overrides updates\n\n# 3.2.0\n\n- Fix a failing test due to the assumed unported project being ported =)\n- Work around distlib 0.2.0 bug (patch by @rawrgulmuffins)\n- Usual override updates\n\n# 3.1.0\n\n- Log more details when running under `-v` (patch by @msabramo)\n- Print a 🎉 -- it's a party popper in case you have mojibake for it -- when the\n  terminal supports it and there are no blocking dependencies (patch by @msabramo)\n- Fix compatibility with pip 6.1.0 (patch by @msabramo)\n- Fix warning of missing logger when using `setup.py` integration\n  (issue #80; patch by @msabramo)\n- Remove checkers for `filter`, `map`, `range`, and `zip` as they have been\n  improved upon and\n  [merged upstream in Pylint](https://bitbucket.org/logilab/pylint/pull-request/216/warn-when-filter-map-range-and-filter-are/diff)\n- Updated outdated documentation\n- Usual override updates\n\n# 3.0.0\n\n- Introduce `caniusepython3.pylint_checker` which extends `pylint --py3k` with\n  very strict porting checks\n- Work around a [bug in distlib](https://bitbucket.org/pypa/distlib/issue/58/distliblocatorslocate-returning-an-empty)\n- Compatibility fix for pip 6.0 ([issue #72](https://github.com/brettcannon/caniusepython3/issues/72))\n- Usual override updates\n\n# 2.2.0\n\n- Suppress an `xmlrpclib.Fault` exception under Python 2.6 when trying to close\n  an XML-RPC connection (can't close a connection under Python 2.6 anyway and\n  the exception has only been seen on [Travis](https://travis-ci.org/))\n- Move to [unittest2](https://pypi.python.org/pypi/unittest2) as a developer\n  dependency\n- Move [mock](https://pypi.python.org/pypi/mock) to a developer dependency\n- Usual override tweaks\n\n# 2.1.2\n\n- Avoid infinite recursion when there is a circular dependency\n  ([issue #60](https://github.com/brettcannon/caniusepython3/issues/60))\n- Usual overrides tweaks\n\n# 2.1.1\n\n- Normalize the names of direct dependencies for proper Python 3 compatibility\n  checking\n  ([issue #55](https://github.com/brettcannon/caniusepython3/issues/55))\n- Properly set the logging details when executed from the entry point\n- Usual overrides tweaks\n\n## 2.1.0\n\n- Verbose output will print what manual overrides are used and why\n  (when available)\n- Fix logging to only be configured when running as a script as well as fix a\n  format bug\n- Usual override updates\n\n## 2.0.3\n\n- Fixed `setup.py caniusepython3` to work with `extras_require` properly\n- Fix various errors triggered from the moving of the `just_name()` function to\n  a new module in 2.0.0 (patch by Vaibhav Sagar w/ input from Jannis Leidel)\n- Usual overrides tweaks (thanks to CyrilRoelandteNovance for contributing)\n\n## 2.0.2\n\n- Fix lack of unicode usage in a test\n- Make Python 2.6 happy again due to its distate of empty XML-RPC results\n\n## 2.0.1\n\n- Fix syntax error\n\n## 2.0.0\n\n- Tweak overrides\n- `-r`, `-m`, and `-p` now take 1+ arguments instead of a single comma-separated\n  list\n- Unrecognized projects are considered ported to prevent the lack of info on\n  the unrecognized project perpetually suggesting that it's never been ported\n- Introduced `icanusepython3.check()`\n\n## 1.2.1\n\n- Fix `-v` to actually do something again\n- Tweaked overrides\n\n## 1.2.0\n\n- `-r` accepts a comma-separated list of file paths\n\n## 1.1.0\n\n- Setuptools command support\n- Various fixes\n\n## 1.0\n\nInitial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettcannon%2Fcaniusepython3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrettcannon%2Fcaniusepython3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettcannon%2Fcaniusepython3/lists"}