Skip to content

Commit

Permalink
Add Support For Newer Python Versions (#127)
Browse files Browse the repository at this point in the history
* Add Python version 3.11 & 3.12

* Remove (unused) flake8 dependency

* Update dependencies

* Add `poetry.toml`

* Remove usage of deprecate `getheader` and `getheaders` methods

* Resolve `test_data` location issue

* Update unit-tests

* Remove `urllib3-mock` dependency

* Fix typing

* `gen-code.sh` changes

* Bump `urllib3` version

* Review fixes

* Remove unused dev-dependencies

* Update certifi
  • Loading branch information
MichaelYochpaz authored Feb 8, 2024
1 parent 3e2349e commit 30d3bc9
Show file tree
Hide file tree
Showing 9 changed files with 429 additions and 634 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ parameters:
# python 3.10 is the latest supported version
description: "Docker image to use for the build"
type: string
default: cimg/python:3.10
default: cimg/python:3.12

references:
install_poetry: &install_poetry
Expand Down Expand Up @@ -103,7 +103,7 @@ workflows:
<<: *tag_filter # we add it for the publish-to-pypi step
matrix:
parameters:
pythonversion: ["3.8", "3.9", "3.10"]
pythonversion: ["3.8", "3.9", "3.10", "3.11", "3.12"]
name: run-unit-tests-<< matrix.pythonversion >>
- verify:
<<: *tag_filter # we add it for the publish-to-pypi step
Expand Down
6 changes: 0 additions & 6 deletions .flake8

This file was deleted.

6 changes: 3 additions & 3 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1172,14 +1172,14 @@ Exports an incidents batch to CSV file (returns file ID)
### Example
```python
from __future__ import print_function
import time
import demisto_client
import demisto_client.demisto_api
from demisto_client.demisto_api.rest import ApiException
from pprint import pprint

api_instance = demisto_client.configure(base_url="https://YOUR_DEMISTO_SERVER", api_key="YOUR_API_KEY")
inc_filter = demisto_client.demisto_api.IncidentFilter()
inc_filter.query = 'status: "Active"'
update_data_batch = demisto_client.demisto_api.UpdateDataBatch(filter=inc_filter, all=True, columns=['id', 'name', 'status'])
update_data_batch = demisto_client.demisto_api.UpdateDataBatch() # UpdateDataBatch | (optional)

try:
# Batch export incidents to csv
Expand Down
279 changes: 41 additions & 238 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions poetry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[virtualenvs]
in-project = true
23 changes: 11 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,24 @@ classifiers=[
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython'
]

[tool.poetry.dependencies]
python = ">=3.8,<3.11"
certifi = ">=2017.4.17"
six = ">=1.10"
python-dateutil = ">=2.5.3"
urllib3 = ">=1.26.7"
tzlocal = ">=4.0.0,<5.0.0"
python = ">=3.8,<=3.12"
certifi = "^2024.2.2"
six = "^1.16"
python-dateutil = "^2.7.2"
urllib3 = "<2.1.0" # Can't update until CIAC-9648 is resolved
tzlocal = "^5.2.0"


[tool.poetry.group.dev.dependencies]
pytest = "^7.4.0"
urllib3-mock = "^0.3.3"
requests = "^2.31.0"
mock = "^5.1.0"
flake8 = "5.0.4" # The last version that supports Python 3.8, the next version is 6.0.0 which only supports 3.8.1+
pytest-mock = "^3.11.1"
pytest = "^8.0.0"
pytest-mock = "^3.12.0"
freezegun = "^1.4.0"

[build-system]
requires = ["poetry-core"]
Expand Down
Loading

0 comments on commit 30d3bc9

Please sign in to comment.