Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pypa/setuptools into type-p…
Browse files Browse the repository at this point in the history
…kg_resources
  • Loading branch information
Avasam committed May 9, 2024
2 parents c434301 + abe6580 commit a97f7a7
Show file tree
Hide file tree
Showing 318 changed files with 11,990 additions and 8,569 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 69.1.1
current_version = 69.5.1
commit = True
tag = True

Expand Down
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
omit =
# leading `*/` for pytest-dev/pytest-cov#456
*/.tox/*

# local
*/_vendor/*
*/tools/*
*/setuptools/_distutils/*

disable_warnings =
couldnt-parse

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-sage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
&& echo "sage-package create ${{ env.SPKG }} --pypi --source normal --type standard; sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard" > upstream/update-pkgs.sh \
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
&& ls -l upstream/
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
path: upstream
name: upstream
Expand Down
45 changes: 30 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ on:
merge_group:
push:
branches-ignore:
# disabled for jaraco/skeleton#103
# - gh-readonly-queue/** # Temporary merge queue-related GH-made branches
# temporary GH branches relating to merge queues (jaraco/skeleton#93)
- gh-readonly-queue/**
tags:
# required if branches-ignore is supplied (jaraco/skeleton#103)
- '**'
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -36,10 +39,10 @@ env:
jobs:
test:
strategy:
# https://blog.jaraco.com/efficient-use-of-ci-resources/
matrix:
python:
- "3.8"
- "3.11"
- "3.12"
platform:
- ubuntu-latest
Expand All @@ -50,12 +53,20 @@ jobs:
platform: ubuntu-latest
- python: "3.10"
platform: ubuntu-latest
- python: "3.11"
platform: ubuntu-latest
- python: pypy3.10
platform: ubuntu-latest
distutils: stdlib
- platform: ubuntu-latest
python: "3.10"
distutils: stdlib
# Python 3.8, 3.9 are on macos-13 but not macos-latest (macos-14-arm64)
# https://github.com/actions/setup-python/issues/850
# https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
- {python: "3.8", platform: "macos-13"}
exclude:
- {python: "3.8", platform: "macos-latest"}
runs-on: ${{ matrix.platform }}
continue-on-error: ${{ matrix.python == '3.13' }}
env:
Expand All @@ -65,11 +76,11 @@ jobs:
- uses: actions/checkout@v4
- name: Setup Python
id: python-install
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: setuptools/tests/config/downloads/*.cfg
Expand All @@ -84,7 +95,8 @@ jobs:
shell: bash
run: |
rm -rf dist
pipx run build
# workaround for pypa/setuptools#4333
pipx run --pip-args 'pyproject-hooks!=1.1' build
echo "PRE_BUILT_SETUPTOOLS_SDIST=$(ls dist/*.tar.gz)" >> $GITHUB_ENV
echo "PRE_BUILT_SETUPTOOLS_WHEEL=$(ls dist/*.whl)" >> $GITHUB_ENV
rm -rf setuptools.egg-info # Avoid interfering with the other tests
Expand All @@ -100,14 +112,15 @@ jobs:
run: pipx run coverage xml --ignore-errors
- name: Publish coverage
if: hashFiles('coverage.xml') != '' # Rudimentary `file.exists()`
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
flags: >- # Mark which lines are covered by which envs
CI-GHA,
${{ github.job }},
OS-${{ runner.os }},
VM-${{ matrix.platform }},
Py-${{ steps.python-install.outputs.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}

collateral:
strategy:
Expand All @@ -116,13 +129,14 @@ jobs:
job:
- diffcov
- docs
- check-extern
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install tox
Expand Down Expand Up @@ -158,9 +172,9 @@ jobs:
runs-on: ${{ matrix.platform }}
timeout-minutes: 75
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Cygwin with Python
uses: cygwin/cygwin-install-action@v2
uses: cygwin/cygwin-install-action@v4
with:
platform: x86_64
packages: >-
Expand All @@ -171,7 +185,7 @@ jobs:
git,
- name: Record the currently selected Python version
id: python-install
# NOTE: This roughly emulates what `actions/setup-python@v4` provides
# NOTE: This roughly emulates what `actions/setup-python` provides
# NOTE: except the action gets the version from the installation path
# NOTE: on disk and we get it from runtime.
run: |
Expand All @@ -190,7 +204,7 @@ jobs:
shell: C:\cygwin\bin\env.exe CYGWIN_NOWINPATH=1 CHERE_INVOKING=1 C:\cygwin\bin\bash.exe -leo pipefail -o igncr {0}
- name: Publish coverage
if: hashFiles('coverage.xml') != '' # Rudimentary `file.exists()`
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: >-
${{ github.workspace }}\coverage.xml
Expand All @@ -200,6 +214,7 @@ jobs:
OS-${{ runner.os }},
VM-${{ matrix.platform }},
Py-${{ steps.python-install.outputs.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}

integration-test:
needs: test
Expand All @@ -214,13 +229,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 75
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install OS-level dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential gfortran libopenblas-dev libyaml-dev
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Use a release that is not very new but still have a long life:
python-version: "3.10"
Expand All @@ -241,7 +256,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install tox
Expand Down
4 changes: 4 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ build:
os: ubuntu-lts-latest
tools:
python: latest
# post-checkout job to ensure the clone isn't shallow jaraco/skeleton#114
jobs:
post_checkout:
- git fetch --unshallow || true
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include MANIFEST.in
include LICENSE
include launcher.c
include msvc-build-launcher.cmd
include mypy.ini
include pytest.ini
include tox.ini
include setuptools/tests/config/setupcfg_examples.txt
Expand Down
85 changes: 84 additions & 1 deletion NEWS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,86 @@
v69.5.1
=======

No significant changes.


v69.5.0
=======

Features
--------

- Refresh unpinned vendored dependencies. (#4253)
- Updated vendored packaging to version 24.0. (#4301)


v69.4.2
=======

Bugfixes
--------

- Merged bugfix for pypa/distutils#246.


v69.4.1
=======

No significant changes.


v69.4.0
=======

Features
--------

- Merged with pypa/distutils@55982565e, including interoperability improvements for rfc822_escape (pypa/distutils#213), dynamic resolution of config_h_filename for Python 3.13 compatibility (pypa/distutils#219), added support for the z/OS compiler (pypa/distutils#216), modernized compiler options in unixcompiler (pypa/distutils#214), fixed accumulating flags bug after compile/link (pypa/distutils#207), fixed enconding warnings (pypa/distutils#236), and general quality improvements (pypa/distutils#234). (#4298)


v69.3.1
=======

Bugfixes
--------

- Remove attempt to canonicalize the version. It's already canonical enough. (#4302)


v69.3.0
=======

Features
--------

- Support PEP 625 by canonicalizing package name and version in filenames. (#3593)


v69.2.0
=======

Features
--------

- Explicitly use ``encoding="locale"`` for ``.pth`` files whenever possible,
to reduce ``EncodingWarnings``.
This avoid errors with UTF-8 (see discussion in python/cpython#77102). (#4265)


Bugfixes
--------

- Clarify some `pkg_resources` methods return `bytes`, not `str`. Also return an empty `bytes` in ``EmptyProvider._get`` -- by :user:`Avasam` (#4243)
- Return an empty `list` by default in ``pkg_resources.ResourceManager.cleanup_resources`` -- by :user:`Avasam` (#4244)
- Made ``pkg_resoursces.NullProvider``'s ``has_metadata`` and ``metadata_isdir`` methods return actual booleans like all other Providers. -- by :user:`Avasam` (#4254)


Misc
----

- #4237, #4238, #4241, #4260, #4261, #4263


v69.1.1
=======

Expand Down Expand Up @@ -36,7 +119,7 @@ Improved Documentation
----------------------

- Updated documentation referencing obsolete Python 3.7 code. -- by :user:`Avasam` (#4096)
- Changed ``versionadded`` for "Type information included by default" feature from ``v68.3.0`` to ``v69.0.0`` -- by :user:Avasam` (#4182)
- Changed ``versionadded`` for "Type information included by default" feature from ``v68.3.0`` to ``v69.0.0`` -- by :user:`Avasam` (#4182)
- Described the auto-generated files -- by :user:`VladimirFokow` (#4198)
- Updated "Quickstart" to describe the current status of ``setup.cfg`` and ``pyproject.toml`` -- by :user:`VladimirFokow` (#4200)

Expand Down
26 changes: 14 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
.. image:: https://img.shields.io/pypi/v/setuptools.svg
.. |pypi-version| image:: https://img.shields.io/pypi/v/setuptools.svg
:target: https://pypi.org/project/setuptools

.. image:: https://img.shields.io/pypi/pyversions/setuptools.svg
.. |py-version| image:: https://img.shields.io/pypi/pyversions/setuptools.svg

.. image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
.. |test-badge| image:: https://github.com/pypa/setuptools/actions/workflows/main.yml/badge.svg
:target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
:alt: tests

.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff
.. |ruff-badge| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: Ruff

.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg
:target: https://setuptools.pypa.io
.. |docs-badge| image:: https://img.shields.io/readthedocs/setuptools/latest.svg
:target: https://setuptools.pypa.io

.. image:: https://img.shields.io/badge/skeleton-2024-informational
.. |skeleton-badge| image:: https://img.shields.io/badge/skeleton-2024-informational
:target: https://blog.jaraco.com/skeleton

.. image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
.. |codecov-badge| image:: https://img.shields.io/codecov/c/github/pypa/setuptools/master.svg?logo=codecov&logoColor=white
:target: https://codecov.io/gh/pypa/setuptools

.. image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
.. |tidelift-badge| image:: https://tidelift.com/badges/github/pypa/setuptools?style=flat
:target: https://tidelift.com/subscription/pkg/pypi-setuptools?utm_source=pypi-setuptools&utm_medium=readme

.. image:: https://img.shields.io/discord/803025117553754132
.. |discord-badge| image:: https://img.shields.io/discord/803025117553754132
:target: https://discord.com/channels/803025117553754132/815945031150993468
:alt: Discord

|pypi-version| |py-version| |test-badge| |ruff-badge| |docs-badge| |skeleton-badge| |codecov-badge| |discord-badge|

See the `Quickstart <https://setuptools.pypa.io/en/latest/userguide/quickstart.html>`_
and the `User's Guide <https://setuptools.pypa.io/en/latest/userguide/>`_ for
instructions on how to use Setuptools.
Expand Down
29 changes: 23 additions & 6 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def pytest_addoption(parser):
def pytest_configure(config):
config.addinivalue_line("markers", "integration: integration tests")
config.addinivalue_line("markers", "uses_network: tests may try to download files")
_IntegrationTestSpeedups.disable_plugins_already_run(config)


collect_ignore = [
Expand All @@ -47,9 +48,25 @@ def pytest_configure(config):

@pytest.fixture(autouse=True)
def _skip_integration(request):
running_integration_tests = request.config.getoption("--integration")
is_integration_test = request.node.get_closest_marker("integration")
if running_integration_tests and not is_integration_test:
pytest.skip("running integration tests only")
if not running_integration_tests and is_integration_test:
pytest.skip("skipping integration tests")
_IntegrationTestSpeedups.conditional_skip(request)


class _IntegrationTestSpeedups:
"""Speed-up integration tests by only running what does not run in other tests."""

RUNS_ON_NORMAL_TESTS = ("checkdocks", "cov", "mypy", "perf", "ruff")

@classmethod
def disable_plugins_already_run(cls, config):
if config.getoption("--integration"):
for plugin in cls.RUNS_ON_NORMAL_TESTS: # no need to run again
config.pluginmanager.set_blocked(plugin)

@staticmethod
def conditional_skip(request):
running_integration_tests = request.config.getoption("--integration")
is_integration_test = request.node.get_closest_marker("integration")
if running_integration_tests and not is_integration_test:
pytest.skip("running integration tests only")
if not running_integration_tests and is_integration_test:
pytest.skip("skipping integration tests")
Loading

0 comments on commit a97f7a7

Please sign in to comment.