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/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2
with:
python-version: 3.9
python-version: 3.11

- run: |
pip install wheel
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
# tox's `precom` env pins python3.10, which only ubuntu-22.04 had preinstalled.
# tox's `precom` env pins python3.11.
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install tox
Expand All @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.11', '3.12', '3.13', '3.14', '3.15']
requests-version: ['"requests>=2.0,<3.0"']
urllib3-version: ['"urllib3<2"', '"urllib3>=2,<3.0"']

Expand Down
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Unreleased
----------

* Dropped support for Python 3.8, 3.9 and 3.10. Python 3.11 is now the minimum.
* Fixed ``fragment_identifier_matcher`` ignoring blank-valued fragment
parameters, which allowed missing or different parameters to match.
* Added Python 3.14 support (classifiers, tox envlist, and CI test matrix). See #810
* Added Python 3.14, and 3.15 (classifiers, tox envlist, and CI test matrix). See #810, #849
* Match response ``Content-Type`` header names case-insensitively so lowercase
headers do not produce duplicate content types or incorrect response decoding.
This also applies to headers returned by callbacks.
Expand Down
6 changes: 3 additions & 3 deletions README.es.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Una biblioteca utilitaria para simular (*mock*) la biblioteca Python ``requests`

.. note::

Responses requiere Python 3.8 o superior, y requests >= 2.30.0
Responses requiere Python 3.11 o superior, y requests >= 2.30.0


Tabla de Contenidos
Expand Down Expand Up @@ -1513,8 +1513,8 @@ Puedes ejecutar todas las pruebas con:

.. code-block:: shell

tox -e py38
tox -e py310
tox -e py311
tox -e py312

O activando manualmente la versión de Python requerida y ejecutando:

Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A utility library for mocking out the ``requests`` Python library.

.. note::

Responses requires Python 3.8 or newer, and requests >= 2.30.0
Responses requires Python 3.11 or newer, and requests >= 2.30.0


Table of Contents
Expand Down Expand Up @@ -1511,8 +1511,8 @@ testing. You can run all tests by:

.. code-block:: shell

tox -e py38
tox -e py310
tox -e py311
tox -e py312

OR manually activate required version of Python and run

Expand Down
4 changes: 2 additions & 2 deletions responses/matchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ def match(request: PreparedRequest) -> Tuple[bool, str]:

if not valid:
reason = (
"URL fragment identifier is different: " # type: ignore[str-bytes-safe]
f"{identifier} doesn't match {url_fragment}"
"URL fragment identifier is different: "
f"{identifier} doesn't match {url_fragment}" # type: ignore[str-bytes-safe]
)

return valid, reason
Expand Down
7 changes: 1 addition & 6 deletions responses/tests/test_recorder.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import tomllib as _toml
from pathlib import Path

import pytest
Expand All @@ -10,12 +11,6 @@
from responses._recorder import _dump
from responses._recorder import _remove_default_headers

try:
import tomli as _toml
except ImportError:
# python 3.11+
import tomllib as _toml # type: ignore[no-redef]


def get_data(host, port):
data = {
Expand Down
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"types-requests",
"mypy",
# for check of different parsers in recorder
"tomli; python_version < '3.11'",
"tomli-w",
]

Expand All @@ -54,7 +53,7 @@
"responses": ["py.typed"],
},
zip_safe=False,
python_requires=">=3.8",
python_requires=">=3.11",
install_requires=install_requires,
extras_require=extras_require,
classifiers=[
Expand All @@ -63,13 +62,11 @@
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Software Development",
],
)
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38,py39,py310,py311,py312,py313,py314,mypy,precom
envlist = py311,py312,py313,py314,py315,mypy,precom

[pytest]
filterwarnings =
Expand All @@ -14,15 +14,15 @@ commands =

[testenv:mypy]
description = Check types using 'mypy'
basepython = python3.10
basepython = python3.11
commands =
python -m mypy --config-file=mypy.ini -p responses
# see https://github.com/getsentry/responses/issues/556
python -m mypy --config-file=mypy.ini --namespace-packages -p responses

[testenv:precom]
description = Run pre-commit hooks (black, flake, etc)
basepython = python3.10
basepython = python3.11
deps = pre-commit>=2.9.2
commands =
pre-commit run --all-files
Loading