Skip to content

Commit

Permalink
Merge branch 'main' into pyright-initial-config
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Apr 16, 2024
2 parents 3071db3 + 403022f commit 2585084
Show file tree
Hide file tree
Showing 255 changed files with 10,712 additions and 2,432 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
35 changes: 21 additions & 14 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,6 +53,8 @@ jobs:
platform: ubuntu-latest
- python: "3.10"
platform: ubuntu-latest
- python: "3.11"
platform: ubuntu-latest
- python: pypy3.10
platform: ubuntu-latest
distutils: stdlib
Expand All @@ -65,11 +70,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 Down Expand Up @@ -100,14 +105,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 @@ -122,7 +128,7 @@ jobs:
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 +164,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 +177,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 +196,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 +206,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 +221,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 +248,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
83 changes: 83 additions & 0 deletions 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 (#27489545)


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
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")
2 changes: 1 addition & 1 deletion docs/deprecated/distutils/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ directories.

Files in *src* that begin with :file:`.nfs` are skipped (more information on
these files is available in answer D2 of the `NFS FAQ page
<http://nfs.sourceforge.net/#section_d>`_).
<https://nfs.sourceforge.net/#section_d>`_).

.. versionchanged:: 3.3.1
NFS files are ignored.
Expand Down
2 changes: 1 addition & 1 deletion docs/deprecated/distutils/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,4 @@ loads its values::
.. % \section{Putting it all together}
.. _docutils: http://docutils.sourceforge.net
.. _docutils: https://docutils.sourceforge.io
2 changes: 1 addition & 1 deletion docs/deprecated/distutils/setupscript.rst
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ Notes:

'long string'
Multiple lines of plain text in reStructuredText format (see
http://docutils.sourceforge.net/).
https://docutils.sourceforge.io/).

'list of strings'
See below.
Expand Down
5 changes: 3 additions & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ disable_error_code = attr-defined
# https://github.com/pypa/setuptools/pull/3979#discussion_r1367968993
# - distutils._modified has different errors on Python 3.8 [import-untyped], on Python 3.9+ [import-not-found]
# - All jaraco modules are still untyped
[mypy-pkg_resources.extern.*,setuptools.extern.*,distutils._modified,jaraco.*]
# - _validate_project sometimes complains about trove_classifiers (#4296)
[mypy-pkg_resources.extern.*,setuptools.extern.*,distutils._modified,jaraco.*,trove_classifiers]
ignore_missing_imports = True

# - pkg_resources tests create modules that won't exists statically before the test is run.
# Let's ignore all "import-not-found" since, if an import really wasn't found, then the test would fail.
# - setuptools._vendor.packaging._manylinux: Mypy issue, this vendored module is already excluded!
[mypy-pkg_resources.tests.*,setuptools._vendor.packaging._manylinux]
[mypy-pkg_resources.tests.*,setuptools._vendor.packaging._manylinux,setuptools.config._validate_pyproject.*]
disable_error_code = import-not-found
1 change: 0 additions & 1 deletion newsfragments/4237.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4238.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4241.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4243.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4244.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4254.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4260.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4261.misc.rst

This file was deleted.

1 change: 0 additions & 1 deletion newsfragments/4263.misc.rst

This file was deleted.

3 changes: 0 additions & 3 deletions newsfragments/4265.feature.rst

This file was deleted.

1 change: 1 addition & 0 deletions newsfragments/4282.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed the ``setuptools[testing-integration]`` in favor of ``setuptools[testing]`` -- by :user:`Avasam`
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Copyright Jason R. Coombs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
Expand Down
Loading

0 comments on commit 2585084

Please sign in to comment.