Skip to content

Commit

Permalink
Merge pull request #1214 from twm/bumps
Browse files Browse the repository at this point in the history
Bump test dependencies
  • Loading branch information
twm authored Aug 11, 2024
2 parents 586114d + 1295279 commit 1a992ac
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
5 changes: 3 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ updates:
schedule:
interval: "daily"
ignore:
dependency-name: ruff
- dependency-name: ruff
update-types:
- "version-update:semver-minor"
# Ruff releases very frequently which results in
# an annoying number of Dependabot PRs.
- "version-update:semver-patch"
12 changes: 6 additions & 6 deletions bin/bump.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/python3
# Copyright © 2023 Tom Most <[email protected]>
# Copyright © 2023, 2024 Tom Most <[email protected]>

import argparse
import asyncio
Expand All @@ -10,7 +10,7 @@
repo_root = Path(__file__).parent.parent

_parser = argparse.ArgumentParser()
_parser.add_argument("-P", "--upgrade-package", dest="packages", nargs="*")
_parser.add_argument("packages", nargs="*")


async def _run(args: Sequence[str]) -> None:
Expand All @@ -36,7 +36,7 @@ def _requirements() -> list[tuple[str, str]]:
if i == -1:
continue

yield line[:i], line[line.index("==") + 2 :]
yield line[:i], line[line.index("==") + 2 : -1]


def _list_packages() -> list[str]:
Expand All @@ -51,15 +51,15 @@ async def _main(packages: list[str]) -> None:
if not packages:
packages = _list_packages()

for package in sorted(set(packages)):
for package in packages:
print(f"Attempting bump of {package}")
await _run(["tox", "-e", "deps", "--", "--upgrade-package", package])
proc = await asyncio.create_subprocess_exec("git", "diff", "--exit-code")
await proc.wait()
if proc.returncode == 0:
continue
versions = _list_versions(package)
msg = f"{package} {' '.join(versions)}"
versions = _list_versions(package.lower())
msg = f"{package} {', '.join(versions)}"
print(msg)
await _run(["git", "commit", "-am", msg])

Expand Down
14 changes: 8 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
asgiref==3.7.2
# via django
attrs==23.1.0
attrs==24.2.0
# via
# automat
# service-identity
Expand All @@ -23,11 +23,11 @@ charset-normalizer==3.2.0
# via requests
constantly==15.1.0
# via twisted
cryptography==42.0.5
cryptography==43.0.0
# via
# pyopenssl
# service-identity
django==4.2.14
django==4.2.15
# via yarrharr (pyproject.toml)
feedparser==6.0.10
# via yarrharr (pyproject.toml)
Expand All @@ -42,7 +42,7 @@ idna==3.7
# hyperlink
# requests
# twisted
incremental==22.10.0
incremental==24.7.2
# via
# treq
# twisted
Expand All @@ -54,7 +54,7 @@ pyasn1-modules==0.3.0
# via service-identity
pycparser==2.21
# via cffi
pyopenssl==24.0.0
pyopenssl==24.2.1
# via twisted
requests==2.32.3
# via treq
Expand All @@ -68,9 +68,11 @@ six==1.16.0
# html5lib
sqlparse==0.4.4
# via django
tomli==2.0.1
# via incremental
treq==23.11.0
# via yarrharr (pyproject.toml)
twisted[tls]==24.3.0
twisted[tls]==24.7.0
# via
# treq
# twisted
Expand Down
2 changes: 1 addition & 1 deletion requirements_release.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cffi==1.15.1
# via cryptography
charset-normalizer==3.2.0
# via requests
cryptography==42.0.5
cryptography==43.0.0
# via secretstorage
docutils==0.20.1
# via readme-renderer
Expand Down
4 changes: 3 additions & 1 deletion requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ pytest-django==4.8.0
pytest-twisted==1.14.2
# via -r requirements_test.in
tomli==2.0.1
# via pytest
# via
# -c requirements.txt
# pytest

0 comments on commit 1a992ac

Please sign in to comment.