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

python2.7 will be removed from the python-versions on June 19 #672

Closed
dmitry-shibanov opened this issue May 23, 2023 · 31 comments
Closed

python2.7 will be removed from the python-versions on June 19 #672

dmitry-shibanov opened this issue May 23, 2023 · 31 comments

Comments

@dmitry-shibanov
Copy link
Contributor

Breaking changes

Hello everyone. The Python 2.7.x will be removed from python-versions and it won't be possible to set up Python 2.7.x by setup-python.

The motivation for the changes

Python2.7 is not supported since January 1, 2020.

@rtibbles
Copy link

Hi @dmitry-shibanov - do you have any recommended ways to mitigate this for those of us that cannot remove usage of Python 2.7 from our Github Actions before the June 19th deadline?

@bernhardkaindl
Copy link

bernhardkaindl commented May 30, 2023

@dmitry-shibanov

It has already been delayed.

@konradpabjan I hope this can be cancelled like the previous times. I think there will be customer backslash again which would not be justified.

There is no point in removing it.

Linux Distros like Ubuntu 20.04 which contain Python2.7 support Python 2.7 for many many years to come. Canonical will maintain it until April 2025, and it will have emergency security updates in 20.04 until April 2030. Similar for Red Hat and SUSE.

@boegel
Copy link

boegel commented Jun 1, 2023

We started hitting this today already (1 June 2023), leading to:

Error: Version 2.7 with arch x64 not found

Support for Python 2.7 is deprecated in our project already, so we'll just stop testing on top of Python 2.7 and not lose sleep over it, but it would be nice if there's a documented/recommended alternative for people that do still want to keep testing on top of Python 2.7 in the near future.

@hugovk
Copy link
Contributor

hugovk commented Jun 1, 2023

There's a community-maintained Dockerfile in the works: actions/runner-images#7401 (comment)

mathiascode added a commit to devsnd/tinytag that referenced this issue Jun 2, 2023
Python 2.7 will not be supported by GitHub Actions any longer: actions/setup-python#672

We can continue using PyPy 2.7 to test Python 2 until we drop support in tinytag 2.0.0.
@tzortzispanagiotis
Copy link

Guys, do we have a suggested workaround? This is a huge deal for us - whole project depends on python 2 so we would not be able to deploy anything. If anyone has an idea, please help :)

@tzortzispanagiotis
Copy link

To anyone concerned:
You can continue using github-hosted runners with python2.7 by running the job inside a container.
e.g. I used python:2.7-buster image and everything works out just fine.

No need to use setup-python or be dependent of runner-images anymore.

@MatteoH2O1999
Copy link

MatteoH2O1999 commented Jun 8, 2023

If you don't need 2.7 for windows, you could use my custom action MatteoH2O1999/setup-python.
This action tries to build from source all Python versions that actions/setup-python does not support.
It also allows to cache built versions so that after the first run, installation time is really low.
For an example of a run see this workflow.

Windows support is in the works but no ETA (note that for Windows it will still allow for versions that are supported by 'actions/setup-python' to successfully complete).

@dimitrisr
Copy link

To anyone concerned: You can continue using github-hosted runners with python2.7 by running the job inside a container. e.g. I used python:2.7-buster image and everything works out just fine.

Hello @tzortzispanagiotis, could you please provide an example for this? 🙏

Thanks in advance.

@tzortzispanagiotis
Copy link

Hello @dimitrisr,

In order to overcome this I modified:

runs-on: ubuntu-20.04

to

runs-on: ubuntu-20.04
    container:
      image: python:2.7.18-buster

So that the job is run using a github-hosted runner, but inside the python2.7-buster container, which has set up python2.7

Then I started running the pipeline and started fixing everything that was broken (because the container does not have things as sudo, so you have to install it with a command)

Also, If your CI pipeline has other services (e.g. mysql) that run inside a container, now that the whole job is running inside a container, the service container is accessible not through localhost (127.0.0.1), but through the service name.

I hope I was helpful!

@dimitrisr
Copy link

Thank you @tzortzispanagiotis, this was really helpful! I was able to run the actions successfully :)

quinnmil pushed a commit to scoutapp/scout_apm_python that referenced this issue Aug 28, 2023
* Allow exceptions for pkg_resources usages from pyramid and cherrypy.

* Move python 3.6 to ubuntu 20 GitHub action runner.

Py36 isn't included with ubuntu 22

* Update rq test dependency for dropped 3.6 support.

* Use a specific python 2.7 image for tests.

See actions/setup-python#672

Don't use setup-python for python2.7

* Pin importlib_metadata for < py3.8 in the tests.

* Handle sqlalchemy deprecations and start of v2 support.

* Disable tests for SQLAlchemy v2 to allow CI to pass.

* Update pre-commit repo versions.

* Support flask_sqlalchemy v3

get_engine was deprecated in favor of make_engine.

* Support ElasticSearch 8.7 health_report API.

Update python3.6 tests to use elasticsearch 7

* Update tests to be compatible with rq v1.13+

* Switch python 3.4 GitHub action to run on a custom container.

* Update changelog for CI fixes.
quinnmil pushed a commit to scoutapp/scout_apm_python that referenced this issue Aug 28, 2023
* Allow exceptions for pkg_resources usages from pyramid and cherrypy.

* Move python 3.6 to ubuntu 20 GitHub action runner.

Py36 isn't included with ubuntu 22

* Update rq test dependency for dropped 3.6 support.

* Use a specific python 2.7 image for tests.

See actions/setup-python#672

Don't use setup-python for python2.7

* Pin importlib_metadata for < py3.8 in the tests.

* Handle sqlalchemy deprecations and start of v2 support.

* Disable tests for SQLAlchemy v2 to allow CI to pass.

* Update pre-commit repo versions.

* Support flask_sqlalchemy v3

get_engine was deprecated in favor of make_engine.

* Support ElasticSearch 8.7 health_report API.

Update python3.6 tests to use elasticsearch 7

* Update tests to be compatible with rq v1.13+

* Switch python 3.4 GitHub action to run on a custom container.

* Update changelog for CI fixes.
quinnmil added a commit to scoutapp/scout_apm_python that referenced this issue Aug 29, 2023
* Resolve CI errors (#752)

* Allow exceptions for pkg_resources usages from pyramid and cherrypy.

* Move python 3.6 to ubuntu 20 GitHub action runner.

Py36 isn't included with ubuntu 22

* Update rq test dependency for dropped 3.6 support.

* Use a specific python 2.7 image for tests.

See actions/setup-python#672

Don't use setup-python for python2.7

* Pin importlib_metadata for < py3.8 in the tests.

* Handle sqlalchemy deprecations and start of v2 support.

* Disable tests for SQLAlchemy v2 to allow CI to pass.

* Update pre-commit repo versions.

* Support flask_sqlalchemy v3

get_engine was deprecated in favor of make_engine.

* Support ElasticSearch 8.7 health_report API.

Update python3.6 tests to use elasticsearch 7

* Update tests to be compatible with rq v1.13+

* Switch python 3.4 GitHub action to run on a custom container.

* Update changelog for CI fixes.

* Fix build for python 3.11 (#748)

* Fix build for python 3.11

* Skip cp311 for manylinux2010 build.

* Update python and django versions. (#753)

* simplify test and build

* cleanup test-ubuntu-20 workflow

* use text method in flask_sqlalchemy tests
skip 3.12+ wheel builds

* fix test sqlalchemy tests

---------

Co-authored-by: Tim Schilling <schillingt@better-simple.com>
s3rvac added a commit to s3rvac/weechat-notify-send that referenced this issue Sep 5, 2023
Python 2.7 is no longer supported by GitHub Actions [1].

[1] actions/setup-python#672
quinnmil added a commit to scoutapp/scout_apm_python that referenced this issue Sep 8, 2023
* 756 development tooling updates (#758)

* update isort and black versions. run linting

* add [tool.poetry] section to support poetry venv

* 757 remove support for unused frameworks - pt 1 (#760)

* update isort and black versions. run linting

* add [tool.poetry] section to support poetry venv

* remove old django versions from tox.ini

* remove pyramid and cherrypy support.
limit django support to >3.2

* ignore .idea/, replace celery in tox

* update manual testing example
re-link to broken celery issue for clarification

* remove eol python versions (#762)

* remove eol python versions

* updtae CI workflows to only handle 3.8+

* remove pyramid from setup, delete ubuntu 18 job

* restore comment for celery version

---------

Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>

---------

Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>
Co-authored-by: mitchh456 <93938392+mitchh456@users.noreply.github.com>

* remove nameko and starlett/api files for python <3.6 (#763)

Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>

* 764 update agent to fully support python 311 (#765)

* add py311 to test envs, use partial to create wrapt decorator for error service thread

* remove py3.5+ check for one test, specify <3.11 for realloc test because forcing realloc doesn't work in 3.11

---------

Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>

* Dev tim (#768)

* Resolve CI errors (#752)

* Allow exceptions for pkg_resources usages from pyramid and cherrypy.

* Move python 3.6 to ubuntu 20 GitHub action runner.

Py36 isn't included with ubuntu 22

* Update rq test dependency for dropped 3.6 support.

* Use a specific python 2.7 image for tests.

See actions/setup-python#672

Don't use setup-python for python2.7

* Pin importlib_metadata for < py3.8 in the tests.

* Handle sqlalchemy deprecations and start of v2 support.

* Disable tests for SQLAlchemy v2 to allow CI to pass.

* Update pre-commit repo versions.

* Support flask_sqlalchemy v3

get_engine was deprecated in favor of make_engine.

* Support ElasticSearch 8.7 health_report API.

Update python3.6 tests to use elasticsearch 7

* Update tests to be compatible with rq v1.13+

* Switch python 3.4 GitHub action to run on a custom container.

* Update changelog for CI fixes.

* Fix build for python 3.11 (#748)

* Fix build for python 3.11

* Skip cp311 for manylinux2010 build.

* Update python and django versions. (#753)

* simplify test and build

* cleanup test-ubuntu-20 workflow

* use text method in flask_sqlalchemy tests
skip 3.12+ wheel builds

* fix test sqlalchemy tests

---------

Co-authored-by: Tim Schilling <schillingt@better-simple.com>

* update pymongo collection methods

* replace deprecated manylinux image with 2_28

* add xpack.security.enabled flag to elasticserach

* use elasticsearch <8.0 for <=3.9

* reformat cibw_skip argument

* reformat cibw_skip argument

* remove manylinux1 and manylinux2010 wheel builds

* remove manylinux1 and manylinux2010 wheel builds

* remove i686 from manylinux_2_28 build because it doesn't exist

* consolidate aarch config into main. We want aarch for all, no need for conditional anymore

* fix delete aarch step

* bump version to 3.0.0

* re-add django 3.2 to tests, remove erroneous django version checks

* remove in-code python version checks (#771)

* remove in-code python version checks that no longer apply when supporting py3.8+ only

* remove usage of text_type and string_type

* fix SimpleNamespace imports

* fix mocked side effect error

---------

Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>

* remove __future__ imports (#772)

* remove in-code python version checks that no longer apply when supporting py3.8+ only

* remove usage of text_type and string_type

* fix SimpleNamespace imports

* fix mocked side effect error

* remove __future__ imports

* fix expected line for error in test

---------

Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>

* update changelog and set version to 3.0.0rc1

* update changelog and set version to 3.0.0rc1

* adjust formatting of changelog

---------

Co-authored-by: Quinn Milionis <35316732+quinnmil@users.noreply.github.com>
Co-authored-by: Mitch Hartweg <mitchell@scoutapm.com>
Co-authored-by: Tim Schilling <schillingt@better-simple.com>
Co-authored-by: Quinn Milionis <quinn@scoutapm.com>
ivantodorovich added a commit to camptocamp/marabunta that referenced this issue Sep 11, 2023
Python 2.7 is no longer officially supported and it was removed from
setup-python. actions/setup-python#672.

Python 3.5 and 3.6 aren't really used neither, and CI is currently failing due
to:

```
Version 3.5 was not found in the local cache
Error: The version '3.5' with architecture 'x64' was not found for Ubuntu 22.04.
```

In any case, packages up to marabunta<=0.10.6 have been published and do support
these deprecated python versions.
ivantodorovich added a commit to camptocamp/marabunta that referenced this issue Sep 11, 2023
Python 2.7 is no longer officially supported and it was removed from
setup-python. actions/setup-python#672.

Python 3.5 and 3.6 aren't really used neither, and CI is currently failing due
to:

```
Version 3.5 was not found in the local cache
Error: The version '3.5' with architecture 'x64' was not found for Ubuntu 22.04.
```

In any case, packages up to marabunta<=0.10.6 have been published and do support
these deprecated python versions.
jstasiak added a commit to netaddr/netaddr that referenced this issue Sep 14, 2023
The version is no longer available through setup-python[1].

actions/setup-python#672
jstasiak added a commit to netaddr/netaddr that referenced this issue Sep 14, 2023
It's currently failing because:

* Python 2.7 is no longer supported[1]
* setup-python v2 can't find PyPy3.6 on Mac, I think upgrading to v4
  will help

Upgrading setup-python to v4 requires us to change how to refer to PyPy
– we have to specify the actual version now.

[1] actions/setup-python#672
jstasiak added a commit to netaddr/netaddr that referenced this issue Sep 14, 2023
* Get the CI running again

It's currently failing because:

* Python 2.7 is no longer supported[1]
* setup-python v2 can't find PyPy3.6 on Mac, I think upgrading to v4
  will help

Upgrading setup-python to v4 requires us to change how to refer to PyPy
– we have to specify the actual version now.

[1] actions/setup-python#672
thiell added a commit to thiell/clustershell that referenced this issue Sep 16, 2023
The support for python 2.7 was removed on June 19.
Related issue: actions/setup-python#672
jvansanten added a commit to icecube/photospline that referenced this issue Sep 18, 2023
jvansanten added a commit to icecube/photospline that referenced this issue Sep 18, 2023
github-merge-queue bot pushed a commit to cea-hpc/clustershell that referenced this issue Sep 18, 2023
The support for python 2.7 was removed on June 19.
Related issue: actions/setup-python#672
Kyle-Verhoog added a commit to DataDog/envier that referenced this issue Sep 26, 2023
Support for Python versions 2.7 and 3.5 were dropped by the Github action. See actions/setup-python#672 for more info.

To work around this we can test using our own image.
Kyle-Verhoog added a commit to DataDog/envier that referenced this issue Sep 26, 2023
Support for Python versions 2.7 and 3.5 were dropped by the Github action. See actions/setup-python#672 for more info.

To work around this we can test using our own image.
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