Skip to content

Commit 5b85143

Browse files
authored
Merge branch 'main' into added_obsolete
2 parents c289752 + 045e236 commit 5b85143

23 files changed

+172
-46
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 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:

.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

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+
)

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/wheel-vs-egg.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ Here's a breakdown of the important differences between :term:`Wheel` and :term:
4444
<https://docs.python.org/2/library/sysconfig.html#installation-paths>`_,
4545
therefore making it easier to convert to other formats.
4646

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+
4751
----
4852

4953
.. [1] Circumstantially, in some cases, wheels can be used as an importable

source/glossary.rst

Lines changed: 1 addition & 1 deletion
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

source/guides/dropping-older-python-versions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Dropping support for older Python versions
66

77
Dropping support for older Python versions is supported by the standard :ref:`core-metadata` 1.2 specification via a "Requires-Python" attribute.
88

9-
Metadata 1.2+ clients, such as Pip 9.0+, will adhere to this specification by matching the current Python runtime and comparing it with the required version
9+
Metadata 1.2+ clients, such as Pip 9.0+, will adhere to this specification by matching the current Python runtime and comparing it with the required version
1010
in the package metadata. If they do not match, it will attempt to install the last package distribution that supported that Python runtime.
1111

1212
This mechanism can be used to drop support for older Python versions, by amending the "Requires-Python" attribute in the package metadata.
@@ -102,8 +102,8 @@ metadata values based on the argument you provide in ``python_requires``.
102102

103103
Within a Python source package (the zip or the tar-gz file you download) is a text file called PKG-INFO.
104104

105-
This file is generated by Distutils or :ref:`setuptools` when it generates the source package.
106-
The file contains a set of keys and values, the list of keys is part of the PyPa standard metadata format.
105+
This file is generated by Distutils or :ref:`setuptools` when it generates the source package.
106+
The file contains a set of keys and values, the list of keys is part of the PyPa standard metadata format.
107107

108108
You can see the contents of the generated file like this:
109109

@@ -113,7 +113,7 @@ You can see the contents of the generated file like this:
113113
114114
Validate that the following is in place, before publishing the package:
115115

116-
- If you have upgraded correctly, the Metadata-Version value should be 1.2 or higher.
116+
- If you have upgraded correctly, the Metadata-Version value should be 1.2 or higher.
117117
- The Requires-Python field is set and matches your specification in setup.py.
118118

119119
4. Using Twine to publish

source/guides/installing-stand-alone-command-line-tools.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ For example:
6666
\
6767
^__^
6868
(oo)\_______
69-
(__)\ )\/
69+
(__)\ )\/
7070
|| ||
7171
||----w |
7272

source/guides/installing-using-linux-tools.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Fedora
3838
sudo dnf install python3-pip python3-wheel
3939
4040
To learn more about Python in Fedora, please visit the `official Fedora docs`_,
41-
`Python Classroom`_ or `Fedora Loves Python`_.
41+
`Python Classroom`_ or `Fedora Loves Python`_.
4242

4343
.. _official Fedora docs: https://developer.fedoraproject.org/tech/languages/python/python-installation.html
4444
.. _Python Classroom: https://labs.fedoraproject.org/en/python-classroom/
@@ -54,7 +54,7 @@ To install pip and wheel for the system Python, there are two options:
5454

5555
1. Enable the `EPEL repository <https://fedoraproject.org/wiki/EPEL>`_ using
5656
`these instructions
57-
<https://docs.fedoraproject.org/en-US/epel/#how_can_i_use_these_extra_packages>`__.
57+
<https://docs.fedoraproject.org/en-US/epel/#how_can_i_use_these_extra_packages>`__.
5858
On EPEL 7, you can install pip and wheel like so:
5959

6060
.. code-block:: bash
@@ -111,7 +111,7 @@ openSUSE
111111
~~~~~~~~
112112

113113
.. code-block:: bash
114-
114+
115115
sudo zypper install python3-pip python3-setuptools python3-wheel
116116
117117

source/guides/making-a-pypi-friendly-readme.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ such as ``text/plain``, ``text/x-rst`` (for reStructuredText), or ``text/markdow
5858
py -m pip install --user --upgrade setuptools wheel twine
5959
6060
The minimum required versions of the respective tools are:
61-
61+
6262
- ``setuptools >= 38.6.0``
6363
- ``wheel >= 0.31.0``
6464
- ``twine >= 1.11.0``

0 commit comments

Comments
 (0)