Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove py3.9 #4718

Merged
merged 8 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/4718.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Removed the support for python 3.9, and upgraded the *mitmproxy* dependency version.
type: breaking
pr_number: 4718
6 changes: 3 additions & 3 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .sourcery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ rule_settings:
- refactoring
- suggestion
- comment
python_version: '3.9'
python_version: '3.10'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Demisto SDK is a Python library designed to aid the development process, bot

Requirements:

- Python 3.9, 3.10 or 3.11.
- Python 3.10, 3.11 or 3.12.
- git installed.
- A linux, mac or WSL2 machine.

Expand Down
7 changes: 0 additions & 7 deletions demisto_sdk/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,6 @@ def main(
sdk.configuration = Configuration() # Initialize the configuration
ctx.obj = sdk # Pass sdk instance to context
load_dotenv(CONTENT_PATH / ".env", override=True)
if platform.python_version_tuple()[:2] == ("3", "9"):
message = typer.style(
"Warning: Demisto-SDK will soon stop supporting Python 3.9. Please update your python environment.",
fg=typer.colors.RED,
)
typer.echo(message)

if platform.system() == "Windows":
typer.echo(
"Warning: Using Demisto-SDK on Windows is not supported. Use WSL2 or run in a container."
Expand Down
2 changes: 1 addition & 1 deletion demisto_sdk/commands/format/update_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run_format(self) -> int:
logger.exception(
"".join(
traceback.format_exception(
etype=type(err), value=err, tb=err.__traceback__
type(err), value=err, tb=err.__traceback__
)
)
)
Expand Down
4 changes: 3 additions & 1 deletion demisto_sdk/commands/test_content/timestamp_replacer.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def clean_multipart_form(self, req: Request) -> None:
updated_multipart_form_data = []
for key, val in req.multipart_form.items(multi=True):
if key in self.form_keys:
updated_multipart_form_data.append((key, self.constant))
updated_multipart_form_data.append(
(key, self.constant.encode("utf-8"))
)
else:
updated_multipart_form_data.append((key, val))
req._set_multipart_form(updated_multipart_form_data)
Expand Down
1,982 changes: 1,110 additions & 872 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.mypy]
check_untyped_defs = true
ignore_missing_imports = true
python_version = "3.9"
python_version = "3.10"
show_error_codes = true
follow_imports = "silent"
pretty = true
Expand All @@ -23,7 +23,6 @@ classifiers = [
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
Expand All @@ -39,7 +38,7 @@ exclude = [
]

[tool.poetry.dependencies]
python = ">=3.9,<3.13"
python = ">=3.10,<3.13"
autopep8 = "^2.0.4"
bandit = "^1.7.4"
mypy = "^0.982"
Expand Down Expand Up @@ -102,7 +101,6 @@ pre-commit = "^3.5.0"
lxml = "^5.0.0"
uv = "^0.1.5"
toml = "^0.10.2"
werkzeug = "^2.2.0" # Added as mitmproxy8 -> flask<2.1
loguru = "^0.7.2"
pygithub = "^2.2.0"
setuptools = "^75.5.0"
Expand All @@ -112,7 +110,7 @@ build = ["gsutil"]
generate-unit-tests = ["klara"]

[tool.poetry.group.dev.dependencies]
mitmproxy = "^8.0.0" # if installing zstandard fails, make sure you have python3.x-dev installed.
mitmproxy = "^10.0.0" # if installing zstandard fails, make sure you have python3.x-dev installed.
mock = "^4.0.3"
pytest = "^7.1.1"
pytest-cov = "^4.0.0"
Expand Down Expand Up @@ -158,7 +156,7 @@ exclude = [
"demisto_sdk/commands/init/templates",
"demisto_sdk/commands/generate_yml_from_python/tests/generate_yml_from_python_test.py"
]
target-version = "py39"
target-version = "py310"

[tool.ruff.lint]
ignore = [
Expand Down
Loading