-
Notifications
You must be signed in to change notification settings - Fork 793
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
Added supported Python versions to package metadata #2028
base: main
Are you sure you want to change the base?
Conversation
5527984
to
4683ff4
Compare
By itself, this PR is still doing something worthwhile. And it would make sense to merge before the next release or minimum python version bump (#2207) If @andy-maier feels like this addresses their issue, then I'd be happy to close #1448 Although there's a quick conflict to resolve first. |
I'm interested to know what that is in concrete terms. Do you mean that currently, someone trying to use My main concern about this patch is that it seems error prone. What exactly happens if we fail to bump that in the future? How will be avoid bumping the min version to 3.8 but forgetting this exists? I'd feel slightly better about it if it was parsed from
It seems impossible for this to solve that issue, right? |
Come to think of it, because only version-specific wheels are shipped, it's probably not possible to even do that.
Should've tested again. As for the original issue: Adding a version pin wouldn't have helped, up or down. If anything it might be too restrictive. I also don't see pywin32 shipping source distribution either anyway. And even when it comes to classifiers, pywin32 can't promise to be working on a python version before it's out and tested. Nor can it backport adding wheels, updating classifier, updating python_requires, if a Python version just released that happens to build/work w/o breaking changes. |
In other words: Adding this today would change nothing, the 3.8+3.9 classifiers were forgotten until version 228. |
I am not arguing to fix older versions of pywin32. But future versions simply should follow what most packages on Pypi do: Declare the Python requirements in such a way that pip understands them. Pip understands the "python_requires" statement, but not the Trove classifiers. Also, since pywin32 is a package that delivers Python version-specific compiled wheel files, it can only really support Python versions for which it provides a wheel file. Pip cannot install pywin32 on Python versions for which there is no wheel file. For example, pywin32 version 306 added wheel files for Python 3.12. If a user is using pywin32 version 303 on Python 3.12, pip will try to install it (due to lack of a useable Python requirement in the package metadata), and will fail because a wheel file is not available (That happened in our pywbem project, see this log file). If pywin32 declared the Python versions for which it provides wheel files, pip would not even try version 303 on Python 3.12. That has the same net effect for the user (pywin32 303 cannot be used on Python 3.12), but pip provides a much clearer error message than when it attempts the install and then fails during install. In the previous version of this PR, I did not consider the fact that pip depends on the presence of wheel files. I have just updated the PR to accommodate that, and have also updated the Python versions to what pywin32 version 306 supports. PS: I tried to find a recommendation for adding |
Details: * Added the 'python_requires' argument to setup() to specify the supported Python versions in the package metadata. Installers such as pip depend on that, and there are issues such as mhammond#1448 when the installer does not have that information in the package. Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
1e4261f
to
797031a
Compare
Can you please elaborate here? How exactly would this happen? I understand that if someone manually downloads |
This PR addresses issue #1448
Details: