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
10 changes: 7 additions & 3 deletions .github/workflows/bugwarrior.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
timeout-minutes: 5
strategy:
matrix:
python-version: ["3.10", 3.11, 3.12, 3.13, 3.14]
python-version: [3.11, 3.12, 3.13, 3.14]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -41,7 +41,9 @@ jobs:

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade "pip>=25.1" setuptools
pip install --upgrade "pip>=26.1"
pip config --site set install.uploaded-prior-to P3D
pip install --upgrade setuptools

pip install -e ".[all]"
pip install --group test
Expand Down Expand Up @@ -80,7 +82,9 @@ jobs:
mkdir .venv
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade "pip>=25.1" setuptools
pip install --upgrade "pip>=26.1"
pip config --site set install.uploaded-prior-to P3D
pip install --upgrade setuptools

pip install -e .[all]
pip install --group test
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ sphinx:
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.11"
jobs:
pre_create_environment:
- asdf plugin add uv
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Unreleased
----------

Dependency Updates
==================

- Drop python-3.10 support.
- Drop tomli.

2.1.0
-----

Expand Down
7 changes: 1 addition & 6 deletions bugwarrior/config/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
import logging
import os
from pathlib import Path
import sys
import tomllib
from typing import Any

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

from .validation import Config, validate_config

# The name of the environment variable that can be used to ovewrite the path
Expand Down
7 changes: 1 addition & 6 deletions bugwarrior/docs/_ext/extras.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import pathlib
import sys
import tomllib

from docutils import nodes
from sphinx.util.docutils import SphinxDirective

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib


class Extras(SphinxDirective):
"""List extra dependency groups."""
Expand Down
10 changes: 8 additions & 2 deletions bugwarrior/docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ Now use your favorite tool to attain an editable installation.

.. tab:: pip

Requires pip >= 25.1 for `dependency group <https://peps.python.org/pep-0735/>`_ support.
Requires pip >= 26.1 for `dependency group <https://peps.python.org/pep-0735/>`_
support and ``--uploaded-prior-to`` duration support. The commands below
configure the virtual environment's pip installation to use the same ``P3D``
dependency cooldown as the uv ``exclude-newer = "3 days"`` setting in
``pyproject.toml``.

.. code-block:: bash

$ mkdir .venv
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install --upgrade "pip>=25.1"
$ pip install --upgrade "pip>=26.1"
$ pip config --site set install.uploaded-prior-to P3D
$ pip install --upgrade setuptools
$ pip install -e .[all]
$ pip install --group test

Expand Down
2 changes: 1 addition & 1 deletion bugwarrior/services/azuredevops.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def annotations(self, issue: dict[str, Any]) -> list[str]:
name = comment["revisedBy"]["displayName"]
except KeyError:
name = comment["modifiedBy"]["displayName"]
text = format_item(comment["text"])
text = format_item(comment["text"]) or ""
annotations.append((name, text))
return self.build_annotations(annotations, url)

Expand Down
2 changes: 1 addition & 1 deletion bugwarrior/services/bitbucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def __init__(
'bitbucket_refresh_token', response['refresh_token']
)

self.requests_kwargs = {
self.requests_kwargs: dict[str, Any] = {
'headers': {'Authorization': f"Bearer {response['access_token']}"}
}

Expand Down
38 changes: 19 additions & 19 deletions bugwarrior/services/pivotaltracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,25 +170,25 @@ def blockers(self, blocker_list: list[dict[str, Any]]) -> str | None:
def issues(self) -> Iterator[PivotalTrackerIssue]:
for project in self.get_projects(self.config.account_ids):
project_id = project.get('id')
if project_id not in self.config.exclude_projects:
for story in self.get_query(project_id, query=self.query):
story_id = story.get('id')
if story_id is None:
continue
tasks = self.get_tasks(project_id, story_id)
blockers = self.get_blockers(project_id, story_id)
extra = {
'project_name': project.get('name'),
'annotations': self.annotations(tasks, story),
'owned_user': self.get_user_by_id(
project_id, story['owner_ids']
),
'request_user': self.get_user_by_id(
project_id, [story['requested_by_id']]
),
'blockers': self.blockers(blockers),
}
yield self.get_issue_for_record(story, extra)
if project_id is None or project_id in self.config.exclude_projects:
continue

for story in self.get_query(project_id, query=self.query):
story_id = story.get('id')
if story_id is None:
continue
tasks = self.get_tasks(project_id, story_id)
blockers = self.get_blockers(project_id, story_id)
extra = {
'project_name': project.get('name'),
'annotations': self.annotations(tasks, story),
'owned_user': self.get_user_by_id(project_id, story['owner_ids']),
'request_user': self.get_user_by_id(
project_id, [story['requested_by_id']]
),
'blockers': self.blockers(blockers),
}
yield self.get_issue_for_record(story, extra)

def api_request(self, endpoint: str, params: dict[str, Any] | None = None) -> Any:
"""
Expand Down
2 changes: 1 addition & 1 deletion bugwarrior/services/trac.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def annotations(self, issue: dict[str, Any]) -> list[str]:
annotations = []
# without offtrac, we can't get issue comments
if self.trac is None:
return annotations
return []
changelog = typing.cast(
list, self.trac.server.ticket.changeLog(issue['number'])
)
Expand Down
15 changes: 10 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ name = "bugwarrior"
version = "2.1.0.post"
description = "a command line utility for updating your local taskwarrior database from your forge issue trackers"
readme = "bugwarrior/README.rst"
requires-python = ">=3.10"
requires-python = ">=3.11"
license = "GPL-3.0-or-later"
license-files = ["LICENSE.txt"]
keywords=["task", "taskwarrior", "todo", "github"]
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Bug Tracking",
"Topic :: Utilities",
]
Expand All @@ -26,7 +30,6 @@ dependencies = [
# which is no longer bundled in venvs since Python 3.12 (see #1150).
"setuptools",
"taskw>=0.8",
"tomli ; python_version <= '3.10'",
]

[project.optional-dependencies]
Expand Down Expand Up @@ -83,6 +86,9 @@ clickup = "bugwarrior.services.clickup:ClickupService"
[project.entry-points."ini2toml.processing"]
bugwarrior = "bugwarrior.config.ini2toml_plugin:activate"

[tool.uv]
exclude-newer = "3 days"

[tool.ruff.format]
quote-style = "preserve"
skip-magic-trailing-comma = true
Expand Down Expand Up @@ -128,8 +134,7 @@ build-backend = "setuptools.build_meta"
docs = [
# sphinx-inline-tabs is incompatible with docutils-0.22 https://github.com/pradyunsg/sphinx-inline-tabs/pull/51
"docutils<0.22",
"sphinx>=1.0,<9.0 ; python_version <= '3.10'",
"sphinx>=9.0.3 ; python_version >= '3.11'",
"sphinx>=9.0.3",
"sphinx-click",
"sphinx-inline-tabs",
]
Expand All @@ -139,5 +144,5 @@ test = [
"responses",
# ruff and ty are required by tests/test_general.py
"ruff",
"ty==0.0.32",
"ty==0.0.51",
]
9 changes: 0 additions & 9 deletions tests/base.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import contextlib
import os.path
import shutil
import sys
import tempfile
import typing
import unittest
Expand Down Expand Up @@ -133,14 +132,6 @@ def tearDown(self):
def inject_fixtures(self, caplog):
self.caplog = caplog

if sys.version_info < (3, 11):

def enterContext(self, cm):
"""Backport of unittest.TestCase.enterContext for Python 3.10."""
value = cm.__enter__()
self.addCleanup(cm.__exit__, None, None, None)
return value

def validate(self) -> validation.Config:
config = self.config.copy()
config['general'] = config.get('general', {})
Expand Down
7 changes: 1 addition & 6 deletions tests/config/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
import itertools
import os
from pathlib import Path
import sys
import textwrap
import tomllib
from unittest import TestCase

if sys.version_info >= (3, 11):
import tomllib
else:
import tomli as tomllib

from bugwarrior.config import load

from ..base import ConfigTest
Expand Down
Loading