Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classifiers for pypi package not showing Python 3 compatibility #12

Closed
alexlambson opened this issue Apr 18, 2018 · 10 comments
Closed

Classifiers for pypi package not showing Python 3 compatibility #12

alexlambson opened this issue Apr 18, 2018 · 10 comments

Comments

@alexlambson
Copy link

The pypi tool caniusepython3 is throwing a false negative due to classifiers not being set for the pypi project.

The JSON response from https://pypi.org/pypi/dict2xml/json should have an array which states what versions of Python it is compatible with:
response["info"]["classifiers"]

An example of a package with classifiers set:
https://pypi.org/pypi/twilio/json

Information on how to set classifiers:
https://packaging.python.org/tutorials/distributing-packages/#classifiers

If you don't have time, I am happy to help :)

@alexlambson
Copy link
Author

An example of a setup.py with classifiers set

https://github.com/twilio/twilio-python/blob/master/setup.py

@delfick
Copy link
Owner

delfick commented Apr 19, 2018

Fair enough.

I probably won't be able to get to this till the weekend.

@alexlambson
Copy link
Author

@delfick I can do it if you want. I have free time.

@delfick
Copy link
Owner

delfick commented Apr 20, 2018

I won't say no to that, feel free to make a PR :)

thanks

@alexlambson
Copy link
Author

Cool, what version range do you support?

@delfick
Copy link
Owner

delfick commented Apr 22, 2018

hmm, sorry, didn't see your reply.

I imagine it works from python2.7 onwards (it at least has py2.7 and py3.4 in tox.ini and the tests appear to pass on python3.6)

@alexlambson
Copy link
Author

Cool, I'll just say 2.7 and 3.4 since caniusepython3 checks for any python 3 compatibility.

I'll do it today :)

@delfick
Copy link
Owner

delfick commented Apr 27, 2018

Ok, version 1.6 now doesn't trip up caniusepython3 :)

@delfick delfick closed this as completed Apr 27, 2018
@adiroiban
Copy link

First. Many thanks for this library!

Was this fixed ?

I see that setup.py still talks about python2.7

https://github.com/delfick/python-dict2xml/blob/main/setup.py#L23

Also, I can do something like python2.7 -m pip wheel dict2xml==1.7.0 and will generate the package without complaining ... but then when using 1.7.0 on python2.7 you get the errors.

@delfick
Copy link
Owner

delfick commented Jan 29, 2022

you make a valid point, however I'm not sure you'll like my solution. Python2 has been deprecated for almost 15 years and is completely end of life since 1 Jan 2020 (python/devguide#344). Since the last version I released of this library it is now python3 only and with the next release (after PR #17 is merged) will add this to the setup.py so it can't be installed on python2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants