diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0cf90fe7..7025c78d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: jobs: lint: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 5 steps: @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: "3.12" - uses: actions/cache@v4 with: @@ -34,7 +34,7 @@ jobs: TOX_PARALLEL_NO_SPINNER: 1 docs: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 timeout-minutes: 5 steps: @@ -42,7 +42,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: "3.11" + python-version: "3.12" - uses: actions/cache@v4 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..d74e689d --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,54 @@ +name: Release + +on: + push: + tags: [ "treq-*" ] + pull_request: + branches: [ trunk ] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - run: pip install build twine + + - run: python3 -m build + + - run: twine check dist/*.* + + - uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/*.* + if-no-files-found: error + + pypi-publish: + runs-on: ubuntu-24.04 + if: startsWith(github.ref, 'refs/tags/treq-') + needs: [build] + + environment: + name: PyPI.org + url: https://pypi.org/project/treq + + permissions: + id-token: write + + steps: + + - uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9279ddb5..44c667e0 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,37 @@ Changelog .. towncrier release notes start +24.9.0 (2024-09-17) +=================== + +Features +-------- + +- treq now ships type annotations. (`#366 `__) +- The new :mod:`treq.cookies` module provides helper functions for working with `http.cookiejar.Cookie` and `CookieJar` objects. (`#384 `__) +- Python 3.13 is now supported. (`#391 `__) + + +Bugfixes +-------- + +- :mod:`treq.content.text_content()` no longer generates deprecation warnings due to use of the ``cgi`` module. (`#355 `__) + + +Deprecations and Removals +------------------------- + +- Mixing the *json* argument with *files* or *data* now raises `TypeError`. (`#297 `__) +- Passing non-string (`str` or `bytes`) values as part of a dict to the *headers* argument now results in a `TypeError`, as does passing any collection other than a `dict` or `Headers` instance. (`#302 `__) +- Support for Python 3.7 and PyPy 3.8, which have reached end of support, has been dropped. (`#378 `__) + + +Misc +---- + +- `#336 `__, `#382 `__, `#395 `__ + + 23.11.0 (2023-11-03) ==================== diff --git a/changelog.d/297.removal.rst b/changelog.d/297.removal.rst deleted file mode 100644 index f0cc78a1..00000000 --- a/changelog.d/297.removal.rst +++ /dev/null @@ -1 +0,0 @@ -Mixing the *json* argument with *files* or *data* now raises `TypeError`. diff --git a/changelog.d/302.removal.rst b/changelog.d/302.removal.rst deleted file mode 100644 index 81b8af11..00000000 --- a/changelog.d/302.removal.rst +++ /dev/null @@ -1 +0,0 @@ -Passing non-string (`str` or `bytes`) values as part of a dict to the *headers* argument now results in a `TypeError`, as does passing any collection other than a `dict` or `Headers` instance. diff --git a/changelog.d/336.misc.rst b/changelog.d/336.misc.rst deleted file mode 100644 index e69de29b..00000000 diff --git a/changelog.d/355.bugfix.rst b/changelog.d/355.bugfix.rst deleted file mode 100644 index 8e427ee0..00000000 --- a/changelog.d/355.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -:mod:`treq.content.text_content()` no longer generates deprecation warnings due to use of the ``cgi`` module. diff --git a/changelog.d/366.feature.rst b/changelog.d/366.feature.rst deleted file mode 100644 index 7fc34540..00000000 --- a/changelog.d/366.feature.rst +++ /dev/null @@ -1 +0,0 @@ -treq now ships type annotations. diff --git a/changelog.d/378.removal.rst b/changelog.d/378.removal.rst deleted file mode 100644 index 33af59ea..00000000 --- a/changelog.d/378.removal.rst +++ /dev/null @@ -1 +0,0 @@ -Support for Python 3.7 and PyPy 3.8, which have reached end of support, has been dropped. diff --git a/changelog.d/382.misc.rst b/changelog.d/382.misc.rst deleted file mode 100644 index e69de29b..00000000 diff --git a/changelog.d/384.feature.rst b/changelog.d/384.feature.rst deleted file mode 100644 index bf7d4903..00000000 --- a/changelog.d/384.feature.rst +++ /dev/null @@ -1 +0,0 @@ -The new :mod:`treq.cookies` module provides helper functions for working with `http.cookiejar.Cookie` and `CookieJar` objects. diff --git a/changelog.d/391.feature.rst b/changelog.d/391.feature.rst deleted file mode 100644 index 7ad97ba3..00000000 --- a/changelog.d/391.feature.rst +++ /dev/null @@ -1 +0,0 @@ -Python 3.13 is now supported. \ No newline at end of file diff --git a/changelog.d/395.misc.rst b/changelog.d/395.misc.rst deleted file mode 100644 index e69de29b..00000000 diff --git a/src/treq/_version.py b/src/treq/_version.py index a67f676d..60a2eecc 100644 --- a/src/treq/_version.py +++ b/src/treq/_version.py @@ -3,9 +3,9 @@ """ # This file is auto-generated! Do not edit! -# Use `python -m incremental.update treq` to change this file. +# Use `incremental` to change this file. from incremental import Version -__version__ = Version("treq", 23, 11, 0) +__version__ = Version("treq", 24, 9, 0) __all__ = ["__version__"] diff --git a/tox.ini b/tox.ini index 4c433d7f..1ce2bece 100644 --- a/tox.ini +++ b/tox.ini @@ -26,7 +26,7 @@ commands = {envbindir}/trial {posargs:treq} [testenv:mypy] -basepython = python3.8 +basepython = python3.12 deps = mypy==1.0.1 mypy-zope==0.9.1 @@ -38,27 +38,27 @@ commands = {posargs:src} [testenv:flake8] -python = python3.11 +python = python3.12 skip_install = True deps = flake8 commands = flake8 src/treq/ [testenv:towncrier] -python = python3.11 +python = python3.12 deps = towncrier commands = towncrier {posargs:--draft} [testenv:twine] -python = python3.11 +python = python3.12 deps = twine commands = twine check {distdir}/*.* [testenv:check-manifest] -python = python3.11 +python = python3.12 deps = check-manifest commands = @@ -67,7 +67,7 @@ commands = [testenv:docs] extras = docs changedir = docs -basepython = python3.8 +basepython = python3.12 commands = sphinx-build -b html . html