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

bump deps #1844

Merged
merged 4 commits into from
Mar 25, 2024
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/workflows/jira_cloud_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
CI_JIRA_CLOUD_USER_TOKEN: ${{ secrets.CLOUD_USER_TOKEN }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.1.0
with:
file: ./coverage.xml
name: ${{ runner.os }}-${{ matrix.python-version }}-Cloud
2 changes: 1 addition & 1 deletion .github/workflows/jira_server_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: tox

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.1.0
with:
file: ./coverage.xml
name: ${{ runner.os }}-${{ matrix.python-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
- name: Publish to test.pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/

- name: Publish to pypi.org
if: >- # "create" workflows run separately from "push" & "pull_request"
github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.pypi_password }}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ repos:
require_serial: false
additional_dependencies: []
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.9"
rev: "v0.3.4"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/adrienverge/yamllint
rev: v1.33.0
rev: v1.35.1
hooks:
- id: yamllint
files: \.(yaml|yml)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
68 changes: 37 additions & 31 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ backcall==0.2.0
# via ipython
beautifulsoup4==4.12.3
# via furo
certifi==2023.11.17
certifi==2024.2.2
# via requests
cffi==1.16.0
# via cryptography
Expand All @@ -25,9 +25,9 @@ colorama==0.4.6
# ipython
# pytest
# sphinx
coverage==7.4.0
coverage==7.4.4
# via pytest-cov
cryptography==41.0.7
cryptography==42.0.5
# via
# pyspnego
# requests-kerberos
Expand All @@ -49,45 +49,51 @@ executing==2.0.1
# via stack-data
filemagic==1.6
# via jira (setup.cfg)
flaky==3.7.0
flaky==3.8.1
# via jira (setup.cfg)
furo==2023.9.10
furo==2024.1.29
# via jira (setup.cfg)
idna==3.6
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==7.0.1
importlib-metadata==7.1.0
# via
# keyring
# sphinx
importlib-resources==6.1.1
importlib-resources==6.4.0
# via keyring
iniconfig==2.0.0
# via pytest
ipython==8.12.3
# via jira (setup.cfg)
jaraco-classes==3.3.0
jaraco-classes==3.3.1
# via keyring
jaraco-context==4.3.0
# via keyring
jaraco-functools==4.0.0
# via keyring
jedi==0.19.1
# via ipython
jinja2==3.1.3
# via sphinx
keyring==24.3.0
keyring==25.0.0
# via jira (setup.cfg)
markupsafe==2.1.3
markupsafe==2.1.5
# via
# jinja2
# jira (setup.cfg)
matplotlib-inline==0.1.6
# via ipython
more-itertools==10.1.0
# via jaraco-classes
more-itertools==10.2.0
# via
# jaraco-classes
# jaraco-functools
oauthlib==3.2.2
# via
# jira (setup.cfg)
# requests-oauthlib
packaging==23.2
packaging==24.0
# via
# jira (setup.cfg)
# pytest
Expand All @@ -99,9 +105,9 @@ parso==0.8.3
# via jedi
pickleshare==0.7.5
# via ipython
pillow==10.1.0
pillow==10.2.0
# via jira (setup.cfg)
pluggy==1.3.0
pluggy==1.4.0
# via pytest
prompt-toolkit==3.0.43
# via ipython
Expand All @@ -120,7 +126,7 @@ pyjwt==2.8.0
# requests-jwt
pyspnego==0.10.2
# via requests-kerberos
pytest==7.4.3
pytest==8.1.1
# via
# jira (setup.cfg)
# pytest-cache
Expand All @@ -131,17 +137,17 @@ pytest==7.4.3
# pytest-xdist
pytest-cache==1.0
# via jira (setup.cfg)
pytest-cov==4.1.0
pytest-cov==5.0.0
# via jira (setup.cfg)
pytest-instafail==0.5.0
# via jira (setup.cfg)
pytest-sugar==0.9.7
pytest-sugar==1.0.0
# via jira (setup.cfg)
pytest-timeout==2.2.0
pytest-timeout==2.3.1
# via jira (setup.cfg)
pytest-xdist==3.5.0
# via jira (setup.cfg)
pytz==2023.3.post1
pytz==2024.1
# via babel
pywin32-ctypes==0.2.2
# via keyring
Expand All @@ -166,7 +172,7 @@ requests-kerberos==0.14.0
# via jira (setup.cfg)
requests-mock==1.11.0
# via jira (setup.cfg)
requests-oauthlib==1.3.1
requests-oauthlib==2.0.0
# via jira (setup.cfg)
requests-toolbelt==1.0.0
# via jira (setup.cfg)
Expand All @@ -192,15 +198,15 @@ sphinx-copybutton==0.5.2
# via jira (setup.cfg)
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-htmlhelp==2.0.1
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
sspilib==0.1.0
# via pyspnego
Expand All @@ -214,23 +220,23 @@ tomli==2.0.1
# via
# coverage
# pytest
traitlets==5.14.0
traitlets==5.14.2
# via
# ipython
# matplotlib-inline
typing-extensions==4.9.0
typing-extensions==4.10.0
# via
# ipython
# jira (setup.cfg)
urllib3==2.1.0
urllib3==2.2.1
# via requests
wcwidth==0.2.12
wcwidth==0.2.13
# via prompt-toolkit
wheel==0.42.0
wheel==0.43.0
# via jira (setup.cfg)
yanc==0.3.3
# via jira (setup.cfg)
zipp==3.17.0
zipp==3.18.1
# via
# importlib-metadata
# importlib-resources
1 change: 1 addition & 0 deletions examples/auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Some simple authentication examples."""

from __future__ import annotations

from collections import Counter
Expand Down
1 change: 1 addition & 0 deletions jira/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The root of JIRA package namespace."""

from __future__ import annotations

try:
Expand Down
6 changes: 3 additions & 3 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4518,9 +4518,9 @@ def deactivate_user(self, username: str) -> str | int:
raise JIRAError(f"Error Deactivating {username}: {e}")
else:
url = self.server_url + "/secure/admin/user/EditUser.jspa"
self._options["headers"][
"Content-Type"
] = "application/x-www-form-urlencoded; charset=UTF-8"
self._options["headers"]["Content-Type"] = (
"application/x-www-form-urlencoded; charset=UTF-8"
)
user = self.user(username)
userInfo = {
"inline": "true",
Expand Down
1 change: 1 addition & 0 deletions jira/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

Also, this simplifies the scripts by not having to write the same initialization code for each script.
"""

from __future__ import annotations

import configparser
Expand Down
1 change: 1 addition & 0 deletions jira/jirashell.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Script arguments support changing the server and a persistent authentication
over HTTP BASIC or Kerberos.
"""

from __future__ import annotations

import argparse
Expand Down
12 changes: 6 additions & 6 deletions jira/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,9 @@ def update( # type: ignore[override] # incompatible supertype ignored
DashboardItemProperty
"""
options = self._options.copy()
options[
"path"
] = f"dashboard/{dashboard_id}/items/{item_id}/properties/{self.key}"
options["path"] = (
f"dashboard/{dashboard_id}/items/{item_id}/properties/{self.key}"
)
self.raw["value"].update(value)
self._session.put(self.JIRA_BASE_URL.format(**options), self.raw["value"])

Expand All @@ -628,9 +628,9 @@ def delete(self, dashboard_id: str, item_id: str) -> Response: # type: ignore[o
Response
"""
options = self._options.copy()
options[
"path"
] = f"dashboard/{dashboard_id}/items/{item_id}/properties/{self.key}"
options["path"] = (
f"dashboard/{dashboard_id}/items/{item_id}/properties/{self.key}"
)

return self._session.delete(self.JIRA_BASE_URL.format(**options))

Expand Down
1 change: 1 addition & 0 deletions make_local_jira_user.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Attempts to create a test user, as the empty JIRA instance isn't provisioned with one."""

from __future__ import annotations

import sys
Expand Down
25 changes: 13 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@ check_untyped_defs = false
disable_error_code = "annotation-unchecked"

[tool.ruff]
# Same as Black.
line-length = 88

# Assume Python 3.8. (minimum supported)
target-version = "py38"

# The source code paths to consider, e.g., when resolving first- vs. third-party imports
src = ["jira", "tests"]

[tool.ruff.lint]
select = [
"E", # pydocstyle
"W", # pydocstyle
Expand All @@ -169,27 +179,18 @@ ignore = [
"D417",
]

# Same as Black.
line-length = 88

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.8. (minimum supported)
target-version = "py38"

# The source code paths to consider, e.g., when resolving first- vs. third-party imports
src = ["jira", "tests"]

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["jira", "tests"]
required-imports = ["from __future__ import annotations"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"jira/__init__.py" = [
"E402", # ignore import order in this file
]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
1 change: 1 addition & 0 deletions tests/ruff.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
extend = "../pyproject.toml"
[lint]
ignore = [
"E501", # We have way too many "line too long" errors at the moment
"D", # Too many undocumented functions at the moment
Expand Down
1 change: 1 addition & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
resources/test_* : For tests related to resources
test_* : For other tests of the non-resource elements of the jira package.
"""

from __future__ import annotations

import logging
Expand Down
Loading