Skip to content

Python 3 is the default nowadays #173

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

Merged
merged 1 commit into from
May 4, 2025
Merged

Conversation

DimitriPapadopoulos
Copy link
Contributor

No description provided.

@jaraco jaraco merged commit 8673961 into jaraco:main May 4, 2025
13 of 15 checks passed
@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented May 4, 2025

For the sake of completeness, other maintainers claim that some version of Python needs to be defined for stability:

However, I fail to see how 3.x defines some version of Python from reading the documentation:
https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-python-version-input

Unless python-version: 3.x means the latest Python released while lack of python-version could mean any version of Python 3, for example whatever version is installed by default on the runner? But then I cannot find anything in the documentation clearly supporting that.

@DimitriPapadopoulos DimitriPapadopoulos deleted the 3.x branch May 4, 2025 20:30
@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented May 4, 2025

@jaraco From actions/setup-python/README.md:

The python-version input is optional. If not supplied, the action will try to resolve the version from the default .python-version file. If the .python-version file doesn't exist Python or PyPy version from the PATH will be used.

The crucial part of information that I missed in https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#using-the-python-version-input is:

x-ranges to specify the latest stable version of Python (for the specified major version):

So indeed, python-version: 3.x will pull the latest release of Python 3 (currently 3.13.3), while the default version of Python on the runner will be used in the absence of python-version. The latter version could be too old (say 3.7 or 3.8).

Should I revert?

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented May 5, 2025

The modified job is collateral and it runs on ubuntu-latest. The native Python of ubuntu-latest, currently ubuntu-24.04, is Python 3.12. It should be good enough to install and run tox (python -m pip install tox and tox -e release) until ubuntu-latest switches to ubuntu-26.04, but I cannot guarantee this will remain robust in the long term.

@jaraco
Copy link
Owner

jaraco commented May 6, 2025

I'd really prefer to use the latest stable Python for those jobs. Yes, let's revert those lines. Thanks.

DimitriPapadopoulos added a commit to DimitriPapadopoulos/skeleton that referenced this pull request May 6, 2025
This reverts commit 8673961.

Removing of `python-version` falls back on the Python bundled with
the runner, making actions/setup-python a no-op. Here, the maintainer
prefers using the latest release of Python 3. This is what `3.x` means:
use the latest release of Python 3.
DimitriPapadopoulos added a commit to DimitriPapadopoulos/skeleton that referenced this pull request May 6, 2025
This reverts commit 8673961.

Removing `python-version` falls back on the Python bundled with the
runner, making actions/setup-python a no-op. Here, the maintainer
prefers using the latest release of Python 3. This is what `3.x` means:
use the latest release of Python 3.
DimitriPapadopoulos added a commit to DimitriPapadopoulos/skeleton that referenced this pull request May 6, 2025
This reverts commit 8673961.

Removing `python-version` falls back on the Python bundled with the
runner, making actions/setup-python a no-op. Here, the maintainer
prefers using the latest release of Python 3. This is what `3.x` means:
use the latest release of Python 3.
jaraco pushed a commit that referenced this pull request May 10, 2025
This reverts commit 8673961.

Removing `python-version` falls back on the Python bundled with the
runner, making actions/setup-python a no-op. Here, the maintainer
prefers using the latest release of Python 3. This is what `3.x` means:
use the latest release of Python 3.
@jaraco jaraco mentioned this pull request May 11, 2025
2 tasks
clrpackages pushed a commit to clearlinux-pkgs/pypi-setuptools that referenced this pull request May 22, 2025
…version 80.8.0

Anderson Bravalheri (8):
      Suggestions for documentation about public interfaces
      Fix error in windows test
      Add newsfragment
      Restore delayed import of pkg_resources
      Remove methods already defined in Distutils
      Add newsfragment
      Comment out unused build dependency
      Add news fragment

Dimitri Papadopoulos Orfanos (2):
      Python 3 is the default nowadays (jaraco/skeleton#173)
      Revert "Python 3 is the default nowadays (jaraco/skeleton#173)" (jaraco/skeleton#175)

Jason R. Coombs (36):
      Add documentation describing which interfaces are supported.
      Add coherent.licensed plugin to inject license texts into the build.
      Make the quickstart primary.
      Remove comment referring to pkg_resources.
      In bdist_egg, remove reliance on pkg_resources.
      Convert stub into a single string for easier human parsing.
      In build_ext, remove reliance on pkg_resources.
      Converted install_scripts and _scripts to prefer importlib.metadata over pkg_resources.
      Add a compatibility shim and warning for legacy use on ScriptWriter.get_args
      Prefer importlib.resources in _scripts.
      Remove unused context manager.
      Adapt test_distinfo to test_version and migrate to use importlib.metadata.
      Removed test_version and test_conditional_dependencies, as these tests were only exercising expectations about pkg_resources and not dist_info.
      Prefer importlib.resources in test_windows_wrappers.
      Add news fragment.
      Fixup docs build
      Bump version: 80.4.0 → 80.5.0
      Bump to setuptools 77 or later.
      Remove comments referring to pkg_resources and inline a compatibility behavior with its explanation.
      Set the due date for installer removal (same as easy_install and package_index).
      Rely on importlib.metadata to detect presence of wheel.
      Replace pkg_resources with packaging.requirements.
      Migrated installer to avoid pkg_resources.
      Add news fragment.
      Normalize imports
      Add news fragment.
      Bump version: 80.5.0 → 80.6.0
      Bump version: 80.6.0 → 80.7.0
      Only attempt to fetch eggs for unsatisfied requirements.
      In installer, when discovering egg dists, let metadata discovery search each egg.
      Bump version: 80.7.0 → 80.7.1
      Restore explicit LICENSE file
      Extract a method for converting requires.
      Replace pkg_resources with importlib.metadata and packaging.requirements.
      Add news fragment.
      Bump version: 80.7.1 → 80.8.0

Michał Górny (2):
      Mark new tests as `uses_network`
      Add a news fragment
hswong3i pushed a commit to alvistack/jaraco-portend that referenced this pull request May 30, 2025
hswong3i pushed a commit to alvistack/jaraco-portend that referenced this pull request May 30, 2025
…co/skeleton#175)

This reverts commit 8673961.

Removing `python-version` falls back on the Python bundled with the
runner, making actions/setup-python a no-op. Here, the maintainer
prefers using the latest release of Python 3. This is what `3.x` means:
use the latest release of Python 3.
hswong3i pushed a commit to alvistack/jaraco-tempora that referenced this pull request Jun 23, 2025
hswong3i pushed a commit to alvistack/jaraco-tempora that referenced this pull request Jun 23, 2025
…co/skeleton#175)

This reverts commit 8673961.

Removing `python-version` falls back on the Python bundled with the
runner, making actions/setup-python a no-op. Here, the maintainer
prefers using the latest release of Python 3. This is what `3.x` means:
use the latest release of Python 3.
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.

2 participants