From f97d27adab4b4b82f9c22401391c9cbcfc5a99aa Mon Sep 17 00:00:00 2001
From: Anderson Bravalheri <andersonbravalheri@gmail.com>
Date: Sat, 25 Dec 2021 19:47:33 +0000
Subject: [PATCH] Add news fragments

---
 changelog.d/2970.breaking.rst      |  2 ++
 changelog.d/2970.change.1.rst      | 13 +++++++++++++
 changelog.d/2970.change.2.rst      |  3 +++
 changelog.d/2970.change.3.rst      |  3 +++
 changelog.d/2970.deprecation.1.rst |  8 ++++++++
 docs/conf.py                       |  4 ++++
 6 files changed, 33 insertions(+)
 create mode 100644 changelog.d/2970.breaking.rst
 create mode 100644 changelog.d/2970.change.1.rst
 create mode 100644 changelog.d/2970.change.2.rst
 create mode 100644 changelog.d/2970.change.3.rst
 create mode 100644 changelog.d/2970.deprecation.1.rst

diff --git a/changelog.d/2970.breaking.rst b/changelog.d/2970.breaking.rst
new file mode 100644
index 00000000000..323dfa289da
--- /dev/null
+++ b/changelog.d/2970.breaking.rst
@@ -0,0 +1,2 @@
+Removed public class ``SetupRequirementsError`` from the
+``setuptools.build_meta`` module.
diff --git a/changelog.d/2970.change.1.rst b/changelog.d/2970.change.1.rst
new file mode 100644
index 00000000000..299c8b7f196
--- /dev/null
+++ b/changelog.d/2970.change.1.rst
@@ -0,0 +1,13 @@
+Added **experimental** support for ``pyproject.toml`` configuration
+(as introduced by :pep:`621`). Configuration parameters not covered by
+standards are handled in the ``[tool.setuptools]`` sub-table.
+
+In the future, existing ``setup.cfg`` configuration
+may be automatically converted into the ``pyproject.toml`` equivalent before taking effect
+(as proposed in :issue:`1688`). Meanwhile users can use automated tools like
+:pypi:`ini2toml` to help in the transition.
+
+Please note that the legacy backend is not guaranteed to work with
+``pyproject.toml`` configuration.
+
+-- by :user:`abravalheri`.
diff --git a/changelog.d/2970.change.2.rst b/changelog.d/2970.change.2.rst
new file mode 100644
index 00000000000..e672351f04e
--- /dev/null
+++ b/changelog.d/2970.change.2.rst
@@ -0,0 +1,3 @@
+Added vendored dependencies for :pypi:`tomli`, :pypi:`validate-pyproject`.
+
+These dependencies are used to read ``pyproject.toml`` files and validate them.
diff --git a/changelog.d/2970.change.3.rst b/changelog.d/2970.change.3.rst
new file mode 100644
index 00000000000..c9f97bb6da2
--- /dev/null
+++ b/changelog.d/2970.change.3.rst
@@ -0,0 +1,3 @@
+Changed the means of interaction between ``setuptools.build_meta`` and
+``setuptools.setup``. Instead of simply executing the script, the backend now
+relies on ``distutils.core.run_setup`` to obtain a distribution object.
diff --git a/changelog.d/2970.deprecation.1.rst b/changelog.d/2970.deprecation.1.rst
new file mode 100644
index 00000000000..3bae915c08d
--- /dev/null
+++ b/changelog.d/2970.deprecation.1.rst
@@ -0,0 +1,8 @@
+Deprecated ``setuptools.config.read_configuration``,
+``setuptools.config.parse_configuration`` and other functions or classes
+from ``setuptools.config``.
+
+Users that still need to parse and process configuration from ``setup.cfg`` can
+import a direct replacement from ``setuptools.config.setupcfg``, however this
+module is transitional and might be removed in the future
+(the ``setup.cfg`` configuration format itself is likely to be deprecated in the future).
diff --git a/docs/conf.py b/docs/conf.py
index 1fb27716124..422be67d8ad 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -94,8 +94,12 @@
 # Add support for linking usernames
 github_url = 'https://github.com'
 github_sponsors_url = f'{github_url}/sponsors'
+repository = f'{github_url}/pypa/setuptools'
 extlinks = {
     'user': (f'{github_sponsors_url}/%s', '@'),  # noqa: WPS323
+    'issue': (f'{repository}/issues/%s', 'issue #%s'),  # noqa: WPS323
+    'pr': (f'{repository}/pull/%s', 'PR #%s'),  # noqa: WPS323
+    'pypi': ('https://pypi.org/project/%s', '%s'),  # noqa: WPS323
 }
 extensions += ['sphinx.ext.extlinks']