Giter Club home page Giter Club logo

caniusepython3's Introduction

** NOTE ** This project is no longer actively developed!

Can I Use Python 3?

Build Status

You can read the documentation on how to use caniusepython3 from its PyPI page. A web interface is also available.

How do you tell if a project has been ported to Python 3?

On PyPI each project can specify various trove classifiers (typically in a project's setup.py through a classifier argument to setup()). There are various classifiers related to what version of Python a project can run on. E.g.:

Programming Language :: Python :: 3
Programming Language :: Python :: 3.0
Programming Language :: Python :: 3.1
Programming Language :: Python :: 3.2
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7

As long as a trove classifier for some version of Python 3 is specified then the project is considered to support Python 3 (project owners: it is preferred you at least specify Programming Language :: Python :: 3 as that is how you end up listed on the Python 3 Packages list on PyPI; you can represent Python 2 support with Programming Language :: Python). Note that Python 3.0 through 3.4 have reached their End Of Life.

The other way is through a manual override in caniusepython3 itself. Projects ends up on this list because:

  • They are now part of Python's standard library in some release of Python 3
  • Their Python 3 port is under a different name
  • They are missing a Python 3 trove classifier but have actually been ported

If any of these various requirements are met, then a project is considered to support Python 3 and thus will be added to the manual overrides list. You can see the list of overrides when you use caniusepython3's CLI with verbose output turned on.

What if I know of a project that should be added to the overrides file?

If a project has Python 3 support in a release on PyPI but they have not added the proper trove classifier, then either submit a pull request or file an issue with the name of the project and a link to some proof that a release available on PyPI has indeed been ported (e.g. PyPI page stating the support, tox.ini file showing tests being run against Python 3, etc.). Projects that have Python 3 support in their version control system but not yet available on PyPI will not be considered for inclusion in the overrides file.

How can I get a project ported to Python 3?

Typically projects which have not switched to Python 3 yet are waiting for:

  • A dependency to be ported to Python 3
  • Someone to volunteer to put in the time and effort to do the port

Since caniusepython3 will tell you what dependencies are blocking a project that you depend on from being ported, you can try to port a project farther down your dependency graph to help a more direct dependency make the transition.

Which brings up the second point: volunteering to do a port. Most projects happily accept help, they just have not done the port yet because they have not had the time ("volunteering" can also take the form of paying someone to do the port on your behalf). Some projects are simply waiting for people to ask for it, so even speaking up politely and requesting a port can get the process started.

If you are looking for help to port a project, you can always search online for various sources of help. If you want a specific starting point there are HOWTOs in the Python documentation on porting pure Python modules and extension modules.

Can I use it as a pre-commit hook?

Yes! Begin by installing pre-commit:

pip install pre-commit
pre-commit install

You can add the following hook in your .pre-commit-config.yaml file.

    - repo: https://github.com/brettcannon/caniusepython3
      rev: v7.1.0  # Update as desired to new releases/tags
      hooks:
          - id: caniusepython3
            files: requirements\.txt$  # Update to match your requirements files accordingly.
            args: [
                -r  # Causes caniusepython3 to treat the `files` argument as a requirements file.
          ]
            stages: [commit]  # Change it to `manual`, if `caniusepython3` takes too long between commits, so as to only run them manually in build jobs.

If you are running manually somewhere, we can run the following command:

pre-commit run --hook-stage manual caniusepython3 --files  requirements.txt

Change Log

7.3.0

  • Usual overrides updates
  • Removed argparse as a requirement
  • Added Python 3.9 support
  • Silenced a warning from setuptools about importing distutils (via distlib) before setuptools itself
  • Made it a bit more clear that false-negatives are possible (by design)
  • Marked the project as retired

7.2.0

7.1.0

  • Remove unused imports from Pylint checker
  • Usual overrides updates
  • Introduce the --exclude flag (thanks Milind Shakya)

7.0.0

  • Drop Python 3.3 support
  • Usual overrides updates

6.0.0

  • Refactor some code to avoid a warning in Python 3.6
  • Stop calling pip's internals (pip 10 would break everything)
  • Fix "No handler found" output under Python 2.7 (patch by arnuschky)
  • Usual overrides updates

5.0.0

  • Return a 3 error code when a command completes successfully but there are found blockers (patch by pcattori; accidentally left out of the 4.0.0 release)
  • Officially support Python 3.6
  • Usual overrides updates

4.0.0

  • Stop using PyPI's XML-RPC API and move to its JSON one for better performance (and switch to https://pypi.org)
  • Load the overrides data from GitHub when possible, falling back to the data included with the package when necessary (thanks to shafrom for adding local, one-day caching)

3.4.1

3.4.0

  • Fix a dict comprehension failure with the pylint checker (patch by Jeroen Oldenburger)
  • Usual override updates
  • Python 3.5 support
  • Tests have been made less flaky
  • Use pypi.io instead of pypi.python.org
  • Normalize project names to help guarantee lookup success

3.3.0

  • Made tests more robust in the face of PyPI timing out
  • Added Python 3.5 support
  • Dropped Python 2.6 and 3.2 support
  • Updated tests to not use Twisted as a Python 2-only project
  • Fixed a bug where the pylint checker was incorrectly missing from __future__ import unicode_literals (issue #103; reported by David Euresti)
  • Usual overrides updates

3.2.0

  • Fix a failing test due to the assumed unported project being ported =)
  • Work around distlib 0.2.0 bug (patch by @rawrgulmuffins)
  • Usual override updates

3.1.0

  • Log more details when running under -v (patch by @msabramo)
  • Print a ๐ŸŽ‰ -- it's a party popper in case you have mojibake for it -- when the terminal supports it and there are no blocking dependencies (patch by @msabramo)
  • Fix compatibility with pip 6.1.0 (patch by @msabramo)
  • Fix warning of missing logger when using setup.py integration (issue #80; patch by @msabramo)
  • Remove checkers for filter, map, range, and zip as they have been improved upon and merged upstream in Pylint
  • Updated outdated documentation
  • Usual override updates

3.0.0

  • Introduce caniusepython3.pylint_checker which extends pylint --py3k with very strict porting checks
  • Work around a bug in distlib
  • Compatibility fix for pip 6.0 (issue #72)
  • Usual override updates

2.2.0

  • Suppress an xmlrpclib.Fault exception under Python 2.6 when trying to close an XML-RPC connection (can't close a connection under Python 2.6 anyway and the exception has only been seen on Travis)
  • Move to unittest2 as a developer dependency
  • Move mock to a developer dependency
  • Usual override tweaks

2.1.2

  • Avoid infinite recursion when there is a circular dependency (issue #60)
  • Usual overrides tweaks

2.1.1

  • Normalize the names of direct dependencies for proper Python 3 compatibility checking (issue #55)
  • Properly set the logging details when executed from the entry point
  • Usual overrides tweaks

2.1.0

  • Verbose output will print what manual overrides are used and why (when available)
  • Fix logging to only be configured when running as a script as well as fix a format bug
  • Usual override updates

2.0.3

  • Fixed setup.py caniusepython3 to work with extras_require properly
  • Fix various errors triggered from the moving of the just_name() function to a new module in 2.0.0 (patch by Vaibhav Sagar w/ input from Jannis Leidel)
  • Usual overrides tweaks (thanks to CyrilRoelandteNovance for contributing)

2.0.2

  • Fix lack of unicode usage in a test
  • Make Python 2.6 happy again due to its distate of empty XML-RPC results

2.0.1

  • Fix syntax error

2.0.0

  • Tweak overrides
  • -r, -m, and -p now take 1+ arguments instead of a single comma-separated list
  • Unrecognized projects are considered ported to prevent the lack of info on the unrecognized project perpetually suggesting that it's never been ported
  • Introduced icanusepython3.check()

1.2.1

  • Fix -v to actually do something again
  • Tweaked overrides

1.2.0

  • -r accepts a comma-separated list of file paths

1.1.0

  • Setuptools command support
  • Various fixes

1.0

Initial release.

caniusepython3's People

Contributors

b-jazz avatar brettcannon avatar cclauss avatar chhantyal avatar cyrilroelandtenovance avatar dhamaniasad avatar dundee avatar encukou avatar ewjoachim avatar hugovk avatar jeffpaine avatar jeroenoldenburger avatar jezdez avatar jmath222 avatar macleodbroad-wf avatar mathiasertl avatar mayanksuman avatar milind-shakya-sp avatar msabramo avatar nickjacobson avatar pcattori avatar rawrgulmuffins avatar rouge8 avatar shaform avatar sixohsix avatar svisser avatar tiran avatar troeger avatar vaibhavsagar avatar yablonsky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caniusepython3's Issues

Consider making caniusepython3 a script

I.e. don't use py_modules in setup.py but instead use scripts and then simply rename caniusepython3.py to caniusepython3. Since it is fully self-contained and there is no API beyond the CLI the only thing that would be an issue is the tests, but those could even be integrated into the single file.

Otherwise look into using Setuptools' automatic script creation.

Misidentified projects: boto, botocore, jinja2

I would submit a patch for this, but I'm not sure what the problem is.

boto, botocore, and jinja2 all explicitly support Python 3, but caniusepython3 claims they don't. It doesn't seem appropriate to add them to the overrides because they do have some form of Programming Language :: Python :: 3 classifier.

Package name normalization is not handled correctly

For example:

$ caniusepython3 --projects wsgi_intercept
Finding and checking dependencies ...
No handlers could be found for logger "ciu"

You have 0 projects blocking you from using Python 3!

$ caniusepython3 --projects wsgi-intercept
Finding and checking dependencies ...
No handlers could be found for logger "ciu"

You need 1 project to transition to Python 3.
Of that 1 project, 1 has no direct dependencies blocking its transition:

  wsgi-intercept

Drop Python 2.6 support

It's 7 years old, so it's past security fixes and just plain old buggy compared to Python 2.7.

What about non-existent projects?

Currently you can search for any project and caniusepython3 will report it's Python3 compatible... If you press on "Check again" in the result page will 404 you.
caiusepy3

TypeError: parse_requirements() missing 1 required keyword argument: 'session'

Hello!

caniusepython3==2.2.0 and pip 6.0.6

Traceback (most recent call last):
  File "/vagrant/project/tests/py3_compatibility_test.py", line 11, in test_dependencies
    './project/configure/requirements.txt',
  File "/home/vagrant/pyenv/versions/latest-2/lib/python2.7/site-packages/caniusepython3/__init__.py", line 41, in check
    dependencies = main.projects_from_requirements(requirements_paths)
  File "/home/vagrant/pyenv/versions/latest-2/lib/python2.7/site-packages/caniusepython3/__main__.py", line 37, in projects_from_requirements
    for req in reqs:
  File "/home/vagrant/pyenv/versions/latest-2/lib/python2.7/site-packages/pip/req/req_file.py", line 19, in parse_requirements
    "parse_requirements() missing 1 required keyword argument: "
TypeError: parse_requirements() missing 1 required keyword argument: 'session'

TypeError: 'int' object is not iterable

I ran caniusepython3 -r requirements.txt against my requirements.txt and the following error resulted:

Traceback (most recent call last):
  File "/usr/local/bin/caniusepython3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/caniusepython3/__main__.py", line 159, in main
    check(projects_from_cli(args))
  File "/usr/local/lib/python2.7/dist-packages/caniusepython3/__main__.py", line 86, in projects_from_cli
    projects.extend(projects_from_requirements(parsed.requirements))
  File "/usr/local/lib/python2.7/dist-packages/caniusepython3/__main__.py", line 39, in projects_from_requirements
    for req in reqs:
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1631, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from, prereleases=getattr(options, "pre", None))
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 172, in from_line
    return cls(req, comes_from, url=url, prereleases=prereleases)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 108, in __init__
    self.prereleases = any([is_prerelease(x[1]) and x[0] != "!=" for x in self.req.specs])
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 720, in is_prerelease
    return any([any([y in set(["a", "b", "c", "rc", "dev"]) for y in x]) for x in parsed])
TypeError: 'int' object is not iterable

For context, this is on Python 2.7.6 on Ubuntu 14.04.

Timeouts when querying PyPI

STR:

  1. Clone https://github.com/mozilla/treeherder
  2. Update to revision 985cd86a6de3b33a5025b7152be4f29804456eba
  3. From the root of the repo, run: caniusepython3 -r requirements/common.txt

Expected:
Command succeeds.

Actual:

Finding and checking dependencies ...
Traceback (most recent call last):
  File "/usr/bin/caniusepython3", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/site-packages/caniusepython3/__main__.py", line 179, in main
    check(projects_from_cli(args))
  File "/usr/lib/python2.7/site-packages/caniusepython3/__main__.py", line 167, in check
    blockers = dependencies.blocking_dependencies(projects, pypi.all_py3_projects())
  File "/usr/lib/python2.7/site-packages/caniusepython3/pypi.py", line 112, in all_py3_projects
    for result in map(projects_matching_classifier, py3_classifiers()):
  File "/usr/lib/python2.7/site-packages/caniusepython3/pypi.py", line 98, in projects_matching_classifier
    for result in client.browse([classifier]))
  File "/usr/lib/python2.7/xmlrpclib.py", line 1240, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1599, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1280, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1313, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1490, in parse_response
    return u.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 799, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "<class 'psycopg2.extensions.QueryCanceledError'>:canceling statement due to statement timeout\n">

Run using Python 2.7.11 on MSYS2.

Unknown projects should be considered ported

If someone uses caniusepython3 with some dependencies that are private to their project, we have no way of knowing they are ported, so instead of erroneously saying that they can never switch, but the onus on them and say they can until they move their own private dependencies over.

PyPI

Can this be on PyPI?

Error when using distlib==0.2.0

So I'm not sure where the bug is, but I ran into this bug when running caniusepython3:

kevin@myserver:~$ /usr/local/bin/caniusepython3 -r requirements.txt
Finding and checking dependencies ...
Traceback (most recent call last):
  File "/usr/local/bin/caniusepython3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/caniusepython3/__main__.py", line 159, in main
    check(projects_from_cli(args))
  File "/usr/local/lib/python2.7/dist-packages/caniusepython3/__main__.py", line 145, in check
    blockers = dependencies.blocking_dependencies(projects, pypi.all_py3_projects())
  File "/usr/local/lib/python2.7/dist-packages/caniusepython3/dependencies.py", line 80, in blocking_dependencies
    dist = distlib.locators.locate(project)
  File "/usr/local/lib/python2.7/dist-packages/distlib/locators.py", line 361, in locate
    result.download_urls = versions.get('urls', {}).get(version, set())
AttributeError: 'dict' object has no attribute 'download_urls'

I fixed it by rolling back to distlib==0.1.9, though that gave me these errors

Finding and checking dependencies ...
[WARNING] recaptcha not found  
[WARNING] django-recaptcha-field not found
[ERROR] Failed to get external data for https://www.red-dove.com/pypi/projects/E/email-reply-parser/project.json: HTTP Error 404: Not Found
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/distlib/util.py", line 744, in _get_external_data
    resp = urlopen(url)
  File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 406, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 444, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

You need 17 projects to transition to Python 3.
Of those 17 projects, 15 have no direct dependencies blocking their transition:

  django-celery-transactions   
  django-concurrent-server
  django-discover-jenkins
  django-include-strip-tag
  django-ipware
  django-storages
  docx
  hellosign-python-sdk
  oauth2
  pdfminer
  pykss
  reportlab
  lepl (which is blocking rfc6266)
  m2crypto (which is blocking tender_multipass)
  xlsxcessive

Not sure if this is a problem with distlib, my setup, or maybe freezing the required version of distlib in the requirements. Happy to report more as necessary. If it helps, I'm running python 2.7.3 in ubuntu 12.04

TypeError thrown when looking at all pypi projects.

While running a very simple but long running program I received this stack.

Program Code:

from collections import Counter
from pprint import pprint

import caniusepython3
from caniusepython3.dependencies import blocking_dependencies

all_py_projects = list(caniusepython3.pypi.all_projects())
py3_projects = caniusepython3.pypi.all_py3_projects()
all_blockers = blocking_dependencies(
    all_py_projects,
    py3_projects)
blocker_list = []
for blockers_subset in all_blockers:
    for blocker in blockers_subset:
        blocker_list.append(blocker)
blockers_counter = Counter(blocker_list)
pprint(blockers_counter.most_common())

Just as a warning this takes my poor laptop a couple hours to run.

Stack

Traceback (most recent call last):
  File "top_python3_blockers.py", line 15, in <module>
    py3_projects)
  File "/Users/alexlord/.virtualenvs/porting_authority/lib/python3.4/site-packages/caniusepython3-3.1.0-py3.4.egg/caniusepython3/dependencies.py", line 98, in blocking_dependencies
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/concurrent/futures/_base.py", line 549, in result_iterator
    yield future.result()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/concurrent/futures/_base.py", line 395, in result
    return self.__get_result()
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result
    raise self._exception
  File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/Users/alexlord/.virtualenvs/porting_authority/lib/python3.4/site-packages/caniusepython3-3.1.0-py3.4.egg/caniusepython3/dependencies.py", line 60, in dependencies
  File "/Users/alexlord/.virtualenvs/porting_authority/lib/python3.4/site-packages/distlib/database.py", line 375, in run_requires
    return self._get_requirements('run_requires')
  File "/Users/alexlord/.virtualenvs/porting_authority/lib/python3.4/site-packages/distlib/database.py", line 371, in _get_requirements
    env=self.context))
  File "/Users/alexlord/.virtualenvs/porting_authority/lib/python3.4/site-packages/distlib/metadata.py", line 874, in get_requirements
    result.extend(d['requires'])
TypeError: string indices must be integers

I'm going to re-run the sample code using python -m pdb to see if I can figure out what's happening.

Use unittest2

Now it just seems silly to be working around it not being installed in the tests if I'm going to pull in mock as well.

MemoryError when circular dependencies are specified

Found when checking kotti_tinymce:

mattr@helios in ~/git ฮป: caniusepython3 -p kotti_tinymce
Finding and checking dependencies ...
[WARNING] Stale overrides: set([u'xlwt'])
Traceback (most recent call last):
  File "/home/mattr/.virtualenvs/test-env/bin/caniusepython3", line 11, in <module>
    sys.exit(main())
  File "/home/mattr/.virtualenvs/test-env/local/lib/python2.7/site-packages/caniusepython3/__main__.py", line 179, in main
    check(projects_from_cli(args))
  File "/home/mattr/.virtualenvs/test-env/local/lib/python2.7/site-packages/caniusepython3/__main__.py", line 167, in check
    blockers = dependencies.blocking_dependencies(projects, pypi.all_py3_projects())
  File "/home/mattr/.virtualenvs/test-env/local/lib/python2.7/site-packages/caniusepython3/dependencies.py", line 114, in blocking_dependencies
    return reasons_to_paths(reasons)
  File "/home/mattr/.virtualenvs/test-env/local/lib/python2.7/site-packages/caniusepython3/dependencies.py", line 45, in reasons_to_paths
    path.append(parent)
MemoryError

Add a change log

With the imminent release of version 2.0 it's time to start keeping a change log for major changes that will affect users. Unfortunately with GitHub using Markdown and PyPI using reST, it's already annoying to maintain two files. My current thinking is to make PyPI host the docs for the use of caniusepython3 and then have README.md host the change log and any other development details.

Override ipaddress

It's a backport of the builtin python3 module, so probably could be ignored in some way?

Ignore/warn for local packages in requirements.txt

File paths listed in a requirements.txt return a None at some point and cause an AttributeError later on.

Traceback:

$ caniusepython3 -r requirements.txt
Finding and checking dependencies ...
WARNING:root:Stale overrides: set([u'pyopenssl'])
Traceback (most recent call last):
  File "/usr/local/bin/caniusepython3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/caniusepython3/__main__.py", line 119, in main
    blockers = ciu.blocking_dependencies(projects, ciu.all_py3_projects())
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/caniusepython3/__init__.py", line 169, in blocking_dependencies
    for project in projects if project.lower() not in py3_projects]
AttributeError: 'NoneType' object has no attribute 'lower'

Add a test for -v

0c146de should never have happened. Shouldn't need to be anything more than verifying that 'INFO' is found in the output.

pyramid_mako (among others) is not recognized as py3 compatible

Seems some packages are not correctly recognized even though they have the required classifiers on PyPI.

For example pyramid_mako.

One thing I noticed is that on the website entering pyramid_mako turns out as pyramid-mako (underscore converted to dash). Maybe it does not find that on PyPI...?

BR

numpy already supports Python 3

Numpy already supports Python3. And this CLI was working fine. Recently, something has changed and it gives following output.

$ caniusepython3 --projects numpy
Finding and checking dependencies ...
[WARNING] Stale overrides: set([u'reportlab'])

You need 1 project to transition to Python 3.
Of that 1 project, 1 has no direct dependencies blocking its transition:

  numpy

Not sure if it is the case with packages that specify version number in PyPi like https://pypi.python.org/pypi/numpy/ gives 404 so we have to use https://pypi.python.org/pypi/numpy/1.8.1

This issue was fist reported here chhantyal/py3readiness#24

Parallelize fetching of projects

While the total set of project is unknown and thus can't necessarily make everything concurrent, at least making the fetching of direct dependencies concurrent would be helpful.

[feature] an option to suggest close/drop-in alternative

There is this package called oauth2 which seems to be very popular. Unfortunately it's abandoned and has no activity since 2011 https://github.com/simplegeo/python-oauth2

There are nice alternative packages like this one https://github.com/idan/oauthlib, which are actively developed, as well as popular. Can we somehow add a feature to let people that there is close/drop-in alternative which supports Python 3?

In above example, oauth2 should not be holding people back. What do you think?

AttributeError for download_urls

> caniusepython3 -r requirements.txt 
No handlers could be found for logger "ciu"
Finding and checking dependencies ...
[WARNING] Stale overrides: set([u'xlwt', u'jmespath'])
Traceback (most recent call last):
  File "$HOME/.local/bin/caniusepython3", line 11, in <module>
    sys.exit(main())
  File "$HOME/.local/venvs/caniusepython3/lib/python2.7/site-packages/caniusepython3/__main__.py", line 179, in main
    check(projects_from_cli(args))
  File "$HOME/.local/venvs/caniusepython3/lib/python2.7/site-packages/caniusepython3/__main__.py", line 167, in check
    blockers = dependencies.blocking_dependencies(projects, pypi.all_py3_projects())
  File "$HOME/.local/venvs/caniusepython3/lib/python2.7/site-packages/caniusepython3/dependencies.py", line 81, in blocking_dependencies
    dist = distlib.locators.locate(project)
  File "$HOME/.local/venvs/caniusepython3/lib/python2.7/site-packages/distlib/locators.py", line 361, in locate
    result.download_urls = versions.get('urls', {}).get(version, set())
AttributeError: 'dict' object has no attribute 'download_urls'

Look into making this a Python2/3 compatible package

I think this would go a long way to help switchers to check their Python 2 based projects whether they're ready. Only providing a Python 3 compatible version seems like a bottleneck that can easily be prevented.

pylint_checker doesn't handle from __future__ import unicode_literals

Sample file:

"""Module Docstring"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

def awesome():
    print("awesome")

Running pylint --load-plugins=caniusepython3.pylint_checker --py3k sample.py --report=no yields the following:

************* Module t5
W:  7, 0: native string literal (native-string)

Outputs `No handlers could be found for logger "ciu"`

Note No handlers could be found for logger "ciu" in the output below. I haven't yet looked into why it's showing up, but it would be nice if it didn't.

$ python setup.py caniusepython3
running caniusepython3
Finding and checking dependencies ...
No handlers could be found for logger "ciu"

You need 3 projects to transition to Python 3.
Of those 3 projects, 2 have no direct dependencies blocking their transition:

  gevent
  paste (which is blocking pastescript)

Push Git tags to Github

I was just trying to find out whether there are API incompatibilities between 1.2.1 and 2.x as I'm using some of it in caniusepython3.com. Sadly I couldn't find the Git tags for the project. Mind if you push them?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.