Skip to content

Commit 6349e52

Browse files
authored
Merge branch 'main' into main
2 parents 947d2cd + 03b212a commit 6349e52

43 files changed

Lines changed: 835 additions & 428 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Test
22

3-
on:
3+
on:
44
push:
55
pull_request:
66
schedule:
@@ -13,6 +13,7 @@ concurrency:
1313
jobs:
1414
build:
1515
name: ${{ matrix.noxenv }}
16+
if: ${{ github.repository_owner == 'pypa' || github.event_name != 'schedule' }}
1617
runs-on: ubuntu-latest
1718
strategy:
1819
matrix:

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace

.readthedocs.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ sphinx:
99
# https://github.com/pyca/cryptography/issues/5863#issuecomment-792343136
1010
builder: dirhtml
1111

12+
build:
13+
os: ubuntu-22.04
14+
tools:
15+
python: "3.11"
16+
1217
python:
13-
version: 3.8
1418
install:
1519
- requirements: requirements.txt

noxfile.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ def translation(session):
1818
session.install("-r", "requirements.txt")
1919
target_dir = "locales"
2020
session.run(
21-
"sphinx-build",
21+
"sphinx-build",
2222
"-b", "gettext", # build gettext-style message catalogs (.pot file)
2323
"-d", ".nox/.doctrees/", # path to put the cache
2424
"source/", # where the rst files are located
2525
target_dir, # where to put the .pot file
2626
)
2727

28+
2829
@nox.session()
2930
def build(session, autobuild=False):
3031
"""
@@ -75,10 +76,24 @@ def linkcheck(session):
7576
"""
7677
session.install("-r", "requirements.txt")
7778
session.run(
78-
"sphinx-build",
79+
"sphinx-build",
7980
"-b", "linkcheck", # use linkcheck builder
8081
"--color",
8182
"-n", "-W", "--keep-going", # be strict
8283
"source", # where the rst files are located
8384
"build", # where to put the check output
8485
)
86+
87+
88+
@nox.session()
89+
def checkqa(session):
90+
"""
91+
Format the guide using pre-commit.
92+
"""
93+
session.install("pre-commit")
94+
session.run(
95+
"pre-commit",
96+
"run",
97+
"--all-files",
98+
"--show-diff-on-failure",
99+
)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ sphinx-autobuild==0.7.1
33
sphinx-inline-tabs==2021.4.11b9
44
python-docs-theme==2022.1
55
sphinx-copybutton==0.5.0
6-
git+https://github.com/pypa/pypa-docs-theme.git#egg=pypa-docs-theme
6+
pypa-docs-theme @ git+https://github.com/pypa/pypa-docs-theme.git

source/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@
397397
# Example configuration for intersphinx: refer to the Python standard library.
398398
intersphinx_mapping = {
399399
'boltons': ('https://boltons.readthedocs.io/en/latest/', None),
400+
'bottle': ('https://bottlepy.org/docs/dev/', None),
400401
'build': ('https://pypa-build.readthedocs.io/en/stable/', None),
401402
'cffi': ('https://cffi.readthedocs.io/en/latest/', None),
402403
'conda': ('https://conda.io/en/latest/', None),
@@ -407,7 +408,7 @@
407408
'nox': ('https://nox.thea.codes/en/latest/', None),
408409
'openstack': ('https://docs.openstack.org/glance/latest/', None),
409410
'packaging': ('https://packaging.pypa.io/en/latest/', None),
410-
'packaging.python.org': ('https://packaging.python.org/', None),
411+
'packaging.python.org': ('https://packaging.python.org/en/latest/', None),
411412
'pip': ('https://pip.pypa.io/en/latest/', None),
412413
'pipenv': ('https://pipenv.pypa.io/en/latest/', None),
413414
'piwheels': ('https://piwheels.readthedocs.io/en/latest/', None),
@@ -416,10 +417,10 @@
416417
'pypa': ('https://www.pypa.io/en/latest/', None),
417418
'python': ('https://docs.python.org/3', None),
418419
'python-guide': ('https://docs.python-guide.org', None),
419-
'setuptools': ('https://setuptools.readthedocs.io/en/latest/', None),
420+
'setuptools': ('https://setuptools.pypa.io/en/latest/', None),
420421
'spack': ('https://spack.readthedocs.io/en/latest/', None),
421422
'sphinx': ('https://www.sphinx-doc.org/en/master', None),
422-
'tox': ('https://tox.readthedocs.io/en/latest/', None),
423+
'tox': ('https://tox.wiki/en/latest/', None),
423424
'twine': ('https://twine.readthedocs.io/en/stable/', None),
424425
'virtualenv': ('https://virtualenv.pypa.io/en/stable/', None),
425426
}

source/discussions/deploying-python-applications.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ py2exe
9292
^^^^^^
9393

9494
`py2exe <https://pypi.org/project/py2exe/>`__ is a distutils extension which
95-
allows to build standalone Windows executable programs (32-bit and 64-bit)
96-
from Python scripts. Python versions included in the official development
95+
allows to build standalone Windows executable programs (32-bit and 64-bit)
96+
from Python scripts. Python versions included in the official development
9797
cycle are supported (refers to `Status of Python branches`__). py2exe can
9898
build console executables and windows (GUI) executables. Building windows
9999
services, and DLL/EXE COM servers might work but it is not actively supported.
100-
The distutils extension is released under the MIT-licence and Mozilla
100+
The distutils extension is released under the MIT-licence and Mozilla
101101
Public License 2.0.
102102

103103
.. __: https://devguide.python.org/#status-of-python-branches
@@ -108,8 +108,8 @@ macOS
108108
py2app
109109
^^^^^^
110110

111-
`py2app <https://pypi.org/project/py2app/>`__ is a Python setuptools
112-
command which will allow you to make standalone macOS application
111+
`py2app <https://pypi.org/project/py2app/>`__ is a Python setuptools
112+
command which will allow you to make standalone macOS application
113113
bundles and plugins from Python scripts. Note that py2app MUST be used
114114
on macOS to build applications, it cannot create Mac applications on other
115115
platforms. py2app is released under the MIT-license.
@@ -120,11 +120,11 @@ Unix (including Linux and macOS)
120120
pex
121121
^^^
122122

123-
`pex <https://pypi.org/project/pex/>`__ is a library for generating .pex
124-
(Python EXecutable) files which are executable Python environments in the
125-
spirit of virtualenvs. pex is an expansion upon the ideas outlined in :pep:`441`
126-
and makes the deployment of Python applications as simple as cp. pex files may
127-
even include multiple platform-specific Python distributions, meaning that a
123+
`pex <https://pypi.org/project/pex/>`__ is a library for generating .pex
124+
(Python EXecutable) files which are executable Python environments in the
125+
spirit of virtualenvs. pex is an expansion upon the ideas outlined in :pep:`441`
126+
and makes the deployment of Python applications as simple as cp. pex files may
127+
even include multiple platform-specific Python distributions, meaning that a
128128
single pex file can be portable across Linux and macOS. pex is released under the
129129
Apache License 2.0.
130130

source/discussions/install-requires-vs-requirements.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ v2 of 'B', so it would be like so:
3838
'B>=2'
3939
]
4040

41-
It may also be known that project A follows semantic versioning, and that v2 of
42-
'A' will indicate a break in compatibility, so it makes sense to not allow v2:
41+
It may also be known that project 'A' introduced a change in its v2
42+
that breaks the compatibility of your project with v2 of 'A' and later,
43+
so it makes sense to not allow v2:
4344

4445
::
4546

source/discussions/wheel-vs-egg.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Distribution>` and :term:`binary <Binary Distribution>` packaging for Python.
1717
Here's a breakdown of the important differences between :term:`Wheel` and :term:`Egg`.
1818

1919

20-
* :term:`Wheel` has an :pep:`official PEP <427>`. :term:`Egg` did not.
20+
* :term:`Wheel` has an :doc:`official standard specification
21+
</specifications/binary-distribution-format>`.
22+
:term:`Egg` did not.
2123

2224
* :term:`Wheel` is a :term:`distribution <Distribution Package>` format, i.e a packaging
2325
format. [1]_ :term:`Egg` was both a distribution format and a runtime
@@ -45,5 +47,5 @@ Here's a breakdown of the important differences between :term:`Wheel` and :term:
4547
----
4648

4749
.. [1] Circumstantially, in some cases, wheels can be used as an importable
48-
runtime format, although :pep:`this is not officially supported at this time
49-
<427#is-it-possible-to-import-python-code-directly-from-a-wheel-file>`.
50+
runtime format, although :ref:`this is not officially supported at this time
51+
<binary-distribution-format-import-wheel>`.

source/glossary.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Glossary
4242
Egg
4343

4444
A :term:`Built Distribution` format introduced by :ref:`setuptools`,
45-
which is being replaced by :term:`Wheel`. For details, see
45+
which is being replaced by :term:`Wheel`. For details, see
4646
:doc:`The Internal Structure of Python Eggs <setuptools:deprecated/python_eggs>` and
4747
`Python Eggs <http://peak.telecommunity.com/DevCenter/PythonEggs>`_
4848

@@ -237,7 +237,9 @@ Glossary
237237

238238
Wheel
239239

240-
A :term:`Built Distribution` format introduced by :pep:`427`,
240+
A :term:`Built Distribution` format introduced by an official
241+
:doc:`standard specification
242+
</specifications/binary-distribution-format/>`,
241243
which is intended to replace the :term:`Egg` format. Wheel is currently
242244
supported by :ref:`pip`.
243245

0 commit comments

Comments
 (0)