Skip to content

Commit c55f147

Browse files
committed
Start prepping 24.11.0.
1 parent 396f2cc commit c55f147

15 files changed

+376
-121
lines changed

.github/workflows/ci.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33

44
on:
55
push:
6-
branches: [trunk]
6+
branches: [ trunk ]
77
pull_request:
88
workflow_dispatch:
99

@@ -12,7 +12,7 @@ env:
1212
PIP_DISABLE_PIP_VERSION_CHECK: "1"
1313
PIP_NO_PYTHON_VERSION_WARNING: "1"
1414

15-
permissions: {}
15+
permissions: { }
1616

1717
jobs:
1818
build-package:
@@ -23,6 +23,7 @@ jobs:
2323
- uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
26+
persist-credentials: false
2627

2728
- uses: hynek/build-and-inspect-python-package@v2
2829
id: baipp
@@ -74,6 +75,8 @@ jobs:
7475

7576
steps:
7677
- uses: actions/checkout@v4
78+
with:
79+
persist-credentials: false
7780
- uses: actions/setup-python@v5
7881
with:
7982
python-version: "3.12"
@@ -140,17 +143,17 @@ jobs:
140143
- run: tar xf dist/*.tar.gz --strip-components=1
141144
- uses: actions/setup-python@v5
142145
with:
143-
python-version: "3.12"
146+
python-version: "3.13"
144147
- name: Set up test runner
145148
run: |
146149
python -VV
147150
python -Im site
148151
python -Im pip install --upgrade nox
149152
python -Im nox --version
150153
- name: Check code formatting
151-
run: "python -Im nox --non-interactive --error-on-external-run --tag formatters --python 3.12"
154+
run: "python -Im nox --non-interactive --error-on-external-run --tag formatters --python 3.13"
152155
- name: Lint code
153-
run: "python -Im nox --non-interactive --error-on-external-run --tag linters --python 3.12"
156+
run: "python -Im nox --non-interactive --error-on-external-run --tag linters --python 3.13"
154157

155158

156159
check-package:
@@ -166,15 +169,15 @@ jobs:
166169
- run: tar xf dist/*.tar.gz --strip-components=1
167170
- uses: actions/setup-python@v5
168171
with:
169-
python-version: "3.12"
172+
python-version: "3.13"
170173
- name: Set up test runner
171174
run: |
172175
python -VV
173176
python -Im site
174177
python -Im pip install --upgrade nox
175178
python -Im nox --version
176179
- name: Check package
177-
run: "python -Im nox --non-interactive --error-on-external-run --tag packaging --python 3.12"
180+
run: "python -Im nox --non-interactive --error-on-external-run --tag packaging --python 3.13"
178181

179182

180183
required-checks-pass:

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,10 @@ dmypy.json
131131

132132
# Cython debug symbols
133133
cython_debug/
134+
135+
# IDEs
136+
.idea/
137+
.vscode/
138+
139+
# PDM local file.
140+
.pdm-python

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.6.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-ast
@@ -16,10 +16,10 @@ repos:
1616
- id: end-of-file-fixer
1717
- id: trailing-whitespace
1818
- repo: https://github.com/psf/black
19-
rev: 24.8.0
19+
rev: 24.10.0
2020
hooks:
2121
- id: black
22-
language_version: python3.8
22+
language_version: python3.13
2323
name: black (Python formatter)
2424
- repo: https://github.com/pycqa/flake8
2525
rev: 7.1.1

.readthedocs.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ version: 2
77
build:
88
os: ubuntu-22.04
99
tools:
10-
python: "3.11"
10+
python: "3.12"
1111

1212
sphinx:
1313
configuration: docs/conf.py
1414

1515
python:
1616
install:
1717
- method: pip
18-
path: .[docs]
18+
path: .
19+
- requirements: docs/requirements.txt

CONTRIBUTING.rst

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
Contributor guide
2+
=================
3+
4+
Contributions are welcome, and several things about this repository
5+
have been set up to make the process easier for everyone (including
6+
you!).
7+
8+
9+
Prerequisites
10+
-------------
11+
12+
* Please use a code editor/IDE that supports `EditorConfig
13+
<https://editorconfig.org>`_. Most editors do nowadays, so you
14+
probably don't have to worry about it, but it will help to
15+
automatically apply some formatting and style rules.
16+
17+
* Please make sure you have `pre-commit <https://pre-commit.com>`_
18+
installed, and in your local checkout of this repository run
19+
``pre-commit install`` to set up the pre-commit hooks.
20+
21+
The following two tools are *required* for working with this
22+
repository:
23+
24+
* `PDM <https://pdm-project.org/>`_
25+
26+
* `nox <https://nox.thea.codes/en/stable/>`_
27+
28+
You will also need at least one supported Python version. It is also
29+
recommended that you test against *all* the supported Python verisions
30+
before opening a pull request; you can use `PDM's Python installer
31+
<https://pdm-project.org/latest/usage/project/#install-python-interpreters-with-pdm>`_
32+
to install any versions of Python you need.
33+
34+
35+
Local setup
36+
-----------
37+
38+
Once you have the tools above installed, run the following in the root
39+
of your git checkout::
40+
41+
pdm install
42+
43+
This will create a local virtual environment and install
44+
``webcolors`` and its dependencies.
45+
46+
47+
Testing
48+
-------
49+
50+
To run the tests, use ``nox``::
51+
52+
nox --tags tests
53+
54+
By default this will run against as many supported Python versions as
55+
you have installed. To select a single specific Python version, you
56+
can run::
57+
58+
nox --tags tests --python "3.11"
59+
60+
You can also run the full CI suite locally by just invoking
61+
``nox``. This will run the tests, check the documentation, lint the
62+
code and check formatting, and build a package and perform checks on
63+
it.
64+
65+
For more information about available tasks, run ``nox --list`` or read
66+
the file ``noxfile.py`` in the root of your source checkout, or the
67+
testing documentation in the file ``docs/conformance.rst``.
68+
69+
70+
Code style
71+
----------
72+
73+
The pre-commit hooks will auto-format code with `isort
74+
<https://pycqa.github.io/isort/>`_ and `Black
75+
<https://black.readthedocs.io/>`_. Many editors and IDEs also support
76+
auto-formatting with these tools every time you save a file. The CI
77+
suite will disallow any code that does not follow the isort/Black
78+
format.
79+
80+
All code must also be compatible with all supported versions of
81+
Python.
82+
83+
84+
Other guidelines
85+
----------------
86+
87+
* If you need to add a new file of code, please make sure to put a
88+
license identifier comment near the top of the file. You can copy
89+
and paste the license identifier comment from any existing file,
90+
where it looks like this:
91+
``# SPDX-License-Identifier: BSD-3-Clause``
92+
93+
* Documentation and tests are not just recommended -- they're
94+
required. Any new file, class, method or function must have a
95+
docstring and must either include that docstring (via autodoc) in
96+
the built documentation, or must have manually-written documentation
97+
in the ``docs/`` directory. Any new feature or bugfix must have
98+
sufficient tests to prove that it works, and the test coverage
99+
report must come out at 100%. The CI suite will fail if test
100+
coverage is below 100%, if there's any code which doesn't have a
101+
docstring, or if there are any misspelled words in the documentation
102+
(and if there's a word the spell-checker should learn to recognize,
103+
add it to ``docs/spelling_wordlist.txt``).

MANIFEST.in

-13
This file was deleted.

docs/changelog.rst

+8-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ The API stability/deprecation policy for this library is as follows:
5656
Releases under CalVer
5757
---------------------
5858

59+
Version 24.11.0
60+
~~~~~~~~~~~~~~~
61+
62+
*Under development*
63+
64+
* Supported Python versions are now 3.9, 3.10, 3.11, 3.12, and 3.13.
65+
5966
Version 24.8.0
6067
~~~~~~~~~~~~~~
6168

@@ -72,7 +79,7 @@ Version 24.6.0
7279

7380
Released June 2024
7481

75-
* Supported Python versions are now 3.8, 3.9, 3.10, and 3.11.
82+
* Supported Python versions are now 3.8, 3.9, 3.10, and 3.12.
7683

7784
* Running the unit tests no longer uses a third-party test runner; the
7885
standard-library ``unittest`` module's runner is used instead.

docs/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
"sphinx_inline_tabs",
2121
]
2222
templates_path = ["_templates"]
23-
source_suffix = ".rst"
23+
source_suffix = {".rst": "restructuredtext"}
2424
master_doc = "index"
2525
project = "webcolors"
26-
copyright = "James Bennett, and contributors"
26+
copyright = "James Bennett and contributors"
2727
version = get_version("webcolors")
2828
release = version
2929
exclude_trees = ["_build"]

docs/conformance.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ To run the normal test suite:
161161
py -m nox
162162
163163
This will attempt to test against each supported version of Python (for
164-
``webcolors`` |release|, this is 3.8, 3.9, 3.10, 3.11, and 3.12), skipping any
164+
``webcolors`` |release|, this is 3.9, 3.10, 3.11, 3.12, and 3.12), skipping any
165165
which are missing on your machine. To test only against a specific version of
166166
Python, use the ``--python`` flag and pass the version to test. For example, to
167167
test on Python 3.10:

docs/faq.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ General
1313
What versions of Python are supported?
1414
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1515

16-
Version |release| of ``webcolors`` supports and is tested on Python 3.8, 3.9,
17-
3.10, 3.11, and 3.12.
16+
Version |release| of ``webcolors`` supports and is tested on Python 3.9,
17+
3.10, 3.11, 3.12, and 3.13.
1818

1919

2020
How am I allowed to use this module?

docs/install.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ Installation guide
77
Version |release| of ``webcolors`` is officially tested and supported on the
88
following versions of Python:
99

10-
* Python 3.8
11-
1210
* Python 3.9
1311

1412
* Python 3.10
@@ -17,6 +15,8 @@ following versions of Python:
1715

1816
* Python 3.12
1917

18+
* Python 3.13
19+
2020

2121
Installing ``webcolors``
2222
------------------------

docs/requirements.txt

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These dependencies are not "extras" defined in the pyproject.toml,
2+
# because they're not something you actually want to install alongside
3+
# the main package. They're also not "dev dependencies" in the PDM
4+
# sense of the term, because PDM would constrain them to the oldest
5+
# Python version the main package supports (3.9), while all our
6+
# documentation jobs, whether run via nox or via readthedocs, run on
7+
# Python 3.12.
8+
furo
9+
sphinx
10+
sphinx-copybutton
11+
sphinx-inline-tabs
12+
sphinx-notfound-page
13+
sphinxext-opengraph

0 commit comments

Comments
 (0)