Skip to content

Commit

Permalink
Deprecate Python 3.8
Browse files Browse the repository at this point in the history
Python 3.8 is nearing EOL, and it's being deprecated here to allow for
more ready dependency resolution between pandas and numpy, avoiding a
fatal import. Resolves sherlock-project#2266.
  • Loading branch information
ppfeister committed Aug 23, 2024
1 parent 47ab466 commit c6c1f3e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
macos-latest,
]
python-version: [
'3.8',
'3.9',
'3.10',
'3.11',
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ repository = "https://github.com/sherlock-project/sherlock"
"Bug Tracker" = "https://github.com/sherlock-project/sherlock/issues"

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"
certifi = ">=2019.6.16"
colorama = "^0.4.1"
PySocks = "^1.7.0"
requests = "^2.22.0"
requests-futures = "^1.0.0"
stem = "^1.8.0"
torrequest = "^0.1.0"
# pandas can likely be bumped up to ^2.0.0 after fc39 EOL
pandas = ">=1.0.0,<3.0.0"
pandas = "^2.2.1"
openpyxl = "^3.0.10"

[tool.poetry.extras]
Expand Down
4 changes: 2 additions & 2 deletions sherlock_project/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# Check if the user is using the correct version of Python
python_version = sys.version.split()[0]

if sys.version_info < (3, 8):
print(f"Sherlock requires Python 3.8+\nYou are using Python {python_version}, which is not supported by Sherlock.")
if sys.version_info < (3, 9):
print(f"Sherlock requires Python 3.9+\nYou are using Python {python_version}, which is not supported by Sherlock.")
sys.exit(1)

from sherlock_project import sherlock
Expand Down
3 changes: 1 addition & 2 deletions tests/sherlock_interactives.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def run_cli(args:str = "") -> str:
raise InteractivesSubprocessError(e.output.decode())


# -> list[str] is prefered, but will require deprecation of support for Python 3.8
def walk_sherlock_for_files_with(pattern: str) -> list:
def walk_sherlock_for_files_with(pattern: str) -> list[str]:
"""Check all files within the Sherlock package for matching patterns"""
pattern:re.Pattern = re.compile(pattern)
matching_files:list[str] = []
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,3 @@ python =
3.11: py311
3.10: py310
3.9: py39
3.8: py38

0 comments on commit c6c1f3e

Please sign in to comment.