Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ body:
attributes:
label: Python Interpreter version
description: The version(s) of Python used.
placeholder: "3.9"
placeholder: "3.10"
validations:
required: true
- type: checkboxes
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/jira_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ on:
jobs:
server:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: pycontribs/jira/.github/workflows/jira_server_ci.yml@main
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/jira_server_ci.yml

cloud:
needs: server
uses: pycontribs/jira/.github/workflows/jira_cloud_ci.yml@main
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/jira_cloud_ci.yml
secrets:
CLOUD_ADMIN: ${{ secrets.CI_JIRA_CLOUD_ADMIN }}
CLOUD_ADMIN_TOKEN: ${{ secrets.CI_JIRA_CLOUD_ADMIN_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/jira_cloud_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
os: [ubuntu-latest]
# We only test a single version to prevent concurrent
# running of tests influencing one another
python-version: ["3.9"]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v4
Expand All @@ -41,7 +41,7 @@ jobs:
python -m pip install --upgrade tox tox-gh-actions

- name: Test with tox
run: tox -e py39 -- -m allow_on_cloud
run: tox -e py310 -- -m allow_on_cloud
env:
CI_JIRA_TYPE: CLOUD
CI_JIRA_CLOUD_ADMIN: ${{ secrets.CLOUD_ADMIN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/jira_server_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
jira-version: [8.17.1]

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
TOX_PARALLEL_NO_SPINNER: 1

steps:
- name: Switch to using Python 3.9 by default
- name: Switch to using Python 3.10 by default
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"

- name: Install system dependencies
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ jobs:
id: generate_matrix
uses: coactions/dynamic-matrix@v4
with:
min_python: "3.9"
min_python: "3.10"
max_python: "3.12"
default_python: "3.9"
default_python: "3.10"
other_names: |
lint
docs
pkg
py39:tox -e py39 --notest
py310:tox -e py310 --notest
py311:tox -e py311 --notest
py312:tox -e py312 --notest
py39-macos:tox -e py312 --notest
py310-macos:tox -e py312 --notest
py312-macos:tox -e py312 --notest
# ^ macos is also used to validate arm64 building
platforms: linux,macos
Expand Down
88 changes: 44 additions & 44 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --extra=async --extra=cli --extra=docs --extra=opt --extra=test --output-file=constraints.txt --strip-extras
#
alabaster==0.7.16
alabaster==1.0.0
# via sphinx
asttokens==2.4.1
asttokens==3.0.0
# via stack-data
babel==2.16.0
babel==2.17.0
# via sphinx
backports-tarfile==1.2.0
# via jaraco-context
beautifulsoup4==4.12.3
beautifulsoup4==4.13.3
# via furo
certifi==2024.8.30
certifi==2025.1.31
# via requests
cffi==1.17.0
cffi==1.17.1
# via cryptography
charset-normalizer==3.3.2
charset-normalizer==3.4.1
# via requests
coverage==7.6.1
coverage==7.8.0
# via pytest-cov
cryptography==43.0.0
cryptography==44.0.2
# via
# pyspnego
# requests-kerberos
decorator==5.1.1
decorator==5.2.1
# via
# gssapi
# ipython
Expand All @@ -44,57 +44,55 @@ execnet==2.1.1
# via
# pytest-cache
# pytest-xdist
executing==2.0.1
executing==2.2.0
# via stack-data
filemagic==1.6
# via jira (pyproject.toml)
flaky==3.8.1
# via jira (pyproject.toml)
furo==2024.8.6
# via jira (pyproject.toml)
gssapi==1.8.3
gssapi==1.9.0
# via pyspnego
idna==3.8
idna==3.10
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==8.4.0
# via
# keyring
# sphinx
iniconfig==2.0.0
importlib-metadata==8.6.1
# via keyring
iniconfig==2.1.0
# via pytest
ipython==8.18.1
ipython==8.34.0
# via jira (pyproject.toml)
jaraco-classes==3.4.0
# via keyring
jaraco-context==6.0.1
# via keyring
jaraco-functools==4.0.2
jaraco-functools==4.1.0
# via keyring
jedi==0.19.1
jedi==0.19.2
# via ipython
jinja2==3.1.4
jinja2==3.1.6
# via sphinx
keyring==25.3.0
keyring==25.6.0
# via jira (pyproject.toml)
krb5==0.6.0
krb5==0.7.1
# via pyspnego
markupsafe==2.1.5
markupsafe==3.0.2
# via
# jinja2
# jira (pyproject.toml)
matplotlib-inline==0.1.7
# via ipython
more-itertools==10.4.0
more-itertools==10.6.0
# via
# jaraco-classes
# jaraco-functools
oauthlib==3.2.2
# via
# jira (pyproject.toml)
# requests-oauthlib
packaging==24.1
packaging==24.2
# via
# jira (pyproject.toml)
# pytest
Expand All @@ -108,26 +106,26 @@ pexpect==4.9.0
# via ipython
pluggy==1.5.0
# via pytest
prompt-toolkit==3.0.47
prompt-toolkit==3.0.50
# via ipython
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
pycparser==2.22
# via cffi
pygments==2.18.0
pygments==2.19.1
# via
# furo
# ipython
# sphinx
pyjwt==2.9.0
pyjwt==2.10.1
# via
# jira (pyproject.toml)
# requests-jwt
pyspnego==0.11.1
pyspnego==0.11.2
# via requests-kerberos
pytest==8.3.2
pytest==8.3.5
# via
# jira (pyproject.toml)
# pytest-cache
Expand All @@ -138,7 +136,7 @@ pytest==8.3.2
# pytest-xdist
pytest-cache==1.0
# via jira (pyproject.toml)
pytest-cov==5.0.0
pytest-cov==6.0.0
# via jira (pyproject.toml)
pytest-instafail==0.5.0
# via jira (pyproject.toml)
Expand All @@ -161,7 +159,7 @@ requests==2.32.3
# requests-toolbelt
# requires-io
# sphinx
requests-futures==1.0.1
requests-futures==1.0.2
# via jira (pyproject.toml)
requests-jwt==0.6.0
# via jira (pyproject.toml)
Expand All @@ -175,13 +173,11 @@ requests-toolbelt==1.0.0
# via jira (pyproject.toml)
requires-io==0.2.6
# via jira (pyproject.toml)
six==1.16.0
# via asttokens
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.6
# via beautifulsoup4
sphinx==7.4.7
sphinx==8.1.3
# via
# furo
# jira (pyproject.toml)
Expand All @@ -207,9 +203,9 @@ stack-data==0.6.3
# via ipython
tenacity==9.0.0
# via jira (pyproject.toml)
termcolor==2.4.0
termcolor==2.5.0
# via pytest-sugar
tomli==2.0.1
tomli==2.2.1
# via
# coverage
# pytest
Expand All @@ -218,17 +214,21 @@ traitlets==5.14.3
# via
# ipython
# matplotlib-inline
typing-extensions==4.12.2
typing-extensions==4.13.0
# via
# beautifulsoup4
# ipython
# jira (pyproject.toml)
urllib3==2.2.2
urllib3==2.3.0
# via requests
wcwidth==0.2.13
# via prompt-toolkit
wheel==0.44.0
wheel==0.45.1
# via jira (pyproject.toml)
yanc==0.3.3
# via jira (pyproject.toml)
zipp==3.20.1
zipp==3.21.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
]

intersphinx_mapping = {
"python": ("https://docs.python.org/3.9", None),
"python": ("https://docs.python.org/3.10", None),
"requests": ("https://requests.readthedocs.io/en/latest/", None),
"requests-oauthlib": ("https://requests-oauthlib.readthedocs.io/en/latest/", None),
"ipython": ("https://ipython.readthedocs.io/en/stable/", None),
Expand Down
6 changes: 3 additions & 3 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Using tox
* Run tests for one env only
- ``tox -e py``
* Specify what tests to run with pytest_
- ``tox -e py39 -- tests/resources/test_attachment.py``
- ``tox -e py310 -- -m allow_on_cloud`` (Run only the cloud tests)
- ``tox -e py -- tests/resources/test_attachment.py``
- ``tox -e py -- -m allow_on_cloud`` (Run only the cloud tests)
* Debug tests with breakpoints by disabling the coverage plugin, with the ``--no-cov`` argument.
- Example for VSCode on Windows :

Expand All @@ -88,7 +88,7 @@ Using tox
"name": "Pytest",
"type": "python",
"request": "launch",
"python": ".tox\\py39\\Scripts\\python.exe",
"python": ".tox\\py\\Scripts\\python.exe",
"module": "pytest",
"env": {
"CI_JIRA_URL": "http://localhost:2990/jira",
Expand Down
2 changes: 0 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Source packages are also available at PyPI:
Dependencies
============

Python >=3.9 is required.

- :py:mod:`requests` - `python-requests <https://pypi.org/project/requests/>`_ library handles the HTTP business. Usually, the latest version available at time of release is the minimum version required; at this writing, that version is 1.2.0, but any version >= 1.0.0 should work.
- :py:mod:`requests-oauthlib` - Used to implement OAuth. The latest version as of this writing is 1.3.0.
- :py:mod:`requests-kerberos` - Used to implement Kerberos.
Expand Down
10 changes: 5 additions & 5 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def translate_resource_args(func: Callable):
def wrapper(*args: Any, **kwargs: Any) -> Any:
arg_list = []
for arg in args:
if isinstance(arg, (Issue, Project)):
if isinstance(arg, Issue | Project):
arg_list.append(arg.key)
elif isinstance(arg, IssueLinkType):
arg_list.append(arg.name)
Expand Down Expand Up @@ -1894,7 +1894,7 @@ def create_issue(
p = data["fields"]["project"]

project_id = None
if isinstance(p, (str, int)):
if isinstance(p, str | int):
project_id = self.project(str(p)).id
data["fields"]["project"] = {"id": project_id}

Expand Down Expand Up @@ -1941,7 +1941,7 @@ def create_issues(
p = issue_data["fields"]["project"]

project_id = None
if isinstance(p, (str, int)):
if isinstance(p, str | int):
project_id = self.project(str(p)).id
issue_data["fields"]["project"] = {"id": project_id}

Expand Down Expand Up @@ -2093,7 +2093,7 @@ def create_customer_request(
p = data["serviceDeskId"]
service_desk = None

if isinstance(p, (str, int)):
if isinstance(p, str | int):
service_desk = self.service_desk(p)
elif isinstance(p, ServiceDesk):
service_desk = p
Expand Down Expand Up @@ -4853,7 +4853,7 @@ def backup_progress(self) -> dict[str, Any] | None:
"""
epoch_time = int(time.time() * 1000)
if self._is_cloud:
url = self.server_url + "/rest/obm/1.0/getprogress?_=%i" % epoch_time
url = self.server_url + f"/rest/obm/1.0/getprogress?_={epoch_time:i}"
else:
self.log.warning("This functionality is not available in Server version")
return None
Expand Down
Loading