Skip to content

Commit e6f45da

Browse files
authored
Merge pull request #1029 from woodruffw-forks/ww/fix-mypy
settings: remove old mypy workarounds
2 parents 96674db + 514f01c commit e6f45da

File tree

5 files changed

+18
-11
lines changed

5 files changed

+18
-11
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ concurrency:
1515
env:
1616
FORCE_COLOR: "1"
1717
TOX_TESTENV_PASSENV: "FORCE_COLOR"
18-
MIN_PYTHON_VERSION: "3.7"
19-
DEFAULT_PYTHON_VERSION: "3.9"
18+
MIN_PYTHON_VERSION: "3.8"
19+
DEFAULT_PYTHON_VERSION: "3.10"
2020

2121
permissions:
2222
contents: read
@@ -38,10 +38,11 @@ jobs:
3838
strategy:
3939
matrix:
4040
python-version:
41-
- "3.7"
4241
- "3.8"
4342
- "3.9"
4443
- "3.10"
44+
- "3.11"
45+
- "3.12"
4546
platform:
4647
- ubuntu-latest
4748
- macos-latest

docs/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
doc8>=0.8.0
22
furo>=2021.10.09
33
readme-renderer>=17.4
4-
Sphinx>=4.3.1
4+
# Remove this upper bound when twine's minimum Python is 3.9+.
5+
# See: https://github.com/sphinx-doc/sphinx/issues/11767
6+
Sphinx>=6,<7.1
57
sphinxcontrib-programoutput>=0.17

setup.cfg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ classifiers =
2727
Programming Language :: Python :: 3.8
2828
Programming Language :: Python :: 3.9
2929
Programming Language :: Python :: 3.10
30+
Programming Language :: Python :: 3.11
31+
Programming Language :: Python :: 3.12
3032
Programming Language :: Python :: Implementation :: CPython
3133

3234
[options]
3335
packages =
3436
twine
3537
twine.commands
36-
python_requires = >=3.7
38+
python_requires = >=3.8
3739
install_requires=
3840
pkginfo >= 1.8.1
3941
readme-renderer >= 35.0

tox.ini

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
2-
minversion = 3.3
3-
envlist = lint,types,py{37,38,39,310},integration,docs
2+
minversion = 3.8
3+
envlist = lint,types,py{38,39,310,311,312},integration,docs
44
isolated_build = True
55

66
[testenv]
@@ -10,6 +10,10 @@ deps =
1010
pytest-socket
1111
build
1212
coverage
13+
# Needed on 3.12 and newer due to setuptools not being pre-installed
14+
# in fresh venvs.
15+
# See: https://github.com/python/cpython/issues/95299
16+
setuptools
1317
passenv =
1418
PYTEST_ADDOPTS
1519
commands =

twine/settings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,12 @@ def __init__(
127127

128128
@property
129129
def username(self) -> Optional[str]:
130-
# Workaround for https://github.com/python/mypy/issues/5858
131-
return cast(Optional[str], self.auth.username)
130+
return self.auth.username
132131

133132
@property
134133
def password(self) -> Optional[str]:
135134
with self._allow_noninteractive():
136-
# Workaround for https://github.com/python/mypy/issues/5858
137-
return cast(Optional[str], self.auth.password)
135+
return self.auth.password
138136

139137
def _allow_noninteractive(self) -> "contextlib.AbstractContextManager[None]":
140138
"""Bypass NonInteractive error when client cert is present."""

0 commit comments

Comments
 (0)