From c7f6ee6b2ecd6ae802e1a5706de2c74652f0474e Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Mon, 8 Jul 2024 11:42:01 +0100 Subject: [PATCH 1/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ff623d..223405c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] # , 'pypy3.10' + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta.3'] # , 'pypy3.10' steps: - uses: actions/checkout@v4 From a4a1e07369860c800de59e1b1f11d6ec10f6327d Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Tue, 23 Jul 2024 12:55:14 +0100 Subject: [PATCH 2/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 223405c..1e8821e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta.3'] # , 'pypy3.10' + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta.4'] # , 'pypy3.10' steps: - uses: actions/checkout@v4 From 7a68f3cd1c65092af17d857a1c69713b36ce3b52 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Sat, 10 Aug 2024 11:17:28 +0100 Subject: [PATCH 3/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1e8821e..ce869b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta.4'] # , 'pypy3.10' + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', ' 3.13.0-rc.1', 'pypy3.10'] steps: - uses: actions/checkout@v4 From 74d545eea38d90f104f9de114ff7f9928b4f62be Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Thu, 12 Sep 2024 16:43:53 +0100 Subject: [PATCH 4/7] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce869b3..1f1c8ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', ' 3.13.0-rc.1', 'pypy3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', ' 3.13.0-rc.2', 'pypy3.10'] steps: - uses: actions/checkout@v4 From 6660c03733e141d79bad195e36f35bd9def1d6ee Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Sun, 15 Sep 2024 17:14:21 +0200 Subject: [PATCH 5/7] Adding `Python 3.13`. --- mocket/mocket.py | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mocket/mocket.py b/mocket/mocket.py index cca0a4c..25f4b55 100644 --- a/mocket/mocket.py +++ b/mocket/mocket.py @@ -64,7 +64,7 @@ true_socketpair = socket.socketpair true_ssl_wrap_socket = getattr( ssl, "wrap_socket", None -) # in Py3.12 it's only under SSLContext +) # from Py3.12 it's only under SSLContext true_ssl_socket = ssl.SSLSocket true_ssl_context = ssl.SSLContext true_inet_pton = socket.inet_pton diff --git a/pyproject.toml b/pyproject.toml index 34e887b..cdb4d9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development", From 2584e22b659490ffccb179596d6bb6cca63250ae Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Mon, 16 Sep 2024 09:27:41 +0200 Subject: [PATCH 6/7] Fix for tests. --- mocket/mocket.py | 3 ++- tests/main/test_http.py | 12 ++++++++++-- tests/main/test_http_with_xxhash.py | 12 ++++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/mocket/mocket.py b/mocket/mocket.py index 25f4b55..daa0e60 100644 --- a/mocket/mocket.py +++ b/mocket/mocket.py @@ -83,6 +83,7 @@ def __set__(self, *args): minimum_version = FakeSetter() options = FakeSetter() verify_mode = FakeSetter() + verify_flags = FakeSetter() class FakeSSLContext(SuperFakeSSLContext): @@ -102,7 +103,7 @@ def check_hostname(self): return self._check_hostname @check_hostname.setter - def check_hostname(self, *args): + def check_hostname(self, _): self._check_hostname = False def __init__(self, sock=None, server_hostname=None, _context=None, *args, **kwargs): diff --git a/tests/main/test_http.py b/tests/main/test_http.py index 21fe448..d335bcc 100644 --- a/tests/main/test_http.py +++ b/tests/main/test_http.py @@ -308,10 +308,18 @@ def test_request_bodies(self): @mocketize(truesocket_recording_dir=os.path.dirname(__file__)) def test_truesendall_with_dump_from_recording(self): requests.get( - "http://httpbin.local/ip", headers={"user-agent": "Fake-User-Agent"} + "http://httpbin.local/ip", + headers={ + "user-agent": "Fake-User-Agent", + "Accept-Encoding": "gzip, deflate, zstd", + }, ) requests.get( - "http://httpbin.local/gzip", headers={"user-agent": "Fake-User-Agent"} + "http://httpbin.local/gzip", + headers={ + "user-agent": "Fake-User-Agent", + "Accept-Encoding": "gzip, deflate, zstd", + }, ) dump_filename = os.path.join( diff --git a/tests/main/test_http_with_xxhash.py b/tests/main/test_http_with_xxhash.py index 4600bf3..a074a86 100644 --- a/tests/main/test_http_with_xxhash.py +++ b/tests/main/test_http_with_xxhash.py @@ -11,10 +11,18 @@ class HttpEntryTestCase(HttpTestCase): @mocketize(truesocket_recording_dir=os.path.dirname(__file__)) def test_truesendall_with_dump_from_recording(self): requests.get( - "http://httpbin.local/ip", headers={"user-agent": "Fake-User-Agent"} + "http://httpbin.local/ip", + headers={ + "user-agent": "Fake-User-Agent", + "Accept-Encoding": "gzip, deflate, zstd", + }, ) requests.get( - "http://httpbin.local/gzip", headers={"user-agent": "Fake-User-Agent"} + "http://httpbin.local/gzip", + headers={ + "user-agent": "Fake-User-Agent", + "Accept-Encoding": "gzip, deflate, zstd", + }, ) dump_filename = os.path.join( From bc68afe905d1282ab4e1938b6a90a864a8b0ecf6 Mon Sep 17 00:00:00 2001 From: Giorgio Salluzzo Date: Mon, 16 Sep 2024 10:06:32 +0200 Subject: [PATCH 7/7] Bump version --- mocket/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mocket/__init__.py b/mocket/__init__.py index 6335ce8..0028485 100644 --- a/mocket/__init__.py +++ b/mocket/__init__.py @@ -3,4 +3,4 @@ __all__ = ("async_mocketize", "mocketize", "Mocket", "MocketEntry", "Mocketizer") -__version__ = "3.12.9" +__version__ = "3.13.0"