-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Prevent .whl installation (OOTB) on non Win #394
Conversation
Thank you for your suggestions. Aside from code reviews, I am wondering about something. The community is currently planning to end support for Python 2.7 and support for Python 3.7+ only. We are also considering preparing a branch for development based on after drop-Python2.7 support. In this situation, I am wondering if adding version bridges and workarounds that take Python2 into account would not require extra effort to remove them when Python3-only support is starting. To the other maintainers; what are your thoughts? |
Prioritize support for non-EOL Pythons and then only support older versions where demand exists and resources allow. In my experience on very popular projects, there’s almost zero demand for Python 2.7. |
Of course things move forward, and it's not good to be left behind. So if wanting to benefit from newer language features (fstrings, typing, match, ...) support for older versions should be gradually dropped in future versions. Now, I'm not familiar with the code so I don't know what it takes keeping code Python 3.5 compatible for example. If I was to make a decision, I too would aim only for currently supported Python versions, but I'd deprecate the older ones first:
Regarding specific demands, I don't know how those are handled, but I'd create a branch starting from a (supported) base state and port any required features into that branch then make a release out of it. Now regarding this PR: since Python 2.7 is working (installing and importing module) before my changes, I didn't want that this PR to be the one that breaks support, that's why I added some (clumsy) Python2 stuff (which I can easily remove if requested). |
Here is a time table for what the OEL for the different Python version are and are going to be as well. It would only make sense to support Python 3.8 and above in any changes that are going to be made. I believe 3.8 is when a lot of type hinting support was added as well. |
Thank you for responses. My other concern is the code changed in this PR could be further changed because So unless @CristiFati wants to reflect this PR from the next version of And let's discuss in more appropriate issue #392 about which Python 3.x to start supporting in the future. |
NOTE: this is related to #229 |
Are you interested in modifying this PR for |
@junkmd: Sure. |
OK, please change the base of this PR to |
Closing as branches have been messed up. |
Ok, I am waiting for your next PR. |
COM is Win specific and doesn't work on other OSes, therefore it shouldn't be possible to install the .whl on those OSes.
More: if it is installed on such OSes (although [PyPI]: comtypes mentions the Operating System value as Microsoft :: Windows - but that's easy to be ignored), the error is ambiguous as most people are not aware of the CTypes extension module (_ctypes.pyd / _ctypes*.so). Example: [SO]: cannot import name 'COMError' from '_ctypes'.
This PR addresses the above, using Python's packaging mechanism. Drawbacks:
Tests:
"e:\Work\Dev\VEnvs\py_pc064_03.09_test0\Scripts\python.exe" setup.py bdist_wheel --python-tag py3.py2
Update #0:
Closed this and replaced by #405.