Skip to content

Commit

Permalink
Drop support for Python 3.6 (#869)
Browse files Browse the repository at this point in the history
* Drop support for Python 3.6

* Fix docs build

* Add changelog entry
  • Loading branch information
bhrutledge committed Mar 12, 2022
1 parent 55652f0 commit a0ba32d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/main.yml
Expand Up @@ -13,7 +13,7 @@ concurrency:
env:
FORCE_COLOR: "1"
TOX_TESTENV_PASSENV: "FORCE_COLOR"
MIN_PYTHON_VERSION: "3.6"
MIN_PYTHON_VERSION: "3.7"
DEFAULT_PYTHON_VERSION: "3.9"

jobs:
Expand All @@ -33,7 +33,6 @@ jobs:
strategy:
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Expand Up @@ -15,7 +15,7 @@ formats:

python:
# Mininum supported Python version
version: "3.6"
version: "3.7"
# Install twine first, because RTD uses `--upgrade-strategy eager`,
# which installs the latest version of docutils via readme_renderer.
# However, Sphinx 4.2.0 requires docutils>=0.14,<0.18.
Expand Down
1 change: 1 addition & 0 deletions changelog/869.feature.rst
@@ -0,0 +1 @@
Drop support for Python 3.6.
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -286,7 +286,7 @@

# TODO: Try to add these to intersphinx_mapping
nitpick_ignore_regex = [
(r"py:.*", r"(pkginfo|IO).*"),
(r"py:.*", r"pkginfo.*"),
]

# -- Options for apidoc output ------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Expand Up @@ -23,7 +23,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Expand All @@ -34,7 +33,7 @@ classifiers =
packages =
twine
twine.commands
python_requires = >=3.6
python_requires = >=3.7
install_requires=
pkginfo >= 1.8.1
readme-renderer >= 21.0
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,6 +1,6 @@
[tox]
minversion = 3.3
envlist = lint,types,py{36,37,38,39,310},integration,docs
envlist = lint,types,py{37,38,39,310},integration,docs
isolated_build = True

[testenv]
Expand Down
6 changes: 4 additions & 2 deletions twine/settings.py
Expand Up @@ -11,11 +11,13 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
from __future__ import annotations

# limitations under the License.
import argparse
import contextlib
import logging
from typing import Any, ContextManager, Optional, cast
from typing import Any, Optional, cast

from twine import auth
from twine import exceptions
Expand Down Expand Up @@ -136,7 +138,7 @@ def password(self) -> Optional[str]:
# Workaround for https://github.com/python/mypy/issues/5858
return cast(Optional[str], self.auth.password)

def _allow_noninteractive(self) -> ContextManager[None]:
def _allow_noninteractive(self) -> contextlib.AbstractContextManager[None]:
"""Bypass NonInteractive error when client cert is present."""
suppressed = (exceptions.NonInteractive,) if self.client_cert else ()
return contextlib.suppress(*suppressed)
Expand Down

0 comments on commit a0ba32d

Please sign in to comment.