Skip to content

Commit

Permalink
Drop py36 support (#672)
Browse files Browse the repository at this point in the history
* Drop py36 support

* Update contributing doc to remove instance of py36

* Remove custom logic for py36.0
  • Loading branch information
jpdakran committed Mar 28, 2023
1 parent 7d569e0 commit f43ca9f
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ['3.6', '3.7', '3.8', '3.9']
python: ['3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.6', '3.7', '3.8', '3.9']
python: ['3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ sys 0m2.486s

### Running the Entire Test Suite

You can run the test suite in the interpreter of your choice (in this example, `py36`) by doing:
You can run the test suite in the interpreter of your choice (in this example, `py37`) by doing:

```bash
tox -e py36
tox -e py37
```

This will also run the code through our series of coverage tests, `mypy` rules and other linting
Expand Down
19 changes: 0 additions & 19 deletions detect_secrets/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,6 @@
from .exceptions import SecretNotFoundOnSpecifiedLineError
from .util.code_snippet import CodeSnippet

try:
from typing import NoReturn # noqa: F811
except ImportError: # pragma: no cover
# NOTE: NoReturn was introduced in Python3.6.2. However, we need to support Python3.6.0.
# This section of code is inline imported from `typing-extensions`, so that we don't need
# to introduce an additional package for such an edge case.
from typing import _FinalTypingBase # type: ignore

class _NoReturn(_FinalTypingBase):
__slots__ = ()

def __instancecheck__(self, obj: Any) -> None:
raise TypeError('NoReturn cannot be used with isinstance().')

def __subclasscheck__(self, cls: Any) -> None:
raise TypeError('NoReturn cannot be used with issubclass().')

NoReturn = _NoReturn(_root=True)


class SelfAwareCallable:
"""
Expand Down
4 changes: 1 addition & 3 deletions requirements-dev-minimal.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# coveragepy==5.0 fails with `Safety level may not be changed inside a transaction
# on python 3.6.0 (xenial)
coverage<5
coverage
flake8==3.5.0
gibberish-detector>=0.1.1
monotonic
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[tox]
project = detect_secrets
# These should match the ci python env list
envlist = py{36,37,38,39},mypy
envlist = py{37,38,39},mypy
skip_missing_interpreters = true
tox_pip_extensions_ext_venv_update = true

[testenv]
passenv = SSH_AUTH_SOCK
# NO_PROXY is needed to call requests API within a forked process
# when using macOS and python version 3.6/3.7
# when using macOS and python version 3.7
setenv =
NO_PROXY = '*'
deps = -rrequirements-dev.txt
Expand Down

0 comments on commit f43ca9f

Please sign in to comment.