Skip to content

Commit 946c445

Browse files
authored
Merge branch 'main' into stdlib-importlib.metadata
2 parents 805b8a5 + e29791d commit 946c445

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

changelog/fix-repo-urls-with-auth-and-port.bugfix

-5
This file was deleted.

docs/changelog.rst

+15
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ schemes recommended by the Python Packaging Authority.
1212
1313
.. towncrier release notes start
1414
15+
Twine 5.1.1 (2024-06-26)
16+
------------------------
17+
18+
Bugfixes
19+
^^^^^^^^
20+
21+
- Resolve DeprecationWarnings when extracting ``twine`` metadata. (`#1115 <https://github.com/pypa/twine/issues/1115>`_)
22+
23+
- Fix bug for Repository URLs with auth where the port was lost. When attempting
24+
to prevent printing authentication credentials in URLs provided with username
25+
and password, we did not properly handle the case where the URL also contains
26+
a port (when reconstructing the URL). This is now handled and tested to
27+
ensure no regressions. (`#fix-repo-urls-with-auth-and-port <https://github.com/pypa/twine/issues/fix-repo-urls-with-auth-and-port>`_)
28+
29+
1530
Twine 5.1.0 (2024-05-15)
1631
------------------------
1732

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ dependencies = [
3939
"keyring >= 15.1",
4040
"rfc3986 >= 1.4.0",
4141
"rich >= 12.0.0",
42+
43+
# workaround for #1116
44+
"pkginfo < 1.11",
4245
]
4346
dynamic = ["version"]
4447

tox.ini

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ commands =
9595

9696
[testenv:changelog]
9797
basepython = python3
98-
skip_install = True
9998
deps =
10099
towncrier
101100
commands =

twine/__init__.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
__copyright__ = "Copyright 2019 Donald Stufft and individual contributors"
3232

33+
import email
3334
import sys
3435

3536
if sys.version_info >= (3, 10):
@@ -42,8 +43,11 @@
4243

4344
__title__ = metadata["name"]
4445
__summary__ = metadata["summary"]
45-
__uri__ = metadata["home-page"]
46+
__uri__ = next(
47+
entry.split(", ")[1]
48+
for entry in metadata.get_all("Project-URL", ())
49+
if entry.startswith("Homepage")
50+
)
4651
__version__ = metadata["version"]
47-
__author__ = metadata["author"]
48-
__email__ = metadata["author-email"]
52+
__author__, __email__ = email.utils.parseaddr(metadata["author-email"])
4953
__license__ = None

0 commit comments

Comments
 (0)