Commit f213ede
authored
fix: Retrieve metadata correctly from importlib_metadata (#1115)
* fixes #977: Retrieve metadata correctly from importlib_metadata
Running twine with `PYTHONWARNINGS=error`, DeprecationWarnings about
missing keys indicate that `twine.__uri__` is being set to `None`.
`author` is also missing from package metadata.
This change iterates over Project-URLs looking for "Homepage",
and parses the author and email from Author-Email.
The email stdlib module is used for correctness; it is already
imported by importlib_metadata, so this does not add to import time.1 parent 6fbf880 commit f213ede
2 files changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | | - | |
43 | | - | |
| 48 | + | |
44 | 49 | | |
0 commit comments