diff --git a/.bumpversion.cfg b/.bumpversion.cfg
index 97840e4275..dd76f43d91 100644
--- a/.bumpversion.cfg
+++ b/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 50.3.2
+current_version = 56.0.0
commit = True
tag = True
diff --git a/.coveragerc b/.coveragerc
index 2f0e871437..6a34e662d3 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,8 +1,7 @@
[run]
-source=
- pkg_resources
- setuptools
-omit=
- */_vendor/*
+omit =
+ # leading `*/` for pytest-dev/pytest-cov#456
+ */.tox/*
[report]
+show_missing = True
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..6385b57343
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,15 @@
+root = true
+
+[*]
+charset = utf-8
+indent_style = tab
+indent_size = 4
+insert_final_newline = true
+end_of_line = lf
+
+[*.py]
+indent_style = space
+
+[*.{yml,yaml}]
+indent_style = space
+indent_size = 2
diff --git a/.flake8 b/.flake8
index c65806160d..dd3cc20661 100644
--- a/.flake8
+++ b/.flake8
@@ -1,12 +1,15 @@
[flake8]
-exclude=
- .tox
- setuptools/_vendor,
- pkg_resources/_vendor
-ignore =
- # W503 violates spec https://github.com/PyCQA/pycodestyle/issues/513
- W503
- # W504 has issues https://github.com/OCA/maintainer-quality-tools/issues/545
- W504
- setuptools/site-patch.py F821
- setuptools/py*compat.py F811
+max-line-length = 88
+
+# jaraco/skeleton#34
+max-complexity = 10
+
+extend-exclude =
+ build
+ setuptools/_vendor
+ setuptools/_distutils
+ pkg_resources/_vendor
+
+extend-ignore =
+ # Black creates whitespace before colon
+ E203
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
new file mode 100644
index 0000000000..73911ec8a5
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -0,0 +1,129 @@
+---
+name: 🐛 Bug report
+description: >-
+ Create a report to help us improve when
+ something is not working correctly
+title: '[BUG] '
+labels:
+- bug
+- Needs Triage
+
+body:
+- type: markdown
+ attributes:
+ value: >
+ **Thank you for wanting to report a bug in setuptools!**
+
+
+ ⚠
+ Verify first that your issue is not
+ [already reported on GitHub][issue search] and keep in mind and
+ keep in mind that we may have to keep the current behavior because
+ [every change breaks someone's workflow][XKCD 1172].
+ We try to be mindful about this.
+
+ Also test if the latest release and main branch are affected too.
+
+
+ If you are seeking community support, please consider
+ [starting a discussion][Discussions].
+
+
+ Thank you for your collaboration!
+
+
+ [Discussions]: https://github.com/pypa/setuptools/discussions
+
+ [issue search]: https://github.com/pypa/setuptools/search?q=is%3Aissue&type=issues
+
+ [XKCD 1172]: https://xkcd.com/1172/
+
+- type: markdown
+ attributes:
+ value: >-
+ **Environment**
+- type: input
+ attributes:
+ label: setuptools version
+ placeholder: For example, setuptools===60.4.2
+ validations:
+ required: true
+- type: input
+ attributes:
+ label: Python version
+ placeholder: For example, Python 3.10
+ validations:
+ required: true
+- type: input
+ attributes:
+ label: OS
+ placeholder: For example, Gentoo Linux, RHEL 8, Arch Linux, macOS etc.
+ validations:
+ required: true
+- type: textarea
+ attributes:
+ label: Additional environment information
+ description: >-
+ Feel free to add more information about your environment here.
+ placeholder: >-
+ This is only happening when I run setuptools on my fridge's patched firmware 🤯
+
+- type: textarea
+ attributes:
+ label: Description
+ description: >-
+ A clear and concise description of what the bug is.
+ placeholder: >-
+ I tried doing X and I expected it to result in Y because the docs
+ mentioned Z but what happened next what totally unexpected!
+ And here's why...
+ validations:
+ required: true
+
+- type: textarea
+ attributes:
+ label: Expected behavior
+ description: >-
+ A clear and concise description of what you expected to happen.
+ placeholder: >-
+ I tried doing X and I expected it to result in Y. I'm confused...
+ validations:
+ required: true
+
+- type: textarea
+ attributes:
+ label: How to Reproduce
+ description: >-
+ Describe the steps to reproduce this bug.
+ placeholder: |
+ 1. Integrate setuptools via '...'
+ 2. Then run '...'
+ 3. An error occurs.
+ validations:
+ required: true
+
+- type: textarea
+ attributes:
+ label: Output
+ description: >-
+ Paste the output of the steps above, including the commands
+ themselves and setuptools' output/traceback etc.
+ value: |
+ ```console
+
+ ```
+ validations:
+ required: true
+
+
+- type: checkboxes
+ attributes:
+ label: Code of Conduct
+ description: |
+ Read the [PSF Code of Conduct][CoC] first.
+
+ [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
+ options:
+ - label: I agree to follow the PSF Code of Conduct
+ required: true
+...
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000000..dde102ca11
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,15 @@
+# Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
+blank_issues_enabled: false # default: true
+contact_links:
+- name: 🤔 Have questions or need support?
+ url: https://github.com/pypa/setuptools/discussions
+ about: This is a place for the community to exchange ideas and recipes
+- name: 💬 Discourse
+ url: https://discuss.python.org/c/packaging
+ about: |
+ Please ask typical Q&A here: general ideas for Python packaging,
+ questions about structuring projects and so on
+- name: >-
+ 💬 IRC: #pypa @ Freenode
+ url: https://webchat.freenode.net/#pypa
+ about: Chat with devs
diff --git a/.github/ISSUE_TEMPLATE/documentation-report.yml b/.github/ISSUE_TEMPLATE/documentation-report.yml
new file mode 100644
index 0000000000..238ce89650
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation-report.yml
@@ -0,0 +1,91 @@
+---
+name: 📝 Documentation Report
+title: '[Docs] '
+description: Ask us about docs
+labels:
+- documentation
+- Needs Triage
+
+body:
+- type: markdown
+ attributes:
+ value: >
+ **Thank you for wanting to report a problem with setuptools
+ documentation!**
+
+
+ Please fill out your suggestions below. If the problem seems
+ straightforward, feel free to go ahead and
+ submit a pull request instead!
+
+
+ ⚠
+ Verify first that your issue is not [already reported on
+ GitHub][issue search].
+
+
+ If you are seeking community support, please consider
+ [starting a discussion][Discussions].
+
+
+ Thank you for your collaboration!
+
+
+ [issue search]: https://github.com/pypa/setuptools/search?q=is%3Aissue&type=issues
+
+ [Discussions]: https://github.com/pypa/setuptools/discussions
+
+- type: textarea
+ attributes:
+ label: Summary
+ description: >
+ Explain the problem briefly below, add suggestions to wording
+ or structure.
+
+
+ **HINT:** Did you know the documentation has a `View on GitHub`
+ link on every page? Feel free to use it to start a pull request
+ right from the GitHub UI!
+ placeholder: >-
+ I was reading the setuptools documentation of version X and I'm
+ having problems understanding Y. It would be very helpful if that
+ got rephrased as Z.
+ validations:
+ required: true
+
+- type: textarea
+ attributes:
+ label: OS / Environment
+ description: >-
+ Provide all relevant information below, e.g. OS version,
+ browser, etc.
+ placeholder: Fedora 33, Firefox etc.
+
+
+- type: textarea
+ attributes:
+ label: Additional Information
+ description: >
+ Describe how this improves the documentation, e.g. before/after
+ situation or screenshots.
+
+
+ **HINT:** You can paste https://gist.github.com links for larger files.
+ placeholder: >-
+ When the improvement is applied, it makes it more straightforward
+ to understand X.
+ validations:
+ required: true
+
+
+- type: checkboxes
+ attributes:
+ label: Code of Conduct
+ description: |
+ Read the [PSF Code of Conduct][CoC] first.
+
+ [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
+ options:
+ - label: I agree to follow the PSF Code of Conduct
+ required: true
+...
diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml
new file mode 100644
index 0000000000..88ae6741ff
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature-request.yml
@@ -0,0 +1,104 @@
+---
+name: ✨ Feature request
+description: Suggest an idea for setuptools
+title: '[FR] '
+labels:
+- enhancement
+- Needs Triage
+
+body:
+- type: markdown
+ attributes:
+ value: >
+ **Thank you for wanting to suggest a feature for setuptools!**
+
+
+ 💡
+ Before you go ahead with your request, please first consider if it
+ would be useful for majority of the setuptools users. As a general
+ rule of thumb, any feature that is only of interest to a small sub
+ group should be implemented in a third-party plugin or maybe even
+ just your project alone. Be mindful of the fact that the core
+ setuptools features have a broad impact.
+
+
+
+
+ ❗ Every change breaks someone's workflow.
+
+
+
+ [
+ ](https://xkcd.com/1172/)
+
+
+
+ ⚠
+ Verify first that your idea is not [already requested on GitHub][issue search].
+
+
+
+ [issue search]: https://github.com/pypa/setuptools/search?q=is%3Aissue&type=issues
+
+- type: textarea
+ attributes:
+ label: What's the problem this feature will solve?
+ description: >-
+ What are you trying to do, that you are unable to achieve
+ with setuptools as it currently stands?
+ placeholder: >-
+ I'm trying to do X and I'm missing feature Y for this to be
+ easily achievable.
+ validations:
+ required: true
+
+- type: textarea
+ attributes:
+ label: Describe the solution you'd like
+ description: >
+ Clear and concise description of what you want to happen.
+
+
+ Provide examples of real world use cases that this would enable
+ and how it solves the problem described above.
+ placeholder: >-
+ When I do X, I want to achieve Y in a situation when Z.
+ validations:
+ required: true
+
+- type: textarea
+ attributes:
+ label: Alternative Solutions
+ description: >-
+ Have you tried to workaround the problem using other tools? Or a
+ different approach to solving this issue? Please elaborate here.
+ placeholder: >-
+ I tried doing X, Y and Z. But they are subobpimal because of P.
+
+- type: textarea
+ attributes:
+ label: Additional context
+ description: >
+ Add any other context, links, etc. about the feature here.
+ Describe how the feature would be used, why it is needed and what
+ it would solve.
+
+
+ **HINT:** You can paste https://gist.github.com links for
+ larger files.
+ placeholder: >-
+ I asked on https://stackoverflow.com/.... and the community
+ advised me to do X, Y and Z.
+
+
+- type: checkboxes
+ attributes:
+ label: Code of Conduct
+ description: |
+ Read the [PSF Code of Conduct][CoC] first.
+
+ [CoC]: https://github.com/pypa/.github/blob/main/CODE_OF_CONDUCT.md
+ options:
+ - label: I agree to follow the PSF Code of Conduct
+ required: true
+...
diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml
new file mode 100644
index 0000000000..4f70acfbcb
--- /dev/null
+++ b/.github/workflows/automerge.yml
@@ -0,0 +1,27 @@
+name: automerge
+on:
+ pull_request:
+ types:
+ - labeled
+ - unlabeled
+ - synchronize
+ - opened
+ - edited
+ - ready_for_review
+ - reopened
+ - unlocked
+ pull_request_review:
+ types:
+ - submitted
+ check_suite:
+ types:
+ - completed
+ status: {}
+jobs:
+ automerge:
+ runs-on: ubuntu-latest
+ steps:
+ - name: automerge
+ uses: "pascalgn/automerge-action@v0.12.0"
+ env:
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000000..37d65f33d0
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,42 @@
+name: tests
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ strategy:
+ matrix:
+ python: [3.6, 3.8, 3.9, pypy3]
+ platform: [ubuntu-latest, macos-latest, windows-latest]
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+ - name: Install tox
+ run: |
+ python -m pip install tox
+ - name: Run tests
+ run: tox
+
+ release:
+ needs: test
+ if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.9
+ - name: Install tox
+ run: |
+ python -m pip install tox
+ - name: Release
+ run: tox -e release
+ env:
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml
deleted file mode 100644
index 2ee7c0fbf5..0000000000
--- a/.github/workflows/python-tests.yml
+++ /dev/null
@@ -1,130 +0,0 @@
-name: >-
- 👷
- Test suite
-
-on:
- push:
- pull_request:
- schedule:
- - cron: 1 0 * * * # Run daily at 0:01 UTC
-
-jobs:
- tests:
- name: >-
- ${{ matrix.python-version }}
- /
- ${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- strategy:
- # max-parallel: 5
- matrix:
- python-version:
- - 3.9
- - 3.8
- - pypy3
- - 3.7
- - 3.6
- - 3.5
- os:
- - ubuntu-18.04
- - ubuntu-16.04
- - macOS-latest
- # - windows-2019
- # - windows-2016
- include:
- # Dev versions (deadsnakes)
- - os: ubuntu-20.04
- python-version: 3.9-dev
- - os: ubuntu-20.04
- python-version: 3.8-dev
-
- env:
- NETWORK_REQUIRED: 1
- PYTHON_VERSION: ${{ matrix.python-version }}
- TOX_PARALLEL_NO_SPINNER: 1
- TOXENV: python
- USE_DEADSNAKES: false
-
- steps:
- - uses: actions/checkout@master
- - name: Set flag to use deadsnakes
- if: >-
- endsWith(env.PYTHON_VERSION, '-beta') ||
- endsWith(env.PYTHON_VERSION, '-dev')
- run: |
- from __future__ import print_function
- python_version = '${{ env.PYTHON_VERSION }}'.replace('-beta', '')
- print('::set-env name=PYTHON_VERSION::{ver}'.format(ver=python_version))
- print('::set-env name=USE_DEADSNAKES::true')
- shell: python
- - name: Set up Python ${{ env.PYTHON_VERSION }} (deadsnakes)
- uses: deadsnakes/action@v1.0.0
- if: fromJSON(env.USE_DEADSNAKES) && true || false
- with:
- python-version: ${{ env.PYTHON_VERSION }}
- - name: Set up Python ${{ env.PYTHON_VERSION }}
- uses: actions/setup-python@v2.1.1
- if: >-
- !fromJSON(env.USE_DEADSNAKES) && true || false
- with:
- python-version: ${{ env.PYTHON_VERSION }}
- - name: Log Python version
- run: >-
- python --version
- - name: Log Python location
- run: >-
- which python
- - name: Log Python env
- run: >-
- python -m sysconfig
- - name: Pip cache
- uses: actions/cache@v1
- with:
- path: ~/.cache/pip
- key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
- restore-keys: |
- ${{ runner.os }}-pip-
- ${{ runner.os }}-
- - name: Upgrade pip/setuptools/wheel
- run: >-
- python
- -m pip install
- --disable-pip-version-check
- --upgrade
- pip setuptools wheel
- - name: Install tox
- run: >-
- python -m pip install --upgrade tox tox-venv
- - name: Log installed dists
- run: >-
- python -m pip freeze --all
- - name: Adjust TOXENV for PyPy
- if: startsWith(env.PYTHON_VERSION, 'pypy')
- run: >-
- echo "::set-env name=TOXENV::${{ env.PYTHON_VERSION }}"
- - name: Log env vars
- run: >-
- env
-
- - name: Verify that there's no cached Python modules in sources
- if: >-
- ! startsWith(matrix.os, 'windows-')
- run: >-
- ! grep pyc setuptools.egg-info/SOURCES.txt
-
- - name: 'Initialize tox envs: ${{ matrix.env.TOXENV }}'
- run: >-
- python -m
- tox
- --parallel auto
- --parallel-live
- --notest
- --skip-missing-interpreters false
- - name: Test with tox
- run: >-
- python -m
- tox
- --parallel auto
- --parallel-live
- --
- -vvvvv
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000000..c15ab0c9e6
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,10 @@
+repos:
+- repo: https://github.com/psf/black
+ rev: 20.8b1
+ hooks:
+ - id: black
+
+- repo: https://github.com/asottile/blacken-docs
+ rev: v1.9.1
+ hooks:
+ - id: blacken-docs
diff --git a/.readthedocs.yml b/.readthedocs.yml
index cb10a7f991..cc698548db 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -1,6 +1,6 @@
+version: 2
python:
- version: 3
- extra_requirements:
- - docs
- pip_install: false
- requirements: docs/requirements.txt
+ install:
+ - path: .
+ extra_requirements:
+ - docs
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 7d8c102629..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,61 +0,0 @@
-dist: xenial
-language: python
-
-jobs:
- fast_finish: true
- include:
- - python: pypy3
- - python: 3.5
- - python: 3.6
- - python: 3.7
- - &latest_py3
- python: 3.8
- - <<: *latest_py3
- env: LANG=C
- - python: 3.8-dev
- - python: 3.9-dev
- - <<: *latest_py3
- env: TOXENV=docs
- - arch: ppc64le
- python: pypy3
- - arch: ppc64le
- python: 3.5
- - &latest_py3_ppc
- arch: ppc64le
- python: 3.8
- - <<: *latest_py3_ppc
- env: LANG=C
- - arch: ppc64le
- python: 3.9-dev
- allow_failures:
- # suppress failures due to pypa/setuptools#2000
- - python: pypy3
- - <<: *latest_py3
- env: TOXENV=docs
-
-
-cache: pip
-
-before_install:
-- python tools/ppc64le-patch.py
-
-install:
-
-# ensure we have recent pip/setuptools/wheel
-- pip install --disable-pip-version-check --upgrade pip setuptools wheel
-# need tox to get started
-- pip install --upgrade tox tox-venv
-
-# Output the env, to verify behavior
-- pip freeze --all
-- env
-
-- "! grep pyc setuptools.egg-info/SOURCES.txt"
-
-script:
- - export NETWORK_REQUIRED=1
- - tox
-
-after_success:
- - export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME
- - tox -e coverage,codecov
diff --git a/CHANGES.rst b/CHANGES.rst
index 30750c0aa0..ef1d926b15 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,7 +1,262 @@
+v56.0.0
+-------
+
+
+Deprecations
+^^^^^^^^^^^^
+* #2620: The ``license_file`` option is now marked as deprecated.
+ Use ``license_files`` instead. -- by :user:`cdce8p`
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #2620: If neither ``license_file`` nor ``license_files`` is specified, the ``sdist``
+ option will now auto-include files that match the following patterns:
+ ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, ``AUTHORS*``.
+ This matches the behavior of ``bdist_wheel``. -- by :user:`cdce8p`
+
+Changes
+^^^^^^^
+* #2620: The ``license_file`` and ``license_files`` options now support glob patterns. -- by :user:`cdce8p`
+* #2632: Implemented ``VendorImporter.find_spec()`` method to get rid
+ of ``ImportWarning`` that Python 3.10 emits when only the old-style
+ importer hooks are present -- by :user:`webknjaz`
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #2620: Added documentation for the ``license_files`` option. -- by :user:`cdce8p`
+
+
+v55.0.0
+-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #2566: Remove the deprecated ``bdist_wininst`` command. Binary packages should be built as wheels instead. -- by :user:`hroncok`
+
+
+v54.2.0
+-------
+
+
+Changes
+^^^^^^^
+* #2608: Added informative error message to PEP 517 build failures owing to
+ an empty ``setup.py`` -- by :user:`layday`
+
+
+v54.1.3
+-------
+
+No significant changes.
+
+
+v54.1.2
+-------
+
+
+Misc
+^^^^
+* #2595: Reduced scope of dash deprecation warning to Setuptools/distutils only -- by :user:`melissa-kun-li`
+
+
+v54.1.1
+-------
+
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #2584: Added ``sphinx-inline-tabs`` extension to allow for comparison of ``setup.py`` and its equivalent ``setup.cfg`` -- by :user:`amy-lei`
+
+Misc
+^^^^
+* #2592: Made option keys in the ``[metadata]`` section of ``setup.cfg`` case-sensitive. Users having
+ uppercase option spellings will get a warning suggesting to make them to lowercase
+ -- by :user:`melissa-kun-li`
+
+
+v54.1.0
+-------
+
+
+Changes
+^^^^^^^
+* #1608: Removed the conversion of dashes to underscores in the :code:`extras_require` and :code:`data_files` of :code:`setup.cfg` to support the usage of dashes. Method will warn users when they use a dash-separated key which in the future will only allow an underscore. Note: the method performs the dash to underscore conversion to preserve compatibility, but future versions will no longer support it -- by :user:`melissa-kun-li`
+
+
+v54.0.0
+-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #2582: Simplified build-from-source story by providing bootstrapping metadata in a separate egg-info directory. Build requirements no longer include setuptools itself. Sdist once again includes the pyproject.toml. Project can no longer be installed from source on pip 19.x, but install from source is still supported on pip < 19 and pip >= 20 and install from wheel is still supported with pip >= 9.
+
+Changes
+^^^^^^^
+* #1932: Handled :code:`AttributeError` by raising :code:`DistutilsSetupError` in :code:`dist.check_specifier()` when specifier is not a string -- by :user:`melissa-kun-li`
+* #2570: Correctly parse cmdclass in setup.cfg.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #2553: Added userguide example for markers in extras_require -- by :user:`pwoolvett`
+
+
+v53.1.0
+-------
+
+
+Changes
+^^^^^^^
+* #1937: Preserved case-sensitivity of keys in setup.cfg so that entry point names are case-sensitive. Changed sensitivity of configparser. NOTE: Any projects relying on case-insensitivity will need to adapt to accept the original case as published. -- by :user:`melissa-kun-li`
+* #2573: Fixed error in uploading a Sphinx doc with the :code:`upload_docs` command. An html builder will be used.
+ Note: :code:`upload_docs` is deprecated for PyPi, but is supported for other sites -- by :user:`melissa-kun-li`
+
+
+v53.0.0
+-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #1527: Removed bootstrap script. Now Setuptools requires pip or another pep517-compliant builder such as 'build' to build. Now Setuptools can be installed from Github main branch.
+
+
+v52.0.0
+-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #2537: Remove fallback support for fetch_build_eggs using easy_install. Now pip is required for setup_requires to succeed.
+* #2544: Removed 'easy_install' top-level model (runpy entry point) and 'easy_install' console script.
+* #2545: Removed support for eggsecutables.
+
+Changes
+^^^^^^^
+* #2459: Tests now run in parallel via pytest-xdist, completing in about half the time. Special thanks to :user:`webknjaz` for hard work implementing test isolation. To run without parallelization, disable the plugin with ``tox -- -p no:xdist``.
+
+
+v51.3.3
+-------
+
+
+Misc
+^^^^
+* #2539: Fix AttributeError in Description validation.
+
+
+v51.3.2
+-------
+
+
+Misc
+^^^^
+* #1390: Validation of Description field now is more lenient, emitting a warning and mangling the value to be valid (replacing newlines with spaces).
+
+
+v51.3.1
+-------
+
+
+Misc
+^^^^
+* #2536: Reverted tag deduplication handling.
+
+
+v51.3.0
+-------
+
+
+Changes
+^^^^^^^
+* #1390: Newlines in metadata description/Summary now trigger a ValueError.
+* #2481: Define ``create_module()`` and ``exec_module()`` methods in ``VendorImporter``
+ to get rid of ``ImportWarning`` -- by :user:`hroncok`
+* #2489: ``pkg_resources`` behavior for zipimport now matches the regular behavior, and finds
+ ``.egg-info`` (previoulsy would only find ``.dist-info``) -- by :user:`thatch`
+* #2529: Fixed an issue where version tags may be added multiple times
+
+
+v51.2.0
+-------
+
+
+Changes
+^^^^^^^
+* #2493: Use importlib.import_module() rather than the deprectated loader.load_module()
+ in pkg_resources namespace delaration -- by :user:`encukou`
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #2525: Fix typo in the document page about entry point. -- by :user:`jtr109`
+
+Misc
+^^^^
+* #2534: Avoid hitting network during test_easy_install.
+
+
+v51.1.2
+-------
+
+
+Misc
+^^^^
+* #2505: Disable inclusion of package data as it causes 'tests' to be included as data.
+
+
+v51.1.1
+-------
+
+
+Misc
+^^^^
+* #2534: Avoid hitting network during test_virtualenv.test_test_command.
+
+
+v51.1.0
+-------
+
+
+Changes
+^^^^^^^
+* #2486: Project adopts jaraco/skeleton for shared package maintenance.
+
+Misc
+^^^^
+* #2477: Restore inclusion of rst files in sdist.
+* #2484: Setuptools has replaced the master branch with the main branch.
+* #2485: Fixed failing test when pip 20.3+ is present.
+ -- by :user:`yan12125`
+* #2487: Fix tests with pytest 6.2
+ -- by :user:`yan12125`
+
+
+v51.0.0
+-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
+* #2435: Require Python 3.6 or later.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
+* #2430: Fixed inconsistent RST title nesting levels caused by #2399
+ -- by :user:`webknjaz`
+* #2430: Fixed a typo in Sphinx docs that made docs dev section disappear
+ as a result of PR #2426 -- by :user:`webknjaz`
+
+Misc
+^^^^
+* #2471: Removed the tests that guarantee that the vendored dependencies can be built by distutils.
+
+
v50.3.2
-------
+
Documentation changes
^^^^^^^^^^^^^^^^^^^^^
* #2394: Extended towncrier news template to include change note categories.
@@ -23,12 +278,19 @@ Misc
v50.3.1
-------
+
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #2093: Finalized doc revamp.
* #2097: doc: simplify index and group deprecated files
* #2102: doc overhaul step 2: break main doc into multiple sections
* #2111: doc overhaul step 3: update userguide
* #2395: Added a ``:user:`` role to Sphinx config -- by :user:`webknjaz`
* #2395: Added an illustrative explanation about the change notes to fragments dir -- by :user:`webknjaz`
+
+Misc
+^^^^
* #2379: Travis CI test suite now tests against PPC64.
* #2413: Suppress EOF errors (and other exceptions) when importing lib2to3.
@@ -36,12 +298,20 @@ v50.3.1
v50.3.0
-------
+
+
+Changes
+^^^^^^^
* #2368: In distutils, restore support for monkeypatched CCompiler.spawn per pypa/distutils#15.
v50.2.0
-------
+
+
+Changes
+^^^^^^^
* #2355: When pip is imported as part of a build, leave distutils patched.
* #2380: There are some setuptools specific changes in the
``setuptools.command.bdist_rpm`` module that are no longer needed, because
@@ -52,24 +322,40 @@ v50.2.0
v50.1.0
-------
+
+
+Changes
+^^^^^^^
* #2350: Setuptools reverts using the included distutils by default. Platform maintainers and system integrators and others are *strongly* encouraged to set ``SETUPTOOLS_USE_DISTUTILS=local`` to help identify and work through the reported issues with distutils adoption, mainly to file issues and pull requests with pypa/distutils such that distutils performs as needed across every supported environment.
v50.0.3
-------
+
+
+Misc
+^^^^
* #2363: Restore link_libpython support on Python 3.7 and earlier (see pypa/distutils#9).
v50.0.2
-------
+
+
+Misc
+^^^^
* #2352: In distutils hack, use absolute import rather than relative to avoid bpo-30876.
v50.0.1
-------
+
+
+Misc
+^^^^
* #2357: Restored Python 3.5 support in distutils.util for missing ``subprocess._optim_args_from_interpreter_flags``.
* #2358: Restored AIX support on Python 3.8 and earlier.
* #2361: Add Python 3.10 support to _distutils_hack. Get the 'Loader' abstract class
@@ -80,19 +366,34 @@ v50.0.1
v50.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #2232: Once again, Setuptools overrides the stdlib distutils on import. For environments or invocations where this behavior is undesirable, users are provided with a temporary escape hatch. If the environment variable ``SETUPTOOLS_USE_DISTUTILS`` is set to ``stdlib``, Setuptools will fall back to the legacy behavior. Use of this escape hatch is discouraged, but it is provided to ease the transition while proper fixes for edge cases can be addressed.
+
+Changes
+^^^^^^^
* #2334: In MSVC module, refine text in error message.
v49.6.0
-------
+
+
+Changes
+^^^^^^^
* #2129: In pkg_resources, no longer detect any pathname ending in .egg as a Python egg. Now the path must be an unpacked egg or a zip file.
v49.5.0
-------
+
+
+Changes
+^^^^^^^
* #2306: When running as a PEP 517 backend, setuptools does not try to install
``setup_requires`` itself. They are reported as build requirements for the
frontend to install.
@@ -101,43 +402,74 @@ v49.5.0
v49.4.0
-------
+
+
+Changes
+^^^^^^^
* #2310: Updated vendored packaging version to 20.4.
v49.3.2
-------
+
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #2300: Improve the ``safe_version`` function documentation
+
+Misc
+^^^^
* #2297: Once again, in stubs prefer exec_module to the deprecated load_module.
v49.3.1
-------
+
+
+Changes
+^^^^^^^
* #2316: Removed warning when ``distutils`` is imported before ``setuptools`` when ``distutils`` replacement is not enabled.
v49.3.0
-------
+
+
+Changes
+^^^^^^^
* #2259: Setuptools now provides a .pth file (except for editable installs of setuptools) to the target environment to ensure that when enabled, the setuptools-provided distutils is preferred before setuptools has been imported (and even if setuptools is never imported). Honors the SETUPTOOLS_USE_DISTUTILS environment variable.
v49.2.1
-------
+
+
+Misc
+^^^^
* #2257: Fixed two flaws in distutils._msvccompiler.MSVCCompiler.spawn.
v49.2.0
-------
+
+
+Changes
+^^^^^^^
* #2230: Now warn the user when setuptools is imported after distutils modules have been loaded (exempting PyPy for 3.6), directing the users of packages to import setuptools first.
v49.1.3
-------
+
+
+Misc
+^^^^
* #2212: (Distutils) Allow spawn to accept environment. Avoid monkey-patching global state.
* #2249: Fix extension loading technique in stubs.
@@ -145,39 +477,69 @@ v49.1.3
v49.1.2
-------
+
+
+Changes
+^^^^^^^
* #2232: In preparation for re-enabling a local copy of distutils, Setuptools now honors an environment variable, SETUPTOOLS_USE_DISTUTILS. If set to 'stdlib' (current default), distutils will be used from the standard library. If set to 'local' (default in a imminent backward-incompatible release), the local copy of distutils will be used.
v49.1.1
-------
+
+
+Misc
+^^^^
* #2094: Removed pkg_resources.py2_warn module, which is no longer reachable.
v49.0.1
-------
+
+
+Misc
+^^^^
* #2228: Applied fix for pypa/distutils#3, restoring expectation that spawn will raise a DistutilsExecError when attempting to execute a missing file.
v49.1.0
-------
+
+
+Changes
+^^^^^^^
* #2228: Disabled distutils adoption for now while emergent issues are addressed.
v49.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #2165: Setuptools no longer installs a site.py file during easy_install or develop installs. As a result, .eggs on PYTHONPATH will no longer take precedence over other packages on sys.path. If this issue affects your production environment, please reach out to the maintainers at #2165.
+
+Changes
+^^^^^^^
* #2137: Removed (private) pkg_resources.RequirementParseError, now replaced by packaging.requirements.InvalidRequirement. Kept the name for compatibility, but users should catch InvalidRequirement instead.
* #2180: Update vendored packaging in pkg_resources to 19.2.
+
+Misc
+^^^^
* #2199: Fix exception causes all over the codebase by using ``raise new_exception from old_exception``
v48.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #2143: Setuptools adopts distutils from the Python 3.9 standard library and no longer depends on distutils in the standard library. When importing ``setuptools`` or ``setuptools.distutils_patch``, Setuptools will expose its bundled version as a top-level ``distutils`` package (and unload any previously-imported top-level distutils package), retaining the expectation that ``distutils``' objects are actually Setuptools objects.
To avoid getting any legacy behavior from the standard library, projects are advised to always "import setuptools" prior to importing anything from distutils. This behavior happens by default when using ``pip install`` or ``pep517.build``. Workflows that rely on ``setup.py (anything)`` will need to first ensure setuptools is imported. One way to achieve this behavior without modifying code is to invoke Python thus: ``python -c "import setuptools; exec(open('setup.py').read())" (anything)``.
@@ -185,12 +547,20 @@ v48.0.0
v47.3.2
-------
+
+
+Misc
+^^^^
* #2071: Replaced references to the deprecated imp package with references to importlib
v47.3.1
-------
+
+
+Misc
+^^^^
* #1973: Removed ``pkg_resources.py31compat.makedirs`` in favor of the stdlib. Use ``os.makedirs()`` instead.
* #2198: Restore ``__requires__`` directive in easy-install wrapper scripts.
@@ -198,22 +568,39 @@ v47.3.1
v47.3.0
-------
+
+
+Changes
+^^^^^^^
* #2197: Console script wrapper for editable installs now has a unified template and honors importlib_metadata if present for faster script execution on older Pythons.
+
+Misc
+^^^^
* #2195: Fix broken entry points generated by easy-install (pip editable installs).
v47.2.0
-------
+
+
+Changes
+^^^^^^^
* #2194: Editable-installed entry points now load significantly faster on Python versions 3.8+.
+* #1471: Incidentally fixed by #2194 on Python 3.8 or when importlib_metadata is present.
v47.1.1
-------
+
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #2156: Update mailing list pointer in developer docs
Incorporate changes from v44.1.1:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0.
@@ -221,25 +608,44 @@ Incorporate changes from v44.1.1:
v44.1.1
-------
+
+
+Misc
+^^^^
* #2158: Avoid loading working set during ``Distribution.finalize_options`` prior to invoking ``_install_setup_requires``, broken since v42.0.0.
v47.1.0
-------
+
+
+Changes
+^^^^^^^
* #2070: In wheel-to-egg conversion, use simple pkg_resources-style namespace declaration for packages that declare namespace_packages.
v47.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #2094: Setuptools now actively crashes under Python 2. Python 3.5 or later is required. Users of Python 2 should use ``setuptools<45``.
+
+Changes
+^^^^^^^
* #1700: Document all supported keywords by migrating the ones from distutils.
v46.4.0
-------
+
+
+Changes
+^^^^^^^
* #1753: ``attr:`` now extracts variables through rudimentary examination of the AST,
thereby supporting modules with third-party imports. If examining the AST
fails to find the variable, ``attr:`` falls back to the old behavior of
@@ -255,7 +661,14 @@ No significant changes.
v46.3.0
-------
+
+
+Changes
+^^^^^^^
* #2089: Package index functionality no longer attempts to remove an md5 fragment from the index URL. This functionality, added for distribute #163 is no longer relevant.
+
+Misc
+^^^^
* #2041: Preserve file modes during pkg files copying, but clear read only flag for target afterwards.
* #2105: Filter ``2to3`` deprecation warnings from ``TestDevelop.test_2to3_user_mode``.
@@ -263,11 +676,21 @@ v46.3.0
v46.2.0
-------
+
+
+Changes
+^^^^^^^
* #2040: Deprecated the ``bdist_wininst`` command. Binary packages should be built as wheels instead.
* #2062: Change 'Mac OS X' to 'macOS' in code.
* #2075: Stop recognizing files ending with ``.dist-info`` as distribution metadata.
* #2086: Deprecate 'use_2to3' functionality. Packagers are encouraged to use single-source solutions or build tool chains to manage conversions outside of setuptools.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1698: Added documentation for ``build_meta`` (a bare minimum, not completed).
+
+Misc
+^^^^
* #2082: Filter ``lib2to3`` ``PendingDeprecationWarning`` and ``DeprecationWarning`` in tests,
because ``lib2to3`` is `deprecated in Python 3.9 `_.
@@ -281,6 +704,10 @@ No significant changes.
v46.1.2
-------
+
+
+Misc
+^^^^
* #1458: Added template for reporting Python 2 incompatibilities.
@@ -293,12 +720,17 @@ No significant changes.
v46.1.0
-------
+
+
+Changes
+^^^^^^^
* #308: Allow version number normalization to be bypassed by wrapping in a 'setuptools.sic()' call.
* #1424: Prevent keeping files mode for package_data build. It may break a build if user's package data has read only flag.
* #1431: In ``easy_install.check_site_dir``, ensure the installation directory exists.
* #1563: In ``pkg_resources`` prefer ``find_spec`` (PEP 451) to ``find_module``.
Incorporate changes from v44.1.0:
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__
* #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2
@@ -308,6 +740,10 @@ Incorporate changes from v44.1.0:
v44.1.0
-------
+
+
+Changes
+^^^^^^^
* #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__
* #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2
* #1994: Fixed a bug in the "setuptools.finalize_distribution_options" hook that lead to ignoring the order attribute of entry points managed by this hook.
@@ -316,16 +752,33 @@ v44.1.0
v46.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #65: Once again as in 3.0, removed the Features feature.
+
+Changes
+^^^^^^^
* #1890: Fix vendored dependencies so importing ``setuptools.extern.some_module`` gives the same object as ``setuptools._vendor.some_module``. This makes Metadata picklable again.
* #1899: Test suite now fails on warnings.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #2011: Fix broken link to distutils docs on package_data
+
+Misc
+^^^^
* #1991: Include pkg_resources test data in sdist, so tests can be executed from it.
v45.3.0
-------
+
+
+Changes
+^^^^^^^
* #1557: Deprecated eggsecutable scripts and updated docs.
* #1904: Update msvc.py to use CPython 3.8.0 mechanism to find msvc 14+
@@ -333,6 +786,10 @@ v45.3.0
v45.2.0
-------
+
+
+Changes
+^^^^^^^
* #1905: Fixed defect in _imp, introduced in 41.6.0 when the 'tests' directory is not present.
* #1941: Improve editable installs with PEP 518 build isolation:
@@ -340,12 +797,19 @@ v45.2.0
* The error shown when the install directory is not in ``PYTHONPATH`` has been turned into a warning.
* #1981: Setuptools now declares its ``tests`` and ``docs`` dependencies in metadata (extras).
* #1985: Add support for installing scripts in environments where bdist_wininst is missing (i.e. Python 3.9).
+
+Misc
+^^^^
* #1968: Add flake8-2020 to check for misuse of sys.version or sys.version_info.
v45.1.0
-------
+
+
+Changes
+^^^^^^^
* #1458: Add minimum sunset date and preamble to Python 2 warning.
* #1704: Set sys.argv[0] in setup script run by build_meta.__legacy__
* #1974: Add Python 3 Only Trove Classifier and remove universal wheel declaration for more complete transition from Python 2.
@@ -354,26 +818,47 @@ v45.1.0
v45.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1458: Drop support for Python 2. Setuptools now requires Python 3.5 or later. Install setuptools using pip >=9 or pin to Setuptools <45 to maintain 2.7 support.
+
+Changes
+^^^^^^^
* #1959: Fix for Python 4: replace unsafe six.PY3 with six.PY2
v44.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1908: Drop support for Python 3.4.
v43.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1634: Include ``pyproject.toml`` in source distribution by default. Projects relying on the previous behavior where ``pyproject.toml`` was excluded by default should stop relying on that behavior or add ``exclude pyproject.toml`` to their MANIFEST.in file.
+
+Changes
+^^^^^^^
* #1927: Setuptools once again declares 'setuptools' in the ``build-system.requires`` and adds PEP 517 build support by declaring itself as the ``build-backend``. It additionally specifies ``build-system.backend-path`` to rely on itself for those builders that support it.
v42.0.2
-------
+Changes
+^^^^^^^
+
* #1921: Fix support for easy_install's ``find-links`` option in ``setup.cfg``.
* #1922: Build dependencies (setup_requires and tests_require) now install transitive dependencies indicated by extras.
@@ -381,12 +866,20 @@ v42.0.2
v42.0.1
-------
+
+
+Changes
+^^^^^^^
* #1918: Fix regression in handling wheels compatibility tags.
v42.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1830, #1909: Mark the easy_install script and setuptools command as deprecated, and use `pip `_ when available to fetch/build wheels for missing ``setup_requires``/``tests_require`` requirements, with the following differences in behavior:
* support for ``python_requires``
* better support for wheels (proper handling of priority with respect to PEP 425 tags)
@@ -395,6 +888,9 @@ v42.0.0
* no support for the ``allow_hosts`` easy_install option (``index_url``/``find_links`` are still honored)
* pip environment variables are honored (and take precedence over easy_install options)
* #1898: Removed the "upload" and "register" commands in favor of `twine `_.
+
+Changes
+^^^^^^^
* #1767: Add support for the ``license_files`` option in ``setup.cfg`` to automatically
include multiple license files in a source distribution.
* #1829: Update handling of wheels compatibility tags:
@@ -407,46 +903,82 @@ v42.0.0
v41.6.0
-------
+
+
+Changes
+^^^^^^^
* #479: Replace usage of deprecated ``imp`` module with local re-implementation in ``setuptools._imp``.
v41.5.1
-------
+
+
+Changes
+^^^^^^^
* #1891: Fix code for detecting Visual Studio's version on Windows under Python 2.
v41.5.0
-------
+
+
+Changes
+^^^^^^^
* #1811: Improve Visual C++ 14.X support, mainly for Visual Studio 2017 and 2019.
* #1814: Fix ``pkg_resources.Requirement`` hash/equality implementation: take PEP 508 direct URL into account.
* #1824: Fix tests when running under ``python3.10``.
* #1878: Formally deprecated the ``test`` command, with the recommendation that users migrate to ``tox``.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1860: Update documentation to mention the egg format is not supported by pip and dependency links support was dropped starting with pip 19.0.
* #1862: Drop ez_setup documentation: deprecated for some time (last updated in 2016), and still relying on easy_install (deprecated too).
* #1868: Drop most documentation references to (deprecated) EasyInstall.
* #1884: Added a trove classifier to document support for Python 3.8.
+
+Misc
+^^^^
* #1886: Added Python 3.8 release to the Travis test matrix.
v41.4.0
-------
+
+
+Changes
+^^^^^^^
* #1847: In declarative config, now traps errors when invalid ``python_requires`` values are supplied.
v41.3.0
-------
+
+
+Changes
+^^^^^^^
* #1690: When storing extras, rely on OrderedSet to retain order of extras as indicated by the packager, which will also be deterministic on Python 2.7 (with PYTHONHASHSEED unset) and Python 3.6+.
+
+Misc
+^^^^
* #1858: Fixed failing integration test triggered by 'long_description_content_type' in packaging.
v41.2.0
-------
+
+
+Changes
+^^^^^^^
* #479: Remove some usage of the deprecated ``imp`` module.
+
+Misc
+^^^^
* #1565: Changed html_sidebars from string to list of string as per
https://www.sphinx-doc.org/en/master/changes.html#id58
@@ -454,6 +986,10 @@ v41.2.0
v41.1.0
-------
+
+
+Misc
+^^^^
* #1697: Moved most of the constants from setup.py to setup.cfg
* #1749: Fixed issue with the PEP 517 backend where building a source distribution would fail if any tarball existed in the destination directory.
* #1750: Fixed an issue with PEP 517 backend where wheel builds would fail if the destination directory did not already exist.
@@ -461,12 +997,19 @@ v41.1.0
* #1769: Improve ``package_data`` check: ensure the dictionary values are lists/tuples of strings.
* #1788: Changed compatibility fallback logic for ``html.unescape`` to avoid accessing ``HTMLParser.unescape`` when not necessary. ``HTMLParser.unescape`` is deprecated and will be removed in Python 3.9.
* #1790: Added the file path to the error message when a ``UnicodeDecodeError`` occurs while reading a metadata file.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1776: Use license classifiers rather than the license field.
v41.0.1
-------
+
+
+Changes
+^^^^^^^
* #1671: Fixed issue with the PEP 517 backend that prevented building a wheel when the ``dist/`` directory contained existing ``.whl`` files.
* #1709: In test.paths_on_python_path, avoid adding unnecessary duplicates to the PYTHONPATH.
* #1741: In package_index, now honor "current directory" during a checkout of git and hg repositories under Windows
@@ -475,22 +1018,37 @@ v41.0.1
v41.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1735: When parsing setup.cfg files, setuptools now requires the files to be encoded as UTF-8. Any other encoding will lead to a UnicodeDecodeError. This change removes support for specifying an encoding using a 'coding: ' directive in the header of the file, a feature that was introduces in 40.7. Given the recent release of the aforementioned feature, it is assumed that few if any projects are utilizing the feature to specify an encoding other than UTF-8.
v40.9.0
-------
+
+
+Changes
+^^^^^^^
* #1675: Added support for ``setup.cfg``-only projects when using the ``setuptools.build_meta`` backend. Projects that have enabled PEP 517 no longer need to have a ``setup.py`` and can use the purely declarative ``setup.cfg`` configuration file instead.
* #1720: Added support for ``pkg_resources.parse_requirements``-style requirements in ``setup_requires`` when ``setup.py`` is invoked from the ``setuptools.build_meta`` build backend.
* #1664: Added the path to the ``PKG-INFO`` or ``METADATA`` file in the exception
text when the ``Version:`` header can't be found.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1705: Removed some placeholder documentation sections referring to deprecated features.
v40.8.0
-------
+
+
+Changes
+^^^^^^^
* #1652: Added the ``build_meta:__legacy__`` backend, a "compatibility mode" PEP 517 backend that can be used as the default when ``build-backend`` is left unspecified in ``pyproject.toml``.
* #1635: Resource paths are passed to ``pkg_resources.resource_string`` and similar no longer accept paths that traverse parents, that begin with a leading ``/``. Violations of this expectation raise DeprecationWarnings and will become errors. Additionally, any paths that are absolute on Windows are strictly disallowed and will raise ValueErrors.
* #1536: ``setuptools`` will now automatically include licenses if ``setup.cfg`` contains a ``license_file`` attribute, unless this file is manually excluded inside ``MANIFEST.in``.
@@ -499,25 +1057,44 @@ v40.8.0
v40.7.3
-------
+
+
+Changes
+^^^^^^^
* #1670: In package_index, revert to using a copy of splituser from Python 3.8. Attempts to use ``urllib.parse.urlparse`` led to problems as reported in #1663 and #1668. This change serves as an alternative to #1499 and fixes #1668.
v40.7.2
-------
+
+
+Changes
+^^^^^^^
* #1666: Restore port in URL handling in package_index.
v40.7.1
-------
+
+
+Changes
+^^^^^^^
* #1660: On Python 2, when reading config files, downcast options from text to bytes to satisfy distutils expectations.
v40.7.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1551: File inputs for the ``license`` field in ``setup.cfg`` files now explicitly raise an error.
+
+Changes
+^^^^^^^
* #1180: Add support for non-ASCII in setup.cfg (#1062). Add support for native strings on some parameters (#1136).
* #1499: ``setuptools.package_index`` no longer relies on the deprecated ``urllib.parse.splituser`` per Python #27485.
* #1544: Added tests for PackageIndex.download (for git URLs).
@@ -527,30 +1104,51 @@ v40.7.0
v40.6.3
-------
+
+
+Changes
+^^^^^^^
* #1594: PEP 517 backend no longer declares setuptools as a dependency as it can be assumed.
v40.6.2
-------
+
+
+Changes
+^^^^^^^
* #1592: Fix invalid dependency on external six module (instead of vendored version).
v40.6.1
-------
+
+
+Changes
+^^^^^^^
* #1590: Fixed regression where packages without ``author`` or ``author_email`` fields generated malformed package metadata.
v40.6.0
-------
+
+
+Deprecations
+^^^^^^^^^^^^
* #1541: Officially deprecated the ``requires`` parameter in ``setup()``.
+
+Changes
+^^^^^^^
* #1519: In ``pkg_resources.normalize_path``, additional path normalization is now performed to ensure path values to a directory is always the same, preventing false positives when checking scripts have a consistent prefix to set up on Windows.
* #1545: Changed the warning class of all deprecation warnings; deprecation warning classes are no longer derived from ``DeprecationWarning`` and are thus visible by default.
* #1554: ``build_meta.build_sdist`` now includes ``setup.py`` in source distributions by default.
* #1576: Started monkey-patching ``get_metadata_version`` and ``read_pkg_file`` onto ``distutils.DistributionMetadata`` to retain the correct version on the ``PKG-INFO`` file in the (deprecated) ``upload`` command.
-* #1533: Restricted the ``recursive-include setuptools/_vendor`` to contain only .py and .txt files.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1395: Changed Pyrex references to Cython in the documentation.
* #1456: Documented that the ``rpmbuild`` packages is required for the ``bdist_rpm`` command.
* #1537: Documented how to use ``setup.cfg`` for ``src/ layouts``
@@ -559,69 +1157,115 @@ v40.6.0
* #1553: Updated installation instructions to point to ``pip install`` instead of ``ez_setup.py``.
* #1560: Updated ``setuptools`` distribution documentation to remove some outdated information.
* #1564: Documented ``setup.cfg`` minimum version for version and project_urls.
+
+Misc
+^^^^
+* #1533: Restricted the ``recursive-include setuptools/_vendor`` to contain only .py and .txt files.
* #1572: Added the ``concurrent.futures`` backport ``futures`` to the Python 2.7 test suite requirements.
v40.5.0
-------
+
+
+Changes
+^^^^^^^
* #1335: In ``pkg_resources.normalize_path``, fix issue on Cygwin when cwd contains symlinks.
* #1502: Deprecated support for downloads from Subversion in package_index/easy_install.
* #1517: Dropped use of six.u in favor of ``u""`` literals.
* #1520: Added support for ``data_files`` in ``setup.cfg``.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1525: Fixed rendering of the deprecation warning in easy_install doc.
v40.4.3
-------
+
+
+Changes
+^^^^^^^
* #1480: Bump vendored pyparsing in pkg_resources to 2.2.1.
v40.4.2
-------
+
+
+Misc
+^^^^
* #1497: Updated gitignore in repo.
v40.4.1
-------
+
+
+Changes
+^^^^^^^
* #1480: Bump vendored pyparsing to 2.2.1.
v40.4.0
-------
+
+
+Changes
+^^^^^^^
* #1481: Join the sdist ``--dist-dir`` and the ``build_meta`` sdist directory argument to point to the same target (meaning the build frontend no longer needs to clean manually the dist dir to avoid multiple sdist presence, and setuptools no longer needs to handle conflicts between the two).
v40.3.0
-------
+
+
+Changes
+^^^^^^^
* #1402: Fixed a bug with namespace packages under Python 3.6 when one package in
current directory hides another which is installed.
* #1427: Set timestamp of ``.egg-info`` directory whenever ``egg_info`` command is run.
* #1474: ``build_meta.get_requires_for_build_sdist`` now does not include the ``wheel`` package anymore.
* #1486: Suppress warnings in pkg_resources.handle_ns.
+
+Misc
+^^^^
* #1479: Remove internal use of six.binary_type.
v40.2.0
-------
+
+
+Changes
+^^^^^^^
* #1466: Fix handling of Unicode arguments in PEP 517 backend
v40.1.1
--------
+
+
+Changes
+^^^^^^^
* #1465: Fix regression with ``egg_info`` command when tagging is used.
v40.1.0
-------
+
+
+Changes
+^^^^^^^
* #1410: Deprecated ``upload`` and ``register`` commands.
* #1312: Introduced find_namespace_packages() to find PEP 420 namespace packages.
* #1420: Added find_namespace: directive to config parser.
@@ -631,24 +1275,44 @@ v40.1.0
* #1388: Fixed "Microsoft Visual C++ Build Tools" link in exception when Visual C++ not found.
* #1389: Added support for scripts which have unicode content.
* #1416: Moved several Python version checks over to using ``six.PY2`` and ``six.PY3``.
+
+Misc
+^^^^
* #1441: Removed spurious executable permissions from files that don't need them.
v40.0.0
-------
+
+
+Breaking Changes
+^^^^^^^^^^^^^^^^
* #1342: Drop support for Python 3.3.
+
+Changes
+^^^^^^^
* #1366: In package_index, fixed handling of encoded entities in URLs.
* #1383: In pkg_resources VendorImporter, avoid removing packages imported from the root.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1379: Minor doc fixes after actually using the new release process.
* #1385: Removed section on non-package data files.
* #1403: Fix developer's guide.
+
+Misc
+^^^^
* #1404: Fix PEP 518 configuration: set build requirements in ``pyproject.toml`` to ``["wheel"]``.
v39.2.0
-------
+
+
+Changes
+^^^^^^^
* #1359: Support using "file:" to load a PEP 440-compliant package version from
a text file.
* #1360: Fixed issue with a mismatch between the name of the package and the
@@ -657,11 +1321,17 @@ v39.2.0
includes the attributes in the ``_provider`` instance variable.
* #1365: Take the package_dir option into account when loading the version from
a module attribute.
+
+Documentation changes
+^^^^^^^^^^^^^^^^^^^^^
* #1353: Added coverage badge to README.
* #1356: Made small fixes to the developer guide documentation.
* #1357: Fixed warnings in documentation builds and started enforcing that the
docs build without warnings in tox.
* #1376: Updated release process docs.
+
+Misc
+^^^^
* #1343: The ``setuptools`` specific ``long_description_content_type``,
``project_urls`` and ``provides_extras`` fields are now set consistently
after any ``distutils`` ``setup_keywords`` calls, allowing them to override
diff --git a/LICENSE b/LICENSE
index 6e0693b4b0..353924be0e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,19 +1,19 @@
-Copyright (C) 2016 Jason R Coombs
+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 rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
+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
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
index 128ae280ec..3e8f09de37 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,10 +1,12 @@
-recursive-include setuptools *.py *.exe *.xml
+recursive-include setuptools *.py *.exe *.xml *.tmpl
recursive-include tests *.py
recursive-include setuptools/tests *.html
-recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html
+recursive-include docs *.py *.txt *.rst *.conf *.css *.css_t Makefile indexsidebar.html
recursive-include setuptools/_vendor *.py *.txt
recursive-include pkg_resources *.py *.txt
recursive-include pkg_resources/tests/data *
+recursive-include tools *
+recursive-include changelog.d *
include *.py
include *.rst
include MANIFEST.in
@@ -13,4 +15,3 @@ include launcher.c
include msvc-build-launcher.cmd
include pytest.ini
include tox.ini
-exclude pyproject.toml # Temporary workaround for #1644.
diff --git a/README.rst b/README.rst
index 824a033fb8..9bd03cf949 100644
--- a/README.rst
+++ b/README.rst
@@ -6,14 +6,13 @@
.. _PyPI link: https://pypi.org/project/setuptools
-.. image:: https://dev.azure.com/jaraco/setuptools/_apis/build/status/pypa.setuptools?branchName=master
- :target: https://dev.azure.com/jaraco/setuptools/_build/latest?definitionId=1&branchName=master
+.. image:: https://github.com/pypa/setuptools/workflows/tests/badge.svg
+ :target: https://github.com/pypa/setuptools/actions?query=workflow%3A%22tests%22
+ :alt: tests
-.. image:: https://img.shields.io/travis/pypa/setuptools/master.svg?label=Linux%20CI&logo=travis&logoColor=white
- :target: https://travis-ci.org/pypa/setuptools
-
-.. image:: https://img.shields.io/appveyor/ci/pypa/setuptools/master.svg?label=Windows%20CI&logo=appveyor&logoColor=white
- :target: https://ci.appveyor.com/project/pypa/setuptools/branch/master
+.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
+ :target: https://github.com/psf/black
+ :alt: Code style: Black
.. image:: https://img.shields.io/readthedocs/setuptools/latest.svg
:target: https://setuptools.readthedocs.io
@@ -35,9 +34,13 @@ Bug reports and especially tested patches may be
submitted directly to the `bug tracker
`_.
-To report a security vulnerability, please use the
-`Tidelift security contact `_.
-Tidelift will coordinate the fix and disclosure.
+
+Code of Conduct
+===============
+
+Everyone interacting in the setuptools project's codebases, issue trackers,
+chat rooms, and mailing lists is expected to follow the
+`PSF Code of Conduct `_.
For Enterprise
@@ -49,9 +52,10 @@ Setuptools and the maintainers of thousands of other packages are working with T
`Learn more `_.
-Code of Conduct
-===============
-Everyone interacting in the setuptools project's codebases, issue trackers,
-chat rooms, and mailing lists is expected to follow the
-`PSF Code of Conduct `_.
+Security Contact
+================
+
+To report a security vulnerability, please use the
+`Tidelift security contact `_.
+Tidelift will coordinate the fix and disclosure.
diff --git a/_distutils_hack/__init__.py b/_distutils_hack/__init__.py
index c31edfed17..47ce24944b 100644
--- a/_distutils_hack/__init__.py
+++ b/_distutils_hack/__init__.py
@@ -8,6 +8,11 @@
is_pypy = '__pypy__' in sys.builtin_module_names
+warnings.filterwarnings('ignore',
+ '.+ distutils .+ deprecated',
+ DeprecationWarning)
+
+
def warn_distutils_present():
if 'distutils' not in sys.modules:
return
diff --git a/appveyor.yml b/appveyor.yml
deleted file mode 100644
index 4d1ae55f4f..0000000000
--- a/appveyor.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-clone_depth: 50
-
-environment:
-
- APPVEYOR: True
- NETWORK_REQUIRED: True
- CODECOV_ENV: APPVEYOR_JOB_NAME
-
- matrix:
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- APPVEYOR_JOB_NAME: "Python38-x64-vs2015"
- PYTHON: "C:\\Python38-x64"
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- APPVEYOR_JOB_NAME: "Python38-x64-vs2017"
- PYTHON: "C:\\Python38-x64"
- - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- APPVEYOR_JOB_NAME: "Python38-x64-vs2019"
- PYTHON: "C:\\Python38-x64"
- - APPVEYOR_JOB_NAME: "python37-x64"
- PYTHON: "C:\\Python37-x64"
- - APPVEYOR_JOB_NAME: "python36-x64"
- PYTHON: "C:\\Python36-x64"
- - APPVEYOR_JOB_NAME: "python35-x64"
- PYTHON: "C:\\Python35-x64"
- PYTEST_ADDOPTS: "--cov"
- TOX_TESTENV_PASSENV: "PYTEST_ADDOPTS"
-
-install:
- # symlink python from a directory with a space
- - "mklink /d \"C:\\Program Files\\Python\" %PYTHON%"
- - "SET PYTHON=\"C:\\Program Files\\Python\""
- - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
-
-build: off
-
-cache:
- - '%LOCALAPPDATA%\pip\Cache'
-
-test_script:
- - python --version
- - python -m pip install --disable-pip-version-check --upgrade pip setuptools wheel
- - pip install --upgrade tox tox-venv virtualenv
- - pip freeze --all
- - tox -- --junit-xml=test-results.xml
-
-after_test:
- - tox -e coverage,codecov
-
-on_finish:
- - ps: |
- $wc = New-Object 'System.Net.WebClient'
- $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-results.xml))
-
-version: '{build}'
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 4567b9b043..0000000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,82 +0,0 @@
-# Create the project in Azure with:
-# az devops project create --name $name --organization https://dev.azure.com/$org/ --visibility public
-# then configure the pipelines (through web UI)
-
-trigger:
- branches:
- include:
- - '*'
- tags:
- include:
- - '*'
-
-pool:
- vmImage: $(pool_vm_image)
-
-variables:
-- group: Azure secrets
-- name: pool_vm_image
- value: Ubuntu-18.04
-
-stages:
-- stage: Test
- jobs:
-
- - job: 'Test'
- strategy:
- matrix:
- Bionic Python 3.6:
- python.version: '3.6'
- Bionic Python 3.8:
- python.version: '3.8'
- Windows:
- python.version: '3.8'
- pool_vm_image: vs2017-win2016
- MacOS:
- python.version: '3.8'
- pool_vm_image: macos-10.15
-
- maxParallel: 4
-
- steps:
- - task: UsePythonVersion@0
- inputs:
- versionSpec: '$(python.version)'
- architecture: 'x64'
-
- - script: python -m pip install tox
- displayName: 'Install tox'
-
- - script: |
- tox -- --junit-xml=test-results.xml
- displayName: 'run tests'
-
- - task: PublishTestResults@2
- inputs:
- testResultsFiles: '**/test-results.xml'
- testRunTitle: 'Python $(python.version)'
- condition: succeededOrFailed()
-
-- stage: Publish
- dependsOn: Test
- jobs:
- - job: 'Publish'
-
- steps:
- - task: UsePythonVersion@0
- inputs:
- versionSpec: '3.8'
- architecture: 'x64'
-
- - script: python -m pip install tox
- displayName: 'Install tox'
-
- - script: |
- tox -e release
- env:
- TWINE_PASSWORD: $(PyPI-token)
- TIDELIFT_TOKEN: $(Tidelift-token)
- GITHUB_TOKEN: $(Github-token)
- displayName: 'publish to PyPI'
-
- condition: contains(variables['Build.SourceBranch'], 'tags')
diff --git a/bootstrap.egg-info/PKG-INFO b/bootstrap.egg-info/PKG-INFO
new file mode 100644
index 0000000000..6e11ceeb9b
--- /dev/null
+++ b/bootstrap.egg-info/PKG-INFO
@@ -0,0 +1,2 @@
+Name: setuptools-bootstrap
+Version: 1.0
diff --git a/bootstrap.egg-info/entry_points.txt b/bootstrap.egg-info/entry_points.txt
new file mode 100644
index 0000000000..834d674e57
--- /dev/null
+++ b/bootstrap.egg-info/entry_points.txt
@@ -0,0 +1,14 @@
+[distutils.commands]
+egg_info = setuptools.command.egg_info:egg_info
+
+[distutils.setup_keywords]
+include_package_data = setuptools.dist:assert_bool
+install_requires = setuptools.dist:check_requirements
+extras_require = setuptools.dist:check_extras
+entry_points = setuptools.dist:check_entry_points
+
+[egg_info.writers]
+PKG-INFO = setuptools.command.egg_info:write_pkg_info
+dependency_links.txt = setuptools.command.egg_info:overwrite_arg
+entry_points.txt = setuptools.command.egg_info:write_entries
+requires.txt = setuptools.command.egg_info:write_requirements
diff --git a/bootstrap.py b/bootstrap.py
index 118671f62c..229b996503 100644
--- a/bootstrap.py
+++ b/bootstrap.py
@@ -1,57 +1,7 @@
-"""
-If setuptools is not already installed in the environment, it's not possible
-to invoke setuptools' own commands. This routine will bootstrap this local
-environment by creating a minimal egg-info directory and then invoking the
-egg-info command to flesh out the egg-info directory.
-"""
+import warnings
-import os
-import sys
-import textwrap
-import subprocess
-import io
+msg = "bootstrap.py is no longer needed. Use a PEP-517-compatible builder instead."
-minimal_egg_info = textwrap.dedent("""
- [distutils.commands]
- egg_info = setuptools.command.egg_info:egg_info
- [distutils.setup_keywords]
- include_package_data = setuptools.dist:assert_bool
- install_requires = setuptools.dist:check_requirements
- extras_require = setuptools.dist:check_extras
- entry_points = setuptools.dist:check_entry_points
-
- [egg_info.writers]
- PKG-INFO = setuptools.command.egg_info:write_pkg_info
- dependency_links.txt = setuptools.command.egg_info:overwrite_arg
- entry_points.txt = setuptools.command.egg_info:write_entries
- requires.txt = setuptools.command.egg_info:write_requirements
- """)
-
-
-def ensure_egg_info():
- if os.path.exists('setuptools.egg-info'):
- return
- print("adding minimal entry_points")
- add_minimal_info()
- run_egg_info()
-
-
-def add_minimal_info():
- """
- Build a minimal egg-info, enough to invoke egg_info
- """
-
- os.mkdir('setuptools.egg-info')
- with io.open('setuptools.egg-info/entry_points.txt', 'w') as ep:
- ep.write(minimal_egg_info)
-
-
-def run_egg_info():
- cmd = [sys.executable, 'setup.py', 'egg_info']
- print("Regenerating egg_info")
- subprocess.check_call(cmd)
-
-
-__name__ == '__main__' and ensure_egg_info()
+__name__ == '__main__' and warnings.warn(msg)
diff --git a/changelog.d/2430.doc.1.rst b/changelog.d/2430.doc.1.rst
deleted file mode 100644
index d09e0b9e7b..0000000000
--- a/changelog.d/2430.doc.1.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed a typo in Sphinx docs that made docs dev section disappear
-as a result of PR #2426 -- by :user:`webknjaz`
diff --git a/changelog.d/2430.doc.2.rst b/changelog.d/2430.doc.2.rst
deleted file mode 100644
index 0ac8782323..0000000000
--- a/changelog.d/2430.doc.2.rst
+++ /dev/null
@@ -1,2 +0,0 @@
-Fixed inconsistent RST title nesting levels caused by #2399
--- by :user:`webknjaz`
diff --git a/changelog.d/2644.misc.rst b/changelog.d/2644.misc.rst
new file mode 100644
index 0000000000..1aa9fbbe4e
--- /dev/null
+++ b/changelog.d/2644.misc.rst
@@ -0,0 +1 @@
+Fixed ``DeprecationWarning`` due to ``threading.Thread.setDaemon`` in tests -- by :user:`tirkarthi`
diff --git a/changelog.d/2654.misc.rst b/changelog.d/2654.misc.rst
new file mode 100644
index 0000000000..268c4a2e46
--- /dev/null
+++ b/changelog.d/2654.misc.rst
@@ -0,0 +1,2 @@
+Made the changelog generator compatible
+with Towncrier >= 19.9 -- :user:`webknjaz`
diff --git a/docs/_templates/tidelift-sidebar.html b/docs/_templates/tidelift-sidebar.html
new file mode 100644
index 0000000000..ce48f46b8a
--- /dev/null
+++ b/docs/_templates/tidelift-sidebar.html
@@ -0,0 +1,6 @@
+
For Enterprise
+
+
+Professionally-supported {{ project }} is available with the
+Tidelift Subscription.
+
diff --git a/docs/build_meta.rst b/docs/build_meta.rst
index c36e2bab38..2ad5ae267e 100644
--- a/docs/build_meta.rst
+++ b/docs/build_meta.rst
@@ -7,7 +7,7 @@ What is it?
Python packaging has come `a long way `_.
-The traditional ``setuptools`` way of packgaging Python modules
+The traditional ``setuptools`` way of packaging Python modules
uses a ``setup()`` function within the ``setup.py`` script. Commands such as
``python setup.py bdist`` or ``python setup.py bdist_wheel`` generate a
distribution bundle and ``python setup.py install`` installs the distribution.
@@ -67,14 +67,11 @@ specify the package information::
[options]
packages = find:
-Now generate the distribution. Although the PyPA is still working to
-`provide a recommended tool `_
-to build packages, the `pep517 package `_
-provides this functionality. To build the package::
+Now generate the distribution. To build the package, use
+`PyPA build `_::
- $ pip install -q pep517
- $ mkdir dist
- $ python -m pep517.build .
+ $ pip install -q build
+ $ python -m build
And now it's done! The ``.whl`` file and ``.tar.gz`` can then be distributed
and installed::
diff --git a/docs/conf.py b/docs/conf.py
index de9fe3f892..2f0d3cb3d4 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,81 +1,6 @@
-import subprocess
-import sys
-import os
+extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']
-
-# hack to run the bootstrap script so that jaraco.packaging.sphinx
-# can invoke setup.py
-'READTHEDOCS' in os.environ and subprocess.check_call(
- [sys.executable, '-m', 'bootstrap'],
- cwd=os.path.join(os.path.dirname(__file__), os.path.pardir),
-)
-
-# -- Project information -----------------------------------------------------
-
-github_url = 'https://github.com'
-github_sponsors_url = f'{github_url}/sponsors'
-
-# -- General configuration --
-
-extensions = [
- 'sphinx.ext.extlinks', # allows to create custom roles easily
- 'sphinx.ext.intersphinx', # allows interlinking external docs sites
- 'jaraco.packaging.sphinx',
- 'rst.linker',
-]
-
-# Add any paths that contain templates here, relative to this directory.
-templates_path = ['_templates']
-
-# The master toctree document.
-master_doc = 'index'
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = 'sphinx'
-
-# -- Options for extlinks extension ---------------------------------------
-extlinks = {
- 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323
-}
-
-# -- Options for HTML output --
-
-# The theme to use for HTML and HTML Help pages. Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'nature'
-
-# Add any paths that contain custom themes here, relative to this directory.
-html_theme_path = ['_theme']
-
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
-html_sidebars = {
- 'index': [
- 'relations.html', 'sourcelink.html', 'indexsidebar.html',
- 'searchbox.html']}
-
-# If false, no module index is generated.
-html_use_modindex = False
-
-# If false, no index is generated.
-html_use_index = False
-
-# -- Options for LaTeX output --
-
-# Grouping the document tree into LaTeX files. List of tuples
-# (source start file, target name, title, author,
-# documentclass [howto/manual]).
-latex_documents = [(
- 'index', 'Setuptools.tex', 'Setuptools Documentation',
- 'The fellowship of the packaging', 'manual',
-)]
+master_doc = "index"
link_files = {
'../CHANGES.rst': dict(
@@ -148,10 +73,35 @@
),
}
+intersphinx_mapping = {
+ 'pypa-build': ('https://pypa-build.readthedocs.io/en/latest/', None)
+}
+
+# Add support for linking usernames
+github_url = 'https://github.com'
+github_sponsors_url = f'{github_url}/sponsors'
+extlinks = {
+ 'user': (f'{github_sponsors_url}/%s', '@'), # noqa: WPS323
+}
+extensions += ['sphinx.ext.extlinks', 'sphinx.ext.intersphinx']
# Be strict about any broken references:
nitpicky = True
+# Ref: https://github.com/python-attrs/attrs/pull/571/files\
+# #diff-85987f48f1258d9ee486e3191495582dR82
+default_role = 'any'
+
+# Custom sidebar templates, maps document names to template names.
+html_theme = 'alabaster'
+templates_path = ['_templates']
+html_sidebars = {'index': ['tidelift-sidebar.html']}
+
+# Add support for inline tabs
+extensions += ['sphinx_inline_tabs']
+
+# Support for distutils
+
# Ref: https://stackoverflow.com/a/30624034/595220
nitpick_ignore = [
('c:func', 'SHGetSpecialFolderPath'), # ref to MS docs
@@ -188,12 +138,6 @@
('py:mod', 'docutils'), # there's no Sphinx site documenting this
]
-
-# Ref: https://github.com/python-attrs/attrs/pull/571/files\
-# #diff-85987f48f1258d9ee486e3191495582dR82
-default_role = 'any'
-
-
# Allow linking objects on other Sphinx sites seamlessly:
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
diff --git a/docs/pkg_resources.rst b/docs/pkg_resources.rst
index 364e218328..994bea6f2b 100644
--- a/docs/pkg_resources.rst
+++ b/docs/pkg_resources.rst
@@ -10,6 +10,13 @@ eggs, support for merging packages that have separately-distributed modules or
subpackages, and APIs for managing Python's current "working set" of active
packages.
+Use of ``pkg_resources`` is discouraged in favor of
+`importlib.resources `_,
+`importlib.metadata `_,
+and their backports (`resources `_,
+`metadata `_).
+Please consider using those libraries instead of pkg_resources.
+
.. contents:: **Table of Contents**
@@ -703,7 +710,7 @@ entry point group and look for entry points named "pre_process" and
To advertise an entry point, a project needs to use ``setuptools`` and provide
an ``entry_points`` argument to ``setup()`` in its setup script, so that the
entry points will be included in the distribution's metadata. For more
-details, see the [``setuptools`` documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins).
+details, see :ref:`Advertising Behavior`.
Each project distribution can advertise at most one entry point of a given
name within the same entry point group. For example, a distutils extension
@@ -1939,4 +1946,3 @@ History
0.3a1
* Initial release.
-
diff --git a/docs/references/keywords.rst b/docs/references/keywords.rst
index 03ce9fa23a..619b2d1493 100644
--- a/docs/references/keywords.rst
+++ b/docs/references/keywords.rst
@@ -76,6 +76,17 @@ Keywords
``license``
A string specifying the license of the package.
+``license_file``
+
+ .. warning::
+ ``license_file`` is deprecated. Use ``license_files`` instead.
+
+``license_files``
+
+ A list of glob patterns for license related files that should be included.
+ If neither ``license_file`` nor ``license_files`` is specified, this option
+ defaults to ``LICEN[CS]E*``, ``COPYING*``, ``NOTICE*``, and ``AUTHORS*``.
+
``keywords``
A list of strings or a comma-separated string providing descriptive
meta-data. See: `PEP 0314`_.
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644
index 104d68faef..0000000000
--- a/docs/requirements.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-# keep these in sync with setup.cfg
-sphinx
-jaraco.packaging>=6.1
-rst.linker>=1.9
-pygments-github-lexers==0.0.5
-
-setuptools>=34
diff --git a/docs/setuptools.rst b/docs/setuptools.rst
index 1000a0cebf..541bec515a 100644
--- a/docs/setuptools.rst
+++ b/docs/setuptools.rst
@@ -54,7 +54,7 @@ Feature Highlights:
Developer's Guide
-----------------
-
+The developer's guide has been updated. See the :doc:`most recent version `.
@@ -157,7 +157,7 @@ To use this feature:
]
build-backend = "setuptools.build_meta"
-* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``pep517``.
+* Use a :pep:`517` compatible build frontend, such as ``pip >= 19`` or ``build``.
.. warning::
diff --git a/docs/userguide/declarative_config.rst b/docs/userguide/declarative_config.rst
index bc66869b6e..7c97ca1cfa 100644
--- a/docs/userguide/declarative_config.rst
+++ b/docs/userguide/declarative_config.rst
@@ -184,7 +184,7 @@ maintainer_email maintainer-email str
classifiers classifier file:, list-comma
license str
license_file str
-license_files list-comma
+license_files list-comma 42.0.0
description summary file:, str
long_description long-description file:, str
long_description_content_type str 38.6.0
@@ -243,6 +243,19 @@ data_files dict 40.6.0
**find_namespace directive** - The ``find_namespace:`` directive is supported since Python >=3.3.
+
Notes:
1. In the ``package_data`` section, a key named with a single asterisk (``*``)
refers to all packages, in lieu of the empty string used in ``setup.py``.
+
+2. In the ``extras_require`` section, values are parsed as ``list-semi``. This implies that in
+order to include markers, they **must** be *dangling*:
+
+.. code-block:: ini
+
+ [options.extras_require]
+ rest = docutils>=0.3; pack ==1.1, ==1.3
+ pdf =
+ ReportLab>=1.2
+ RXP
+ importlib-metadata; python_version < "3.8"
diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst
index 354a9f8c36..188083e0fb 100644
--- a/docs/userguide/dependency_management.rst
+++ b/docs/userguide/dependency_management.rst
@@ -3,7 +3,7 @@ Dependencies Management in Setuptools
=====================================
There are three types of dependency styles offered by setuptools:
-1) build system requirement, required dependency and 3) optional
+1) build system requirement, 2) required dependency and 3) optional
dependency.
.. Note::
@@ -19,8 +19,8 @@ Build system requirement
Package requirement
-------------------
After organizing all the scripts and files and getting ready for packaging,
-there needs to be a way to tell Python what programs it need to actually
-do the packgaging (in our case, ``setuptools`` of course). Usually,
+there needs to be a way to tell Python what programs it needs to actually
+do the packaging (in our case, ``setuptools`` of course). Usually,
you also need the ``wheel`` package as well since it is recommended that you
upload a ``.whl`` file to PyPI alongside your ``.tar.gz`` file. Unlike the
other two types of dependency keyword, this one is specified in your
@@ -47,32 +47,36 @@ Declaring required dependency
This is where a package declares its core dependencies, without which it won't
be able to run. ``setuptools`` support automatically download and install
these dependencies when the package is installed. Although there is more
-finess to it, let's start with a simple example.
+finesse to it, let's start with a simple example.
-.. code-block:: ini
+.. tab:: setup.cfg
- [options]
- #...
- install_requires =
- docutils
- BazSpam ==1.1
+ .. code-block:: ini
+
+ [options]
+ #...
+ install_requires =
+ docutils
+ BazSpam ==1.1
+
+.. tab:: setup.py
-.. code-block:: python
+ .. code-block:: python
- setup(
- #...,
- install_requires = [
- 'docutils',
- 'BazSpam ==1.1'
- ]
- )
+ setup(
+ #...,
+ install_requires = [
+ 'docutils',
+ 'BazSpam ==1.1'
+ ]
+ )
When your project is installed (e.g. using pip), all of the dependencies not
already installed will be located (via PyPI), downloaded, built (if necessary),
and installed and 2) Any scripts in your project will be installed with wrappers
that verify the availability of the specified dependencies at runtime.
-
+
Platform specific dependencies
------------------------------
@@ -82,41 +86,49 @@ specific dependencies. For example, the ``enum`` package was added in Python
3.4, therefore, package that depends on it can elect to install it only when
the Python version is older than 3.4. To accomplish this
-.. code-block:: ini
+.. tab:: setup.cfg
- [options]
- #...
- install_requires =
- enum34;python_version<'3.4'
+ .. code-block:: ini
-.. code-block:: python
-
- setup(
+ [options]
#...
- install_requires=[
- "enum34;python_version<'3.4'",]
- )
+ install_requires =
+ enum34;python_version<'3.4'
+
+.. tab:: setup.py
+
+ .. code-block:: python
+
+ setup(
+ #...
+ install_requires=[
+ "enum34;python_version<'3.4'",]
+ )
Similarly, if you also wish to declare ``pywin32`` with a minimal version of 1.0
and only install it if the user is using a Windows operating system:
-.. code-block:: ini
-
- [options]
- #...
- install_requires =
- enum34;python_version<'3.4'
- pywin32 >= 1.0;platform_system=='Windows'
+.. tab:: setup.cfg
-.. code-block:: python
+ .. code-block:: ini
- setup(
+ [options]
#...
- install_requires=[
- "enum34;python_version<'3.4'",
- "pywin32 >= 1.0;platform_system=='Windows'"
- ]
- )
+ install_requires =
+ enum34;python_version<'3.4'
+ pywin32 >= 1.0;platform_system=='Windows'
+
+.. tab:: setup.py
+
+ .. code-block:: python
+
+ setup(
+ #...
+ install_requires=[
+ "enum34;python_version<'3.4'",
+ "pywin32 >= 1.0;platform_system=='Windows'"
+ ]
+ )
The environmental markers that may be used for testing platform types are
detailed in `PEP 508 `_.
@@ -181,20 +193,24 @@ The ``dependency_links`` option takes the form of a list of URL strings. For
example, this will cause a search of the specified page for eggs or source
distributions, if the package's dependencies aren't already installed:
-.. code-block:: ini
-
- [options]
- #...
- dependency_links = http://peak.telecommunity.com/snapshots/
+.. tab:: setup.cfg
-.. code-block:: python
+ .. code-block:: ini
- setup(
+ [options]
#...
- dependency_links=[
- "http://peak.telecommunity.com/snapshots/"
- ],
- )
+ dependency_links = http://peak.telecommunity.com/snapshots/
+
+.. tab:: setup.py
+
+ .. code-block:: python
+
+ setup(
+ #...
+ dependency_links=[
+ "http://peak.telecommunity.com/snapshots/"
+ ],
+ )
Optional dependencies
@@ -202,7 +218,7 @@ Optional dependencies
Setuptools allows you to declare dependencies that only get installed under
specific circumstances. These dependencies are specified with ``extras_require``
keyword and are only installed if another package depends on it (either
-directly or indirectly) This makes it convenient to declare dependencies for
+directly or indirectly) This makes it convenient to declare dependencies for
ancillary functions such as "tests" and "docs".
.. note::
@@ -211,24 +227,28 @@ ancillary functions such as "tests" and "docs".
For example, Package-A offers optional PDF support and requires two other
dependencies for it to work:
-.. code-block:: ini
+.. tab:: setup.cfg
- [metadata]
- name = Package-A
+ .. code-block:: ini
- [options.extras_require]
- PDF = ReportLab>=1.2; RXP
+ [metadata]
+ name = Package-A
+ [options.extras_require]
+ PDF = ReportLab>=1.2; RXP
-.. code-block:: python
- setup(
- name="Project-A",
- #...
- extras_require={
- "PDF": ["ReportLab>=1.2", "RXP"],
- }
- )
+.. tab:: setup.py
+
+ .. code-block:: python
+
+ setup(
+ name="Project-A",
+ #...
+ extras_require={
+ "PDF": ["ReportLab>=1.2", "RXP"],
+ }
+ )
The name ``PDF`` is an arbitary identifier of such a list of dependencies, to
which other components can refer and have them installed. There are two common
@@ -236,57 +256,69 @@ use cases.
First is the console_scripts entry point:
-.. code-block:: ini
+.. tab:: setup.cfg
- [metadata]
- name = Project A
- #...
+ .. code-block:: ini
- [options]
- #...
- entry_points=
- [console_scripts]
- rst2pdf = project_a.tools.pdfgen [PDF]
- rst2html = project_a.tools.htmlgen
-
-.. code-block:: python
-
- setup(
- name = "Project-A"
- #...,
- entry_points={
- "console_scripts": [
- "rst2pdf = project_a.tools.pdfgen [PDF]",
- "rst2html = project_a.tools.htmlgen",
- ],
- }
- )
+ [metadata]
+ name = Project A
+ #...
-When the script ``rst2pdf`` is run, it will trigger the installation of
-the two dependencies ``PDF`` maps to.
+ [options]
+ #...
+ entry_points=
+ [console_scripts]
+ rst2pdf = project_a.tools.pdfgen [PDF]
+ rst2html = project_a.tools.htmlgen
+
+.. tab:: setup.py
+
+ .. code-block:: python
+
+ setup(
+ name = "Project-A"
+ #...,
+ entry_points={
+ "console_scripts": [
+ "rst2pdf = project_a.tools.pdfgen [PDF]",
+ "rst2html = project_a.tools.htmlgen",
+ ],
+ }
+ )
+
+This syntax indicates that the entry point (in this case a console script)
+is only valid when the PDF extra is installed. It is up to the installer
+to determine how to handle the situation where PDF was not indicated
+(e.g. omit the console script, provide a warning when attempting to load
+the entry point, assume the extras are present and let the implementation
+fail later).
The second use case is that other package can use this "extra" for their
own dependencies. For example, if "Project-B" needs "project A" with PDF support
installed, it might declare the dependency like this:
-.. code-block:: ini
+.. tab:: setup.cfg
- [metadata]
- name = Project-B
- #...
+ .. code-block:: ini
- [options]
- #...
- install_requires =
- Project-A[PDF]
+ [metadata]
+ name = Project-B
+ #...
+
+ [options]
+ #...
+ install_requires =
+ Project-A[PDF]
+
+.. tab:: setup.py
-.. code-block:: python
+ .. code-block:: python
- setup(
- name="Project-B",
- install_requires=["Project-A[PDF]"],
- ...
- )
+ setup(
+ name="Project-B",
+ install_requires=["Project-A[PDF]"],
+ ...
+ )
This will cause ReportLab to be installed along with project A, if project B is
installed -- even if project A was already installed. In this way, a project
diff --git a/docs/userguide/development_mode.rst b/docs/userguide/development_mode.rst
index bce724a79f..3c477ec114 100644
--- a/docs/userguide/development_mode.rst
+++ b/docs/userguide/development_mode.rst
@@ -3,9 +3,9 @@
Under normal circumstances, the ``distutils`` assume that you are going to
build a distribution of your project, not use it in its "raw" or "unbuilt"
-form. If you were to use the ``distutils`` that way, you would have to rebuild
-and reinstall your project every time you made a change to it during
-development.
+form. However, if you were to use the ``distutils`` to build a distribution,
+you would have to rebuild and reinstall your project every time you made a
+change to it during development.
Another problem that sometimes comes up with the ``distutils`` is that you may
need to do development on two related projects at the same time. You may need
diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst
index edab446502..63d30a4893 100644
--- a/docs/userguide/entry_point.rst
+++ b/docs/userguide/entry_point.rst
@@ -28,7 +28,7 @@ with ``__init__.py`` as:
.. code-block:: python
- def helloworld():
+ def hello_world():
print("Hello world")
and ``__main__.py`` providing a hook:
@@ -64,7 +64,7 @@ After installing the package, a user may invoke that function by simply calling
The syntax for entry points is specified as follows:
-.. code-block::
+.. code-block:: ini
= [.[.]][: