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

Support Python 3.8, 3.9 and 3.10, drop EOL Python versions (2.7, 3.4, 3.5), use GitHub Actions for CI #214

Merged
merged 15 commits into from
Feb 14, 2022

Conversation

tjanez
Copy link
Collaborator

@tjanez tjanez commented Aug 1, 2019

This PR:

  • adds support for Python 3.8, 3.9 and 3.10,
  • drops support for EOL Python versions (2.7, 3.4, 3.5),
  • replaces Travis CI and AppVeyor with GitHub Actions,
  • updates/fixes tests for new virtualenv (version 20+).

TODO:

Fixes #219.

This will start testing Pew with the upcoming Python 3.8.

NOTE: The Travis tests are configured to use the "3.8-dev" version and should be switched to "3.8" once it is released.

I've also pinned virtualenv dependency to <20.0.0 (support for virtualenv 20+ is tracked in #219) for now and rewritten the AppVeyor configuration to fix test issues there.

@tjanez
Copy link
Collaborator Author

tjanez commented Aug 6, 2020

@pfmoore, this is ready for review.

@pfmoore
Copy link
Collaborator

pfmoore commented Aug 6, 2020

Travis build is failing. Also, needs confirmation that dropping support for the older Python versions is acceptable (I'm OK with doing so myself, but it's not my call).

@tjanez
Copy link
Collaborator Author

tjanez commented Aug 6, 2020

Travis build is failing.

Yes, the Nix job is failing but apparently, it has been failing for a while since the last successful build on the master branch is from Oct 5, 2019 (Build 557).

Also, needs confirmation that dropping support for the older Python versions is acceptable (I'm OK with doing so myself, but it's not my call).

Ok, let's wait for @berdario.

@tjanez tjanez changed the title Support Python 3.8, drop remaining references to Python 2.6, 3.2 and 3.3 Support Python 3.8, drop Python 3.4, fix AppVeyor CI Aug 6, 2020
@tjanez
Copy link
Collaborator Author

tjanez commented Aug 17, 2020

Travis build is failing. Also, needs confirmation that dropping support for the older Python versions is acceptable (I'm OK with doing so myself, but it's not my call).

@pfmoore, I've removed the dropping of Python 3.4 commit to be able to get this PR merged quicker.

Travis build is failing.

Yes, the Nix job is failing but apparently, it has been failing for a while since the last successful build on the master branch is from Oct 5, 2019 (Build 557).

I've filled #221 and temporarily allowed Nix build jobs to fail on Travis CI since this issue is unrelated to this (or other open) PRs.

Please, take another look at this PR.

@tjanez tjanez changed the title Support Python 3.8, drop Python 3.4, fix AppVeyor CI Support Python 3.8, pin virtualenv dependency, update CI config Aug 17, 2020
setup.py Outdated Show resolved Hide resolved
@pfmoore
Copy link
Collaborator

pfmoore commented Aug 17, 2020

Still needs @berdario to comment. But I have pointed out that I don't want the project to force an older version of virtualenv. So I'd rather the virtualenv wasn't pinned, but #219 gets addressed. I'd object to a release that pinned to the old version, so I see no point in adding a pin now, just to have taking it out again be a release blocker...

@tjanez tjanez changed the title Support Python 3.8, pin virtualenv dependency, update CI config Support Python 3.8 and 3.9, drop EOL Python versions (2.7, 3.4, 3.5), use GitHub Actions for CI Aug 26, 2021
@tjanez
Copy link
Collaborator Author

tjanez commented Aug 26, 2021

But I have pointed out that I don't want the project to force an older version of virtualenv. So I'd rather the virtualenv wasn't pinned, but #219 gets addressed. I'd object to a release that pinned to the old version, so I see no point in adding a pin now, just to have taking it out again be a release blocker...

Agreed.

@pfmoore, I'm trying to revive Pew with this PR. 3 tests are still failing, but otherwise it should be ready for review.

@pfmoore
Copy link
Collaborator

pfmoore commented Aug 26, 2021

@tjanez I just restarted the discussion at #218. I don't know what will come of it, but I think we need some statement from @berdario. Also, I don't have access to the project settings to switch off Appveyor, so I can't fix the CI failure or make the "drop Appveyor" part of this change work. (Travis doesn't seem to have this issue, I don't know why Appveyor is different...)

@frenzymadness
Copy link

By the way, Python 3.10rc1 is out so it might make sense to add it there as well.

@tjanez
Copy link
Collaborator Author

tjanez commented Aug 26, 2021

Also, I don't have access to the project settings to switch off Appveyor, so I can't fix the CI failure or make the "drop Appveyor" part of this change work. (Travis doesn't seem to have this issue, I don't know why Appveyor is different...)

Yeah, I know. But apparently, we could merge the PR regardless of AppVeyor failures.

Python 2 has been EOL for since Jan 1, 2020, Python 3.4 has been EOL
since Mar 18, 2019 and Python 3.5 has been EOL since Sep 13, 2020.

Drop obsolete 'from __future__' imports, drop obsolete conditionals due
to Python 2 vs. 3 differences.
Virtualenv 20+ doesn't support --relocatable anymore and nothing in Pew
really depended on that.
PyPy 2.6.1's download link is not working anymore.
In general, submodules and subpackages are not imported when one imports
a package, unless they are explicitly included in the package's
__init__.py.

To avoid a potential issue, explicitly import get_python_lib() from
distutils.sysconfig subpackage.
The easy_install top-level model and the easy_install console script
have been removed in setuptools 52+:
https://setuptools.readthedocs.io/en/latest/history.html#v52-0-0

Replace them with a setuptools exec that check for presence of a
setuptools dist-info, e.g. setuptools-57.4.0.dist-info.
Previoulsy, test_restore test relied on breaking the test virtualenv by
removing the site.py from the test virtualenv.

Since virtualenv 20+ doesn't inject its own site.py when creating a
Python 3 virtualenv anymore, reling on removing the site.py from the
testing virtualenv no longer works.

Deleting everything related to setuptools seems like a good way to break
the 'import setuptools' statement.
@tjanez tjanez changed the title Support Python 3.8 and 3.9, drop EOL Python versions (2.7, 3.4, 3.5), use GitHub Actions for CI Support Python 3.8, 3.9 and 3.10, drop EOL Python versions (2.7, 3.4, 3.5), use GitHub Actions for CI Oct 1, 2021
@tjanez tjanez requested a review from pfmoore October 1, 2021 10:27
@tjanez tjanez dismissed pfmoore’s stale review October 1, 2021 11:03

I've dropped the commit that pins virtualenv to < 20.0.0

@tjanez
Copy link
Collaborator Author

tjanez commented Feb 14, 2022

This code has been in Fedora 35 since Oct 1, 2021 and is being actively used/tested.

@tjanez tjanez merged commit d457910 into pew-org:master Feb 14, 2022
@tjanez tjanez deleted the support-python38 branch February 14, 2022 11:20
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

Successfully merging this pull request may close these issues.

Support virtualenv 20+
3 participants