-
Notifications
You must be signed in to change notification settings - Fork 158
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
Drop Python 2 and 3.4 support #229
Merged
Merged
Commits on Jun 25, 2021
-
Drop Python 2 and 3.4: Update Metadata, ChangeLog
This starts a series of commits to drop support for Python 2 and 3.4 as discussed in [pydot#171][171] and [pydot#229][229]. | Python version | Python EOL | PyPI 2020-05-02 | PyPI 2021-06-21 | |----------------|------------|-----------------|-----------------| | Python 2.7 | 2020-01-01 | 26% | 12% | | Python 3.4 | 2019-03-18 | 0% | 0% | | Python 3.5 | 2020-09-30 | 27% | 3% | | Python 3.6 | 2021-12 | 21% | 14% | | Python 3.7 | 2023-06 | 23% | 51% | | Python 3.8 | 2024-10 | 3% | 13% | | Python 3.9 | 2025-10 | 0% | 6% | | Python 3.10 | 2026-10 | - | 0% | EOL : End of life, from End of security support on [Wikipedia][1]. PyPI: Python Package Index statistics for pydot from [PyPIstats.org][2]. Without support for Python 2, wheel distributions of pydot can [no longer be marked as "universal"][3], so removing that from `setup.cfg`. **USER FEEDBACK REQUESTED** We are considering if pydot 2.0 should drop support for Python 3.5 and 3.6 as well. If this would affect you, please leave a comment in [pydot#268][268]. [1]: https://en.wikipedia.org/w/index.php?title=History_of_Python&oldid=1022680403#Table_of_versions [2]: https://pypistats.org/packages/pydot [3]: https://github.com/pypa/packaging.python.org/blob/44313e5db4d729eede0bcb91c08d6ec93e89c5c8/source/guides/dropping-older-python-versions.rst#dealing-with-the-universal-wheels [171]: pydot#171 (comment) [229]: pydot#229 [268]: pydot#268
Configuration menu - View commit details
-
Copy full SHA for ca99098 - Browse repository at this point
Copy the full SHA ca99098View commit details -
Drop Python 2 and 3.4: Update CI configuration
Specifically for AppVeyor: - Explicitely choose the image to be used (Visual Studio 2019), as the default image (Visual Studio 2015) does not have Python 3.8 *in Miniconda*. There is no image with Python 3.9 in Miniconda available yet. [1] - Add `fast_finish` option [2] to prevent running subsequent jobs if the first job fails. - Normally only test the oldest and the newest Python versions pydot supports, which are currently Python 3.5 (EOL) and 3.9. However, now using 3.6 instead of 3.5, because AppVeyor fails to install pyparsing in 3.5, and using 3.8 instead of 3.9 because 3.9 is not available on AppVeyor yet (see above). - Correct a typo in the `init` that prevented correct printing of environment variables. [1]: https://www.appveyor.com/docs/windows-images-software/#miniconda [2]: https://www.appveyor.com/docs/build-configuration/#failing-strategy
Configuration menu - View commit details
-
Copy full SHA for 5ccf7ac - Browse repository at this point
Copy the full SHA 5ccf7acView commit details -
Stop using
str
as a function parameter name`dot_parser.py` currently has 6 functions that still use `str` as a parameter name. This will cause conflicts if inside the function body a reference to Python's built-in [`str` type][1] needs to be made. Specifically, as part of the clean up of old Python 2 code, the next commit will introduce direct usage of the built-in `str` in two of these functions. The concurrent use of `str` as a function parameter name would then lead to name collisions and errors such as: File "dot_parser.py", line 349, in push_edge_stmt elif isinstance(toks[2][0], str): TypeError: isinstance() arg 2 must be a type or tuple of types Commit 842173c already renamed the parameter for one particular function from `str` to `s` in 2008. This commit will now do the same for the remaining functions. Further notes: - None of the affected functions actually use the parameter (`str`, now `s`) in their function bodies. - The functions themselves are passed to `pyparsing.setParseAction()` as callback functions. The docstring of that method also uses the parameter name `s` in the example callback signature. However, the actual parameter name is irrelevant for pyparsing (2.4.7), as it uses positional arguments when actually calling the callback. - The affected functions contain 3 format strings that use `{s}` as a replacement field name. Other than perhaps being slightly disturbing to the human reader, these do not actually collide with the function parameters named `s`, so leaving them as-is for now. A future change to f-strings would be a better way to resolve the confusion. [1]: https://docs.python.org/3/library/stdtypes.html#str
Configuration menu - View commit details
-
Copy full SHA for 54f9c57 - Browse repository at this point
Copy the full SHA 54f9c57View commit details -
Drop Python 2 and 3.4: Clean up PY2-specific code
Just a very basic cleanup, made with some help from 2to3. Includes the removal of intermediairy variable `str_type`, which held the string type for either Python 2 or 3, replacing it with the string type for Python 3 `str`. The previous commit prepared for this by removing the conflicting uses of the name `str` as function parameter names.
Configuration menu - View commit details
-
Copy full SHA for 439cff3 - Browse repository at this point
Copy the full SHA 439cff3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d45fff - Browse repository at this point
Copy the full SHA 4d45fffView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.