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

Support Python 3.11 #2801

Merged
merged 155 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
d3e3d52
python311
Feb 26, 2023
c3453dc
added CI to python 3.11
Feb 26, 2023
ff9b047
add CI
Feb 26, 2023
8a4bc29
check pylint version
Feb 26, 2023
e57a3ce
check 2.13
Feb 26, 2023
67b6bdc
str
Feb 26, 2023
19fe472
marketplace str
Feb 26, 2023
b34e2c1
try with OR
Feb 26, 2023
13a82cd
OR
Feb 26, 2023
f00a94c
fix
Feb 26, 2023
64a561e
test
Feb 26, 2023
a614e65
try to lock gitpython
Feb 28, 2023
8220abc
trigger build
Feb 28, 2023
625b099
Fix
Mar 1, 2023
4297f68
3.11 support
Mar 1, 2023
cfdde8e
test
Mar 1, 2023
3baf2eb
no update
Mar 1, 2023
699d476
lock
Mar 1, 2023
9c1db32
Merge remote-tracking branch 'origin/master' into support-python-311
Mar 5, 2023
2403ce6
fix
Mar 5, 2023
e5392d1
SLACK
Mar 5, 2023
799cb52
ignore dup files
Mar 5, 2023
9d842f7
fix path
Mar 5, 2023
497ac9c
fix
May 10, 2023
3b1a2a7
fix
May 10, 2023
e5aa79f
Merge branch 'master' of github.com:demisto/demisto-sdk into support-…
dorschw Jul 25, 2023
856e2e0
undo autouse
dorschw Jul 25, 2023
9d723d4
changelog
dorschw Jul 25, 2023
9702c1d
Merge branch 'master' of github.com:demisto/demisto-sdk into support-…
dorschw Sep 20, 2023
61b59f9
type:ignore in progressbar
dorschw Sep 20, 2023
785b44d
no pre commit
Sep 20, 2023
a48e862
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 4, 2024
56a69da
update matrix
dorschw Mar 4, 2024
95d5c36
helpful comment
dorschw Mar 4, 2024
a8d8630
undo changelog
dorschw Mar 4, 2024
b4f7726
add test `id`s
dorschw Mar 4, 2024
4c32b5a
improve test ids
dorschw Mar 4, 2024
6632d65
xfail
dorschw Mar 4, 2024
1b25816
Merge branch 'master' into support-python-311
dorschw Mar 10, 2024
95a0b25
Merge branch 'master' into support-python-311
dorschw Mar 10, 2024
c57fe4b
modify UTs
dorschw Mar 10, 2024
04968f3
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 10, 2024
3e941cd
fix UTs
dorschw Mar 10, 2024
86ee9f0
changelog
dorschw Mar 10, 2024
315a7af
fix UTs
dorschw Mar 11, 2024
7302d96
fix more UTs
dorschw Mar 12, 2024
184b2c6
format
dorschw Mar 12, 2024
3fcbbb8
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 12, 2024
d13ab40
fix more checker UTs
dorschw Mar 12, 2024
13e6b53
bump autopep8 dependency to fix UT failure
dorschw Mar 12, 2024
49530ef
StrEnum
dorschw Mar 12, 2024
7678f02
pre-commit hook rev
dorschw Mar 12, 2024
612e46c
fix `BA110` UT
dorschw Mar 12, 2024
b3c2d22
fix `BA110` UT
dorschw Mar 12, 2024
97f3a37
strenum
dorschw Mar 13, 2024
35b634f
update dependencies
dorschw Mar 14, 2024
30a233b
fix mypy
dorschw Mar 14, 2024
8e2e50a
fix mypy
dorschw Mar 14, 2024
2993725
fix pre-commit mypy
dorschw Mar 14, 2024
98728c0
update CI env py
dorschw Mar 14, 2024
52fedb1
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 14, 2024
ed43762
poetry fix, pre-commit
dorschw Mar 14, 2024
3693bf3
Update .pre-commit-config.yaml
ilaner Mar 14, 2024
3ad7e94
remove mypy temp
Mar 14, 2024
9ae1e47
remove mypy temp2
Mar 14, 2024
823a761
try fix content init
dorschw Mar 14, 2024
5c2c9a3
fix import
dorschw Mar 14, 2024
80e43da
fix import
dorschw Mar 14, 2024
6a479d9
init
dorschw Mar 14, 2024
8dc7842
more StrEnum fixes, less diff
dorschw Mar 14, 2024
965ac90
update pytest to 2.17 for official 3.11 support
dorschw Mar 14, 2024
41ed8d4
mypy is back
dorschw Mar 14, 2024
b1336d5
flake8 version
dorschw Mar 14, 2024
3e76161
name
dorschw Mar 14, 2024
47e473b
test pre-commit
dorschw Mar 17, 2024
b6e6307
use potery
dorschw Mar 17, 2024
b2a5f62
run natively
dorschw Mar 17, 2024
1cde795
poetry lock
dorschw Mar 17, 2024
678767c
bring back `pre-commit/action`
dorschw Mar 17, 2024
777f3b2
Merge branch 'master' into support-python-311
dorschw Mar 17, 2024
26a1806
change pre-commit ci setup
dorschw Mar 17, 2024
490dbcd
Merge branch 'support-python-311' of https://github.com/demisto/demis…
dorschw Mar 17, 2024
130eb78
remove file
dorschw Mar 17, 2024
e17efe6
test rev
dorschw Mar 17, 2024
119b87f
change depth
dorschw Mar 17, 2024
eb95367
fix ref
dorschw Mar 17, 2024
a07e0fe
fix depth
dorschw Mar 17, 2024
be55970
fetch more content
dorschw Mar 17, 2024
f3c1b13
fix typing issue
dorschw Mar 17, 2024
a093dff
fix syntax
dorschw Mar 17, 2024
9f8a829
remove pre-commit all
dorschw Mar 17, 2024
80a1008
update urllib3
dorschw Mar 18, 2024
56ef85c
types-setuptools
dorschw Mar 18, 2024
dcd8bea
types-pytz
dorschw Mar 18, 2024
e6aa956
types-requests
dorschw Mar 18, 2024
7df9640
Merge branch 'ds-update-deps-311' of https://github.com/demisto/demis…
dorschw Mar 18, 2024
8247a66
remove most `types-` deps
dorschw Mar 18, 2024
6bb417c
lock & update dependencies
dorschw Mar 19, 2024
9acd10c
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 19, 2024
841ad16
undo unintended change from master
dorschw Mar 19, 2024
918bdb0
update `types-setuptools`
dorschw Mar 19, 2024
c93dfac
update packaging
dorschw Mar 19, 2024
67af8ba
update deps
dorschw Mar 19, 2024
2b0cf4f
fixes
dorschw Mar 20, 2024
66a6be1
update docker version
dorschw Mar 21, 2024
3608d28
add some `types-` back
dorschw Mar 21, 2024
d157a07
add some `types-` back
dorschw Mar 21, 2024
bfd8585
format
dorschw Mar 21, 2024
002a2e8
ruff
dorschw Mar 21, 2024
9f6131b
mypy fixes
dorschw Mar 21, 2024
c5c71b9
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 21, 2024
f92b7fb
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Mar 27, 2024
0d7fc61
Merge branch 'master' into support-python-311
dorschw Apr 4, 2024
b38c15d
poetry lock with docker 6
dorschw Apr 4, 2024
93214d9
add toml
dorschw Apr 4, 2024
248088a
lock werkzeug
dorschw Apr 4, 2024
986010c
fix mypy
dorschw Apr 4, 2024
d8b3460
bump CI to 3.11
dorschw Apr 4, 2024
f4139ed
retrigger
dorschw Apr 4, 2024
2ae0b4d
black
dorschw Apr 4, 2024
3cd5940
fix black
dorschw Apr 4, 2024
72c25f1
downgrade pre-commit CI to 3.10
dorschw Apr 4, 2024
33bee15
downgrade coverage to work
Apr 4, 2024
817d959
add mock address
Apr 4, 2024
59c4afa
add mocks to test
Apr 4, 2024
0b44309
add docker image flag
Apr 11, 2024
564ea23
add docker image and docker flag
Apr 15, 2024
a4aa68b
comment
Apr 15, 2024
b395a47
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Apr 15, 2024
fc2fc6a
fixes
Apr 15, 2024
4cc24ed
fix
Apr 15, 2024
1c9f1cf
refactor names
Apr 15, 2024
90ef385
RN
Apr 15, 2024
f6919bd
lower integration batch
Apr 15, 2024
e513acb
tiny fixes
dorschw Apr 15, 2024
6ae4644
fix
Apr 15, 2024
264c5f9
if obj
Apr 15, 2024
5f3a5d0
tiny fixes
dorschw Apr 15, 2024
4fe1b22
Merge remote-tracking branch 'origin/docker_image_flag_to_precommit' …
dorschw Apr 15, 2024
7f4c36b
Merge remote-tracking branch 'origin/master' into docker_image_flag_t…
Apr 15, 2024
a25b73c
docstrings
Apr 15, 2024
109464d
Merge remote-tracking branch 'origin/docker_image_flag_to_precommit' …
dorschw Apr 15, 2024
a6a4041
fix test
Apr 15, 2024
bf7f93f
Merge remote-tracking branch 'origin/docker_image_flag_to_precommit' …
dorschw Apr 15, 2024
72e74e4
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Apr 16, 2024
d660eff
CR changes
dorschw Apr 16, 2024
1f04905
Delete .changelog/4223.yml
dorschw Apr 16, 2024
3b0255d
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Apr 24, 2024
6e8d7e6
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw Apr 30, 2024
abd20d9
fix UT
dorschw Apr 30, 2024
94c0951
Merge branch 'master' into support-python-311
dorschw Apr 30, 2024
57e38c2
Merge branch 'master' of https://github.com/demisto/demisto-sdk into …
dorschw May 6, 2024
0f6e2fd
poetry lock
dorschw May 6, 2024
5277aa6
use content/master as ref
dorschw May 7, 2024
02f0726
Merge branch 'master' into support-python-311
dorschw May 7, 2024
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/2801.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Added support for Python 3.11
type: feature
pr_number: 2801
41 changes: 22 additions & 19 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Python ${{ matrix.python-version }} - Setup Environment
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Validate Changelog
env:
Expand Down Expand Up @@ -53,23 +53,26 @@ jobs:
- name: Setup Python Environment
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Run Pre Commit
uses: pre-commit/[email protected]
- name: Cache pre-commit
uses: actions/cache@v4
with:
extra_args: --all-files
path: ~/.cache/pre-commit
key: pre-commit-3|3.11|${{ hashFiles('.pre-commit-config.yaml') }}|${{ hashFiles('.poetry.lock') }}

- name: Run pre-commit
run: poetry run pre-commit run --show-diff-on-failure --color=always --all-files

- name: Run Pytest collection
run: |
poetry run pytest --collect-only .
run: poetry run pytest --collect-only .

unit-tests:
name: Unit Tests / Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -114,7 +117,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -153,7 +156,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
fail-fast: false
defaults:
run:
Expand Down Expand Up @@ -193,10 +196,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: Run coverage
Expand Down Expand Up @@ -240,7 +243,7 @@ jobs:
- name: Python ${{ matrix.python-version }} - Setup Environment
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"
working-dir: content
poetry-install-arguments: "--with ci"

Expand Down Expand Up @@ -362,7 +365,7 @@ jobs:
if: steps.files-changed.outputs.any_changed == 'true'
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Validate content master paths
if: steps.files-changed.outputs.any_changed == 'true'
Expand All @@ -381,7 +384,7 @@ jobs:
- name: Setup Python Environment
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Checkout content
uses: actions/checkout@v4
Expand Down Expand Up @@ -458,7 +461,7 @@ jobs:
- name: Setup Python Environment
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Checkout content
uses: actions/checkout@v4
Expand Down Expand Up @@ -515,7 +518,7 @@ jobs:
- name: Setup Python Environment
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -545,7 +548,7 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
uses: ./.github/actions/setup_environment
with:
python-version: "3.10"
python-version: "3.11"

- name: Generate Docs
if: steps.changed-files.outputs.any_changed == 'true'
Expand Down Expand Up @@ -574,7 +577,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.11"
cache: 'pip'

- name: pip intsall current project
Expand Down
168 changes: 1 addition & 167 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,173 +19,7 @@ repos:
hooks:
- id: mypy
exclude: tests/.*|demisto_sdk/commands/init/templates/.*
additional_dependencies:
- astroid==2.9.3 ; python_version >= "3.8" and python_version < "3.11"
- attrs==23.1.0 ; python_version >= "3.8" and python_version < "3.11"
- autopep8==1.7.0 ; python_version >= "3.8" and python_version < "3.11"
- backports-zoneinfo==0.2.1 ; python_version >= "3.8" and python_version < "3.9"
- bandit==1.7.5 ; python_version >= "3.8" and python_version < "3.11"
- bcrypt==4.0.1 ; python_version >= "3.8" and python_version < "3.11"
- beautifulsoup4==4.12.2 ; python_version >= "3.8" and python_version < "3.11"
- bracex==2.3.post1 ; python_version >= "3.8" and python_version < "3.11"
- cachetools==5.3.0 ; python_version >= "3.8" and python_version < "3.11"
- certifi==2023.7.22 ; python_version >= "3.8" and python_version < "3.11"
- cffi==1.15.1 ; python_version >= "3.8" and python_version < "3.11"
- cfgv==3.3.1 ; python_version >= "3.8" and python_version < "3.11"
- chardet==5.1.0 ; python_version >= "3.8" and python_version < "3.11"
- charset-normalizer==3.1.0 ; python_version >= "3.8" and python_version < "3.11"
- click==8.1.3 ; python_version >= "3.8" and python_version < "3.11"
- colorama==0.4.6 ; python_version >= "3.8" and python_version < "3.11"
- coloredlogs==15.0.1 ; python_version >= "3.8" and python_version < "3.11"
- commonmark==0.9.1 ; python_version >= "3.8" and python_version < "3.11"
- configparser==5.3.0 ; python_version >= "3.8" and python_version < "3.11"
- coverage==7.2.5 ; python_version >= "3.8" and python_version < "3.11"
- cryptography==36.0.2 ; python_version >= "3.8" and python_version < "3.11"
- dateparser==1.1.8 ; python_version >= "3.8" and python_version < "3.11"
- decorator==5.1.1 ; python_version >= "3.8" and python_version < "3.11"
- demisto-py==3.2.10 ; python_version >= "3.8" and python_version < "3.11"
- dictdiffer==0.9.0 ; python_version >= "3.8" and python_version < "3.11"
- dictor==0.1.11 ; python_version >= "3.8" and python_version < "3.11"
- distlib==0.3.6 ; python_version >= "3.8" and python_version < "3.11"
- docker==5.0.3 ; python_version >= "3.8" and python_version < "3.11"
- docopt==0.6.2 ; python_version >= "3.8" and python_version < "3.11"
- exceptiongroup==1.1.1 ; python_version >= "3.8" and python_version < "3.11"
- filelock==3.12.0 ; python_version >= "3.8" and python_version < "3.11"
- flatten-dict==0.4.2 ; python_version >= "3.8" and python_version < "3.11"
- freezegun==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
- future==0.18.3 ; python_version >= "3.8" and python_version < "3.11"
- gitdb==4.0.10 ; python_version >= "3.8" and python_version < "3.11"
- gitpython==3.1.41 ; python_version >= "3.8" and python_version < "3.11"
- giturlparse==0.10.0 ; python_version >= "3.8" and python_version < "3.11"
- google-api-core==2.11.0 ; python_version >= "3.8" and python_version < "3.11"
- google-api-core[grpc]==2.11.0 ; python_version >= "3.8" and python_version < "3.11"
- google-auth==2.23.4 ; python_version >= "3.8" and python_version < "3.11"
- google-cloud-core==2.3.2 ; python_version >= "3.8" and python_version < "3.11"
- google-cloud-secret-manager==2.16.4 ; python_version >= "3.8" and python_version < "3.11"
- google-cloud-storage==2.13.0 ; python_version >= "3.8" and python_version < "3.11"
- google-crc32c==1.5.0 ; python_version >= "3.8" and python_version < "3.11"
- google-resumable-media==2.6.0 ; python_version >= "3.8" and python_version < "3.11"
- googleapis-common-protos==1.59.0 ; python_version >= "3.8" and python_version < "3.11"
- googleapis-common-protos[grpc]==1.59.0 ; python_version >= "3.8" and python_version < "3.11"
- grpc-google-iam-v1==0.12.7 ; python_version >= "3.8" and python_version < "3.11"
- grpcio-status==1.48.2 ; python_version >= "3.8" and python_version < "3.11"
- grpcio==1.59.2 ; python_version >= "3.8" and python_version < "3.11"
- humanfriendly==10.0 ; python_version >= "3.8" and python_version < "3.11"
- identify==2.5.24 ; python_version >= "3.8" and python_version < "3.11"
- idna==3.4 ; python_version >= "3.8" and python_version < "3.11"
- imagesize==1.4.1 ; python_version >= "3.8" and python_version < "3.11"
- importlib-resources==5.12.0 ; python_version >= "3.8" and python_version < "3.11"
- inflection==0.5.1 ; python_version >= "3.8" and python_version < "3.11"
- iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "3.11"
- isort==5.12.0 ; python_version >= "3.8" and python_version < "3.11"
- joblib==1.2.0 ; python_version >= "3.8" and python_version < "3.11"
- json5==0.9.14 ; python_version >= "3.8" and python_version < "3.11"
- jsonschema==4.17.3 ; python_version >= "3.8" and python_version < "3.11"
- junitparser==3.1.0 ; python_version >= "3.8" and python_version < "3.11"
- lazy-object-proxy==1.9.0 ; python_version >= "3.8" and python_version < "3.11"
- lxml==5.1.0 ; python_version >= "3.8" and python_version < "3.11"
- mccabe==0.6.1 ; python_version >= "3.8" and python_version < "3.11"
- mergedeep==1.3.4 ; python_version >= "3.8" and python_version < "3.11"
- more-itertools==9.1.0 ; python_version >= "3.8" and python_version < "3.11"
- mypy-extensions==1.0.0 ; python_version >= "3.8" and python_version < "3.11"
- mypy==0.982 ; python_version >= "3.8" and python_version < "3.11"
- neo4j==5.14.1 ; python_version >= "3.8" and python_version < "3.11"
- networkx==2.8.8 ; python_version >= "3.8" and python_version < "3.11"
- nltk==3.8.1 ; python_version >= "3.8" and python_version < "3.11"
- nodeenv==1.7.0 ; python_version >= "3.8" and python_version < "3.11"
- ordered-set==4.1.0 ; python_version >= "3.8" and python_version < "3.11"
- orjson==3.8.11 ; python_version >= "3.8" and python_version < "3.11"
- packaging==23.1 ; python_version >= "3.8" and python_version < "3.11"
- paramiko==2.12.0 ; python_version >= "3.8" and python_version < "3.11"
- pbr==5.11.1 ; python_version >= "3.8" and python_version < "3.11"
- pebble==5.0.3 ; python_version >= "3.8" and python_version < "3.11"
- pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9"
- platformdirs==3.5.0 ; python_version >= "3.8" and python_version < "3.11"
- pluggy==1.0.0 ; python_version >= "3.8" and python_version < "3.11"
- pre-commit==3.5.0 ; python_version >= "3.8" and python_version < "3.11"
- prettytable==3.7.0 ; python_version >= "3.8" and python_version < "3.11"
- proto-plus==1.22.3 ; python_version >= "3.8" and python_version < "3.11"
- protobuf==3.19.6 ; python_version >= "3.8" and python_version < "3.11"
- pyasn1-modules==0.3.0 ; python_version >= "3.8" and python_version < "3.11"
- pyasn1==0.5.0 ; python_version >= "3.8" and python_version < "3.11"
- pycodestyle==2.10.0 ; python_version >= "3.8" and python_version < "3.11"
- pycparser==2.21 ; python_version >= "3.8" and python_version < "3.11"
- pydantic==1.10.7 ; python_version >= "3.8" and python_version < "3.11"
- pygments==2.15.1 ; python_version >= "3.8" and python_version < "3.11"
- pykwalify==1.8.0 ; python_version >= "3.8" and python_version < "3.11"
- pylint==2.12.2 ; python_version >= "3.8" and python_version < "3.11"
- pynacl==1.5.0 ; python_version >= "3.8" and python_version < "3.11"
- pypdf2==1.28.6 ; python_version >= "3.8" and python_version < "3.11"
- pyreadline3==3.4.1 ; sys_platform == "win32" and python_version >= "3.8" and python_version < "3.11"
- pyrsistent==0.19.3 ; python_version >= "3.8" and python_version < "3.11"
- pyspellchecker==0.6.3 ; python_version >= "3.8" and python_version < "3.11"
- pytest-freezegun==0.4.2 ; python_version >= "3.8" and python_version < "3.11"
- pytest==7.3.1 ; python_version >= "3.8" and python_version < "3.11"
- python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "3.11"
- python-dotenv==0.20.0 ; python_version >= "3.8" and python_version < "3.11"
- pytz-deprecation-shim==0.1.0.post0 ; python_version >= "3.8" and python_version < "3.11"
- pytz==2023.3 ; python_version >= "3.8" and python_version < "3.11"
- pywin32==227 ; python_version >= "3.8" and python_version < "3.11" and sys_platform == "win32"
- pyyaml==6.0 ; python_version >= "3.8" and python_version < "3.11"
- regex==2023.5.5 ; python_version >= "3.8" and python_version < "3.11"
- requests==2.29.0 ; python_version >= "3.8" and python_version < "3.11"
- rich==12.6.0 ; python_version >= "3.8" and python_version < "3.11"
- rsa==4.7.2 ; python_version >= "3.8" and python_version < "3.11"
- ruamel-yaml-clib==0.2.7 ; platform_python_implementation == "CPython" and python_version < "3.11" and python_version >= "3.8"
- ruamel-yaml==0.17.22 ; python_version >= "3.8" and python_version < "3.11"
- setuptools==67.7.2 ; python_version >= "3.8" and python_version < "3.11"
- shellingham==1.5.4 ; python_version >= "3.8" and python_version < "3.11"
- six==1.16.0 ; python_version >= "3.8" and python_version < "3.11"
- slack-sdk==3.21.3 ; python_version >= "3.8" and python_version < "3.11"
- smmap==5.0.0 ; python_version >= "3.8" and python_version < "3.11"
- soupsieve==2.4.1 ; python_version >= "3.8" and python_version < "3.11"
- stevedore==5.0.0 ; python_version >= "3.8" and python_version < "3.11"
- tabulate==0.9.0 ; python_version >= "3.8" and python_version < "3.11"
- tenacity==8.2.3 ; python_version >= "3.8" and python_version < "3.11"
- toml==0.10.2 ; python_version >= "3.8" and python_version < "3.11"
- tomli==2.0.1 ; python_version >= "3.8" and python_version < "3.11"
- tqdm==4.65.0 ; python_version >= "3.8" and python_version < "3.11"
- typed-ast==1.5.4 ; python_version >= "3.8" and python_version < "3.11"
- typer[all]==0.9.0 ; python_version >= "3.8" and python_version < "3.11"
- types-chardet==5.0.4.5 ; python_version >= "3.8" and python_version < "3.11"
- types-cryptography==3.3.23.2 ; python_version >= "3.8" and python_version < "3.11"
- types-dateparser==1.1.4.9 ; python_version >= "3.8" and python_version < "3.11"
- types-decorator==5.1.8.3 ; python_version >= "3.8" and python_version < "3.11"
- types-emoji==2.1.0.3 ; python_version >= "3.8" and python_version < "3.11"
- types-filelock==3.2.7 ; python_version >= "3.8" and python_version < "3.11"
- types-futures==3.3.8 ; python_version >= "3.8" and python_version < "3.11"
- types-ipaddress==1.0.8 ; python_version >= "3.8" and python_version < "3.11"
- types-markdown==3.4.2.8 ; python_version >= "3.8" and python_version < "3.11"
- types-mock==4.0.15.2 ; python_version >= "3.8" and python_version < "3.11"
- types-paramiko==2.12.0.1 ; python_version >= "3.8" and python_version < "3.11"
- types-pkg-resources==0.1.3 ; python_version >= "3.8" and python_version < "3.11"
- types-protobuf==4.24.0.4 ; python_version >= "3.8" and python_version < "3.11"
- types-pymysql==1.0.19.6 ; python_version >= "3.8" and python_version < "3.11"
- types-python-dateutil==2.8.19.12 ; python_version >= "3.8" and python_version < "3.11"
- types-pytz==2022.7.1.2 ; python_version >= "3.8" and python_version < "3.11"
- types-pyvmomi==8.0.0.1 ; python_version >= "3.8" and python_version < "3.11"
- types-pyyaml==6.0.12.9 ; python_version >= "3.8" and python_version < "3.11"
- types-requests==2.28.11 ; python_version >= "3.8" and python_version < "3.11"
- types-setuptools==67.7.0.1 ; python_version >= "3.8" and python_version < "3.11"
- types-six==1.16.21.8 ; python_version >= "3.8" and python_version < "3.11"
- types-tabulate==0.9.0.2 ; python_version >= "3.8" and python_version < "3.11"
- types-toml==0.10.8.7 ; python_version >= "3.8" and python_version < "3.11"
- types-ujson==5.7.0.5 ; python_version >= "3.8" and python_version < "3.11"
- types-urllib3==1.26.25.12 ; python_version >= "3.8" and python_version < "3.11"
- typing-extensions==4.5.0 ; python_version >= "3.8" and python_version < "3.11"
- tzdata==2023.3 ; python_version >= "3.8" and python_version < "3.11"
- tzlocal==4.3 ; python_version >= "3.8" and python_version < "3.11"
- ujson==5.7.0 ; python_version >= "3.8" and python_version < "3.11"
- urllib3==1.26.15 ; python_version >= "3.8" and python_version < "3.11"
- uv==0.1.24 ; python_version >= "3.8" and python_version < "3.11"
- virtualenv==20.23.0 ; python_version >= "3.8" and python_version < "3.11"
- vulture==2.7 ; python_version >= "3.8" and python_version < "3.11"
- wcmatch==8.4.1 ; python_version >= "3.8" and python_version < "3.11"
- wcwidth==0.2.6 ; python_version >= "3.8" and python_version < "3.11"
- websocket-client==1.5.1 ; python_version >= "3.8" and python_version < "3.11"
- wrapt==1.13.3 ; python_version >= "3.8" and python_version < "3.11"
- yamlordereddictloader==0.4.0 ; python_version >= "3.8" and python_version < "3.11"
- zipp==3.15.0 ; python_version >= "3.8" and python_version < "3.10"
dorschw marked this conversation as resolved.
Show resolved Hide resolved
language: system
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from typing import Collection, Dict, List, Optional, Set, Tuple

import typer
from github import Github, WorkflowRun
from github import Github
from github.WorkflowRun import WorkflowRun
from slack_sdk import WebClient

from demisto_sdk.commands.common.logger import logger
Expand Down
7 changes: 4 additions & 3 deletions Utils/pytest_junit_parser.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
from enum import Enum
from functools import cached_property
from pathlib import Path
from typing import List, Optional

from junitparser import Failure, JUnitXml, Skipped, TestCase

from demisto_sdk.commands.common.StrEnum import StrEnum

class TestStatus(str, Enum):

class TestStatus(StrEnum):
PASSED = "PASSED"
FAILED = "FAILED"
SKIPPED = "SKIPPED"
UNKNOWN = "UNKNOWN"


class TestType(str, Enum):
class TestType(StrEnum):
UNIT_TESTS = "unit-tests"
INTEGRATION_TESTS = "integration-tests"
GRAPH_TESTS = "graph-tests"
Expand Down
36 changes: 36 additions & 0 deletions demisto_sdk/commands/common/StrEnum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
Create a StrEnum class that works in both python <3.11 and >=3.11
https://tomwojcik.com/posts/2023-01-02/python-311-str-enum-breaking-change
"""

import sys

if sys.version_info >= (3, 11):
# StrEnum was added in 3.11
from enum import StrEnum as _StrEnum # type:ignore[attr-defined]
from typing import Self, overload

class StrEnum(_StrEnum):
"""
Since MyPy falsely detects usage of StrEnum as str, we patch it. See https://github.com/python/mypy/issues/14688.
"""

@overload
def __new__(cls, object: object = ...) -> Self:
...

@overload
def __new__(
cls, object: object, encoding: str = ..., errors: str = ...
) -> Self:
...

def __new__(cls, *values):
return _StrEnum._new_member_(cls, *values)

else:
from enum import Enum

class StrEnum(str, Enum): # type:ignore[no-redef]
def __str__(self):
return self
Loading
Loading