Skip to content

Commit b746801

Browse files
authored
Merge branch 'main' into extension
2 parents 42ba363 + 588c8cd commit b746801

File tree

55 files changed

+1691
-615
lines changed

Some content is hidden

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

55 files changed

+1691
-615
lines changed

.github/workflows/test.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Test
22

3-
on:
3+
on:
4+
merge_group:
45
push:
6+
branches-ignore:
7+
- gh-readonly-queue/** # Temporary merge queue-related GH-made branches
58
pull_request:
69
schedule:
710
- cron: "0 6 * * *" # daily at 6am
@@ -13,6 +16,7 @@ concurrency:
1316
jobs:
1417
build:
1518
name: ${{ matrix.noxenv }}
19+
if: ${{ github.repository_owner == 'pypa' || github.event_name != 'schedule' }}
1620
runs-on: ubuntu-latest
1721
strategy:
1822
matrix:
@@ -26,7 +30,7 @@ jobs:
2630
- name: Set up Python
2731
uses: actions/setup-python@v4
2832
with:
29-
python-version: 3.9
33+
python-version: "3.11"
3034
cache: 'pip'
3135
cache-dependency-path: 'requirements.txt'
3236

@@ -37,3 +41,21 @@ jobs:
3741
- name: Nox ${{ matrix.noxenv }}
3842
run: |
3943
python -m nox -s ${{ matrix.noxenv }}
44+
45+
46+
check:
47+
# This job does nothing and is only used for the branch protection
48+
# or multi-stage CI jobs, like making sure that all tests pass before
49+
# a publishing job is started.
50+
if: always()
51+
52+
needs:
53+
- build
54+
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Decide whether the needed jobs succeeded or failed
59+
uses: re-actors/alls-green@release/v1
60+
with:
61+
jobs: ${{ toJSON(needs) }}

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: check-added-large-files
6+
- id: check-case-conflict
7+
- id: check-merge-conflict
8+
- id: check-symlinks
9+
- id: check-yaml
10+
- id: end-of-file-fixer
11+
- id: mixed-line-ending
12+
- id: trailing-whitespace
13+
14+
- repo: https://github.com/codespell-project/codespell
15+
rev: v2.2.6
16+
hooks:
17+
- id: codespell
18+
args: ["-L", "ned"]
19+
20+
- repo: local
21+
hooks:
22+
- id: disallow-caps
23+
name: Disallow improper capitalization
24+
language: pygrep
25+
entry: PyBind|Numpy|Cmake|CCache|Github|PyTest
26+
exclude: .pre-commit-config.yaml
27+
28+
- repo: https://github.com/pre-commit/pygrep-hooks
29+
rev: v1.10.0
30+
hooks:
31+
- id: rst-backticks
32+
- id: rst-directive-colons
33+
- id: rst-inline-touching-normal

.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: 18 additions & 3 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
"""
@@ -38,7 +39,7 @@ def build(session, autobuild=False):
3839

3940
if autobuild:
4041
command = "sphinx-autobuild"
41-
extra_args = "-H", "0.0.0.0"
42+
extra_args = "--host", "0.0.0.0"
4243
else:
4344
# NOTE: This branch adds options that are unsupported by autobuild
4445
command = "sphinx-build"
@@ -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: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
sphinx==4.5.0
2-
sphinx-autobuild==0.7.1
2+
sphinx-autobuild==2021.3.14
33
sphinx-inline-tabs==2021.4.11b9
4-
python-docs-theme==2022.1
4+
python-docs-theme==2023.9
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
7+
sphinx-toolbox==3.5.0

source/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'sphinx.ext.todo',
3737
'sphinx_inline_tabs',
3838
'sphinx_copybutton',
39+
'sphinx_toolbox.collapse',
3940
]
4041

4142
# config for copy button
@@ -397,6 +398,7 @@
397398
# Example configuration for intersphinx: refer to the Python standard library.
398399
intersphinx_mapping = {
399400
'boltons': ('https://boltons.readthedocs.io/en/latest/', None),
401+
'bottle': ('https://bottlepy.org/docs/dev/', None),
400402
'build': ('https://pypa-build.readthedocs.io/en/stable/', None),
401403
'cffi': ('https://cffi.readthedocs.io/en/latest/', None),
402404
'conda': ('https://conda.io/en/latest/', None),
@@ -407,7 +409,7 @@
407409
'nox': ('https://nox.thea.codes/en/latest/', None),
408410
'openstack': ('https://docs.openstack.org/glance/latest/', None),
409411
'packaging': ('https://packaging.pypa.io/en/latest/', None),
410-
'packaging.python.org': ('https://packaging.python.org/', None),
412+
'packaging.python.org': ('https://packaging.python.org/en/latest/', None),
411413
'pip': ('https://pip.pypa.io/en/latest/', None),
412414
'pipenv': ('https://pipenv.pypa.io/en/latest/', None),
413415
'piwheels': ('https://piwheels.readthedocs.io/en/latest/', None),
@@ -416,10 +418,10 @@
416418
'pypa': ('https://www.pypa.io/en/latest/', None),
417419
'python': ('https://docs.python.org/3', None),
418420
'python-guide': ('https://docs.python-guide.org', None),
419-
'setuptools': ('https://setuptools.readthedocs.io/en/latest/', None),
421+
'setuptools': ('https://setuptools.pypa.io/en/latest/', None),
420422
'spack': ('https://spack.readthedocs.io/en/latest/', None),
421423
'sphinx': ('https://www.sphinx-doc.org/en/master', None),
422-
'tox': ('https://tox.readthedocs.io/en/latest/', None),
424+
'tox': ('https://tox.wiki/en/latest/', None),
423425
'twine': ('https://twine.readthedocs.io/en/stable/', None),
424426
'virtualenv': ('https://virtualenv.pypa.io/en/stable/', None),
425427
}

source/contribute.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ Documentation types
3232
===================
3333

3434
This project consists of four distinct documentation types with specific
35-
purposes. When proposing new additions to the project please pick the
35+
purposes. The project aspires to follow the `Diátaxis process`_
36+
for creating quality documentation. When proposing new additions to the project please pick the
3637
appropriate documentation type.
3738

39+
.. _Diátaxis process: https://diataxis.fr/
40+
3841
Tutorials
3942
---------
4043

@@ -63,7 +66,7 @@ document <discussions/install-requires-vs-requirements>`.
6366
Specifications
6467
--------------
6568

66-
Specifications are reference documention focused on comprehensively documenting
69+
Specifications are reference documentation focused on comprehensively documenting
6770
an agreed-upon interface for interoperability between packaging tools.
6871
:doc:`example specification-style document <specifications/core-metadata>`.
6972

@@ -75,15 +78,15 @@ We use `Weblate`_ to manage translations of this project.
7578
Please visit the `packaging.python.org`_ project on Weblate to contribute.
7679

7780
If you are experiencing issues while you are working on translations,
78-
please open an issue on `Github`_.
81+
please open an issue on `GitHub`_.
7982

8083
.. tip::
8184

8285
Any translations of this project should follow `reStructuredText syntax`_.
8386

8487
.. _Weblate: https://weblate.org/
8588
.. _packaging.python.org: https://hosted.weblate.org/projects/pypa/packaging-python-org/
86-
.. _Github: https://github.com/pypa/packaging.python.org/issues
89+
.. _GitHub: https://github.com/pypa/packaging.python.org/issues
8790
.. _reStructuredText syntax: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
8891

8992
Adding a language
@@ -131,9 +134,9 @@ need:
131134
132135
python -m pip install --user nox
133136
134-
2. Python 3.8. Our build scripts are usually tested with Python 3.8 only.
137+
2. Python 3.11. Our build scripts are usually tested with Python 3.11 only.
135138
See the :doc:`Hitchhiker's Guide to Python installation instructions <python-guide:starting/installation>`
136-
to install Python 3.8 on your operating system.
139+
to install Python 3.11 on your operating system.
137140

138141
To build the guide, run the following shell command in the project's root folder:
139142

source/discussions/deploying-python-applications.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ directory, independent of any other Python installation on the computer.
7373

7474
A big advantage of Pynsist is that the Windows packages can be built on Linux.
7575
There are several examples for different kinds of programs (console, GUI) in
76-
the `documentation <pynsist:index>`. The tool is released
76+
the :any:`documentation <pynsist:index>`. The tool is released
7777
under the MIT-licence.
7878

7979
Application bundles
@@ -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: 9 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
@@ -42,8 +44,12 @@ Here's a breakdown of the important differences between :term:`Wheel` and :term:
4244
<https://docs.python.org/2/library/sysconfig.html#installation-paths>`_,
4345
therefore making it easier to convert to other formats.
4446

47+
* :term:`Egg` uploads have been disabled for upload to PyPI, per :pep:`715`.
48+
Read the `deprecation notice <https://blog.pypi.org/posts/2023-06-26-deprecate-egg-uploads/>`_
49+
for more information.
50+
4551
----
4652

4753
.. [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>`.
54+
runtime format, although :ref:`this is not officially supported at this time
55+
<binary-distribution-format-import-wheel>`.

0 commit comments

Comments
 (0)