Skip to content

Commit 94f810c

Browse files
authored
Merge pull request #1047 from pypa/new-release
New release
2 parents fe1885f + 09d993a commit 94f810c

14 files changed

+112
-9
lines changed

.github/workflows/release.yml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
name: "Build dists"
14+
runs-on: "ubuntu-latest"
15+
environment:
16+
name: "publish"
17+
outputs:
18+
hashes: ${{ steps.hash.outputs.hashes }}
19+
20+
steps:
21+
- name: "Checkout repository"
22+
uses: "actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3"
23+
24+
- name: "Setup Python"
25+
uses: "actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b"
26+
with:
27+
python-version: "3.x"
28+
29+
- name: "Install dependencies"
30+
run: python -m pip install build
31+
32+
- name: "Build dists"
33+
run: |
34+
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \
35+
python -m build
36+
37+
- name: "Generate hashes"
38+
id: hash
39+
run: |
40+
cd dist && echo "::set-output name=hashes::$(sha256sum * | base64 -w0)"
41+
42+
- name: "Upload dists"
43+
uses: "actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce"
44+
with:
45+
name: "dist"
46+
path: "dist/"
47+
if-no-files-found: error
48+
retention-days: 5
49+
50+
provenance:
51+
needs: [build]
52+
permissions:
53+
actions: read
54+
contents: write
55+
id-token: write # Needed to access the workflow's OIDC identity.
56+
uses: "slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0"
57+
with:
58+
base64-subjects: "${{ needs.build.outputs.hashes }}"
59+
upload-assets: true
60+
compile-generator: true # Workaround for https://github.com/slsa-framework/slsa-github-generator/issues/1163
61+
62+
publish:
63+
name: "Publish to PyPI"
64+
if: startsWith(github.ref, 'refs/tags/')
65+
needs: ["build", "provenance"]
66+
permissions:
67+
contents: write
68+
id-token: write
69+
runs-on: "ubuntu-latest"
70+
71+
steps:
72+
- name: "Download dists"
73+
uses: "actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a"
74+
with:
75+
name: "dist"
76+
path: "dist/"
77+
78+
- name: "Publish dists to PyPI"
79+
uses: "pypa/gh-action-pypi-publish@48b317d84d5f59668bb13be49d1697e36b3ad009"

changelog/931.misc.rst

-1
This file was deleted.

changelog/991.misc.rst

-1
This file was deleted.

docs/changelog.rst

+17-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Changelog
33
=========
44

5-
This project follows the `semantic versioning <https://packaging.python.org/guides/distributing-packages-using-setuptools/#semantic-versioning-preferred>`_
6-
and `pre-release versioning <https://packaging.python.org/guides/distributing-packages-using-setuptools/#pre-release-versioning>`_
5+
This project follows the `semantic versioning <https://packaging.python.org/en/latest/discussions/versioning/#semantic-versioning-vs-calendar-versioning>`_
6+
and `pre-release versioning <https://packaging.python.org/en/latest/discussions/versioning/>`_
77
schemes recommended by the Python Packaging Authority.
88

99
.. Do *NOT* add changelog entries here!
@@ -12,6 +12,21 @@ schemes recommended by the Python Packaging Authority.
1212
1313
.. towncrier release notes start
1414
15+
Twine 5.0.0 (2024-02-10)
16+
------------------------
17+
18+
Bugfixes
19+
^^^^^^^^
20+
21+
- Use ``email.message`` instead of ``cgi`` as ``cgi`` has been deprecated (`#969 <https://github.com/pypa/twine/issues/969>`_)
22+
23+
24+
Misc
25+
^^^^
26+
27+
- `#931 <https://github.com/pypa/twine/issues/931>`_, `#991 <https://github.com/pypa/twine/issues/991>`_, `#1028 <https://github.com/pypa/twine/issues/1028>`_, `#1040 <https://github.com/pypa/twine/issues/1040>`_
28+
29+
1530
Twine 4.0.2 (2022-11-30)
1631
------------------------
1732

docs/conf.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -265,15 +265,19 @@
265265
# How to display URL addresses: 'footnote', 'no', or 'inline'.
266266
# texinfo_show_urls = 'footnote'
267267

268+
# See https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-linkcheck_ignore
268269
linkcheck_ignore = [
269-
"http://127.0.0.1*",
270+
r"https?://127\.0\.0\.1.*",
270271
# Avoid errors due to GitHub rate limit
271272
# https://github.com/sphinx-doc/sphinx/issues/7388
272-
"https://github.com/pypa/twine/issues/*",
273+
r"https://github\.com/pypa/twine/issues/.*",
273274
# Avoid errors from channels interpreted as anchors
274-
"https://web.libera.chat/#",
275+
r"https://web\.libera\.chat/#",
275276
# Avoid error from InvalidPyPIUploadURL docstring
276-
"https://upload.pypi.org/legacy",
277+
r"https://upload\.pypi\.org/legacy/?",
278+
# Avoid errors from 403/Login Redirects
279+
r"https://(test\.)?pypi\.org/manage/project/twine/collaboration/?",
280+
r"https://pypi\.org/manage/project/twine/collaboration/?",
277281
]
278282

279283
intersphinx_mapping = {

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ classifiers =
2323
Programming Language :: Python
2424
Programming Language :: Python :: 3
2525
Programming Language :: Python :: 3 :: Only
26-
Programming Language :: Python :: 3.7
2726
Programming Language :: Python :: 3.8
2827
Programming Language :: Python :: 3.9
2928
Programming Language :: Python :: 3.10

tests/test_settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for the Settings class and module."""
2+
23
# Copyright 2018 Ian Stapleton Cordasco
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");

twine/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
The contents of this package are not a public API. For more details, see
44
https://github.com/pypa/twine/issues/194 and https://github.com/pypa/twine/issues/665.
55
"""
6+
67
# Copyright 2018 Donald Stufft and individual contributors
78
#
89
# Licensed under the Apache License, Version 2.0 (the "License");

twine/commands/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
The contents of this package are not a public API. For more details, see
44
https://github.com/pypa/twine/issues/194 and https://github.com/pypa/twine/issues/665.
55
"""
6+
67
# Copyright 2013 Donald Stufft
78
#
89
# Licensed under the Apache License, Version 2.0 (the "License");

twine/commands/check.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the logic for ``twine check``."""
2+
23
# Copyright 2018 Dustin Ingram
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");

twine/commands/register.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the logic for ``twine register``."""
2+
23
# Copyright 2015 Ian Cordasco
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");

twine/commands/upload.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing the logic for ``twine upload``."""
2+
23
# Copyright 2013 Donald Stufft
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");

twine/exceptions.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing exceptions raised by twine."""
2+
23
# Copyright 2015 Ian Stapleton Cordasco
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");

twine/settings.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Module containing logic for handling settings."""
2+
23
# Copyright 2018 Ian Stapleton Cordasco
34
#
45
# Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)