diff --git a/python/py-blinker/Portfile b/python/py-blinker/Portfile index 525acd94b8dfd..cc6d0d5fe8898 100644 --- a/python/py-blinker/Portfile +++ b/python/py-blinker/Portfile @@ -26,7 +26,7 @@ checksums sha256 b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d2313 rmd160 302002b7e179d736d153892a765a1528a18e8abb \ size 22460 -python.versions 27 39 310 311 312 313 +python.versions 27 39 310 311 312 313 314 if {${name} ne ${subport}} { if {${python.version} == 27} { diff --git a/python/py-jwt/Portfile b/python/py-jwt/Portfile index 215dbe943d0bf..1fd1a99e370b8 100644 --- a/python/py-jwt/Portfile +++ b/python/py-jwt/Portfile @@ -24,7 +24,7 @@ checksums rmd160 f1a9d4e75c91274ca1d1e44d03336597458f3b37 \ sha256 3cc5772eb20009233caf06e9d8a0577824723b44e6648ee0a2aedb6cf9381953 \ size 87785 -python.versions 27 39 310 311 312 313 +python.versions 27 39 310 311 312 313 314 if {${name} ne ${subport}} { depends_build-append \ diff --git a/python/py-oauthlib/Portfile b/python/py-oauthlib/Portfile index d6aaeec9b62f3..d7664f3ca36df 100644 --- a/python/py-oauthlib/Portfile +++ b/python/py-oauthlib/Portfile @@ -4,7 +4,7 @@ PortSystem 1.0 PortGroup python 1.0 name py-oauthlib -version 3.2.2 +version 3.3.1 revision 0 categories-append net security @@ -19,11 +19,11 @@ long_description {*}${description} homepage https://github.com/oauthlib/oauthlib -checksums rmd160 3ee553a54b366680ba7d1efb553f7b289720ae11 \ - sha256 9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918 \ - size 177352 +checksums rmd160 9f5c5042b109566409e0946a3761f41a0c5451fa \ + sha256 0f0f8aa759826a193cf66c12ea1af1637f87b9b4622d46e866952bb022e538c9 \ + size 185918 -python.versions 27 39 310 311 312 313 +python.versions 27 39 310 311 312 313 314 if {${name} ne ${subport}} { depends_build-append port:py${python.version}-setuptools @@ -35,9 +35,5 @@ if {${name} ne ${subport}} { depends_test-append \ port:py${python.version}-mock - patchfiles-append \ - 0001-Make-UtilsTests.test_filter_params-Python-3.13-compa.patch \ - 0002-Fix-CI-Errors-878.patch - test.run yes } diff --git a/python/py-oauthlib/files/0001-Make-UtilsTests.test_filter_params-Python-3.13-compa.patch b/python/py-oauthlib/files/0001-Make-UtilsTests.test_filter_params-Python-3.13-compa.patch deleted file mode 100644 index b740994b9b37b..0000000000000 --- a/python/py-oauthlib/files/0001-Make-UtilsTests.test_filter_params-Python-3.13-compa.patch +++ /dev/null @@ -1,40 +0,0 @@ -From fe020db74199d5284c00d7735aa7d4ddc90f5d61 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= -Date: Tue, 24 Oct 2023 15:08:10 +0200 -Subject: [PATCH] Make UtilsTests.test_filter_params Python 3.13+ compatible - -Since Python 3.13.0a1, docstrings are automatically dedented. -See https://github.com/python/cpython/issues/81283 -and https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes - -As a result, using a docstring with leading space as a test case -breaks the test assumption. - -The initial commit which introduced this test a decade ago -(6c0c7914f3a57823834b1be492b307992f943629) -does not specify why testing the spaces is important. ---- - tests/oauth1/rfc5849/test_utils.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git tests/oauth1/rfc5849/test_utils.py tests/oauth1/rfc5849/test_utils.py -index 013c71a910da..2212890819fc 100644 ---- tests/oauth1/rfc5849/test_utils.py -+++ tests/oauth1/rfc5849/test_utils.py -@@ -53,11 +53,11 @@ class UtilsTests(TestCase): - # The following is an isolated test function used to test the filter_params decorator. - @filter_params - def special_test_function(params, realm=None): -- """ I am a special test function """ -+ """I am a special test function""" - return 'OAuth ' + ','.join(['='.join([k, v]) for k, v in params]) - - # check that the docstring got through -- self.assertEqual(special_test_function.__doc__, " I am a special test function ") -+ self.assertEqual(special_test_function.__doc__, "I am a special test function") - - # Check that the decorator filtering works as per design. - # Any param that does not start with 'oauth' --- -2.47.0 - diff --git a/python/py-oauthlib/files/0002-Fix-CI-Errors-878.patch b/python/py-oauthlib/files/0002-Fix-CI-Errors-878.patch deleted file mode 100644 index 7b5addaf609bc..0000000000000 --- a/python/py-oauthlib/files/0002-Fix-CI-Errors-878.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 3ba8fd6109ac1f9314215f3373027d86c032dffc Mon Sep 17 00:00:00 2001 -From: Shawn Zivontsis -Date: Tue, 13 Aug 2024 01:25:31 -0400 -Subject: [PATCH] Fix CI Errors (#878) - -* Fix new exception type for invalid key - -* Fix ruff now needs check command - -* Fix DeprecationWarning in test - -* Fix/ignore linter errors - -* Update codespell ignore list ---- - tests/oauth1/rfc5849/test_signatures.py | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git tests/oauth1/rfc5849/test_signatures.py tests/oauth1/rfc5849/test_signatures.py -index 0dd2859a218e..2c4ce3df96c2 100644 ---- tests/oauth1/rfc5849/test_signatures.py -+++ tests/oauth1/rfc5849/test_signatures.py -@@ -1,4 +1,5 @@ - # -*- coding: utf-8 -*- -+from jwt import InvalidKeyError - from oauthlib.oauth1.rfc5849.signature import ( - base_string_uri, collect_parameters, normalize_parameters, - sign_hmac_sha1_with_client, sign_hmac_sha256_with_client, -@@ -765,12 +766,17 @@ MmgDHR2tt8KeYTSgfU+BAkBcaVF91EQ7VXhvyABNYjeYP7lU7orOgdWMa/zbLXSU - - # Signing needs a private key - -- for bad_value in [None, '', 'foobar']: -+ for bad_value in [None, '']: - self.assertRaises(ValueError, - sign_rsa_sha1_with_client, - self.eg_signature_base_string, - MockClient(rsa_key=bad_value)) - -+ self.assertRaises(InvalidKeyError, -+ sign_rsa_sha1_with_client, -+ self.eg_signature_base_string, -+ MockClient(rsa_key='foobar')) -+ - self.assertRaises(AttributeError, - sign_rsa_sha1_with_client, - self.eg_signature_base_string, --- -2.47.0 - diff --git a/python/py-requests-oauthlib/Portfile b/python/py-requests-oauthlib/Portfile index b9a065a2c2e48..02ca49344098c 100644 --- a/python/py-requests-oauthlib/Portfile +++ b/python/py-requests-oauthlib/Portfile @@ -22,7 +22,7 @@ checksums rmd160 5745b9c2ca02e8a1a07380c05c45ab5e34bebf8a \ sha256 91dedcfb4d577aaba88122496d16927150accf12b641f9d75078c59b66171a66 \ size 51366 -python.versions 27 310 311 312 313 +python.versions 27 310 311 312 313 314 if {${name} ne ${subport}} { depends_build-append \ @@ -34,10 +34,11 @@ if {${name} ne ${subport}} { depends_test-append \ port:py${python.version}-mock \ - port:py${python.version}-requests-mock + port:py${python.version}-requests-mock \ + port:py${python.version}-selenium patchfiles-append \ - patch-no_selenium_tests.diff + patch-oauthlib_3.3.0_expires_test_fix.diff test.run yes diff --git a/python/py-requests-oauthlib/files/patch-no_selenium_tests.diff b/python/py-requests-oauthlib/files/patch-no_selenium_tests.diff deleted file mode 100644 index 4c85c346614c0..0000000000000 --- a/python/py-requests-oauthlib/files/patch-no_selenium_tests.diff +++ /dev/null @@ -1,121 +0,0 @@ -From af35e7a110268a7f5112aef79c068652358cec67 Mon Sep 17 00:00:00 2001 -From: Mark Mentovai -Date: Tue, 29 Oct 2024 11:23:34 -0400 -Subject: [PATCH] Disable Selenium WebDriver-based test -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As of this writing, MacPorts’ py-selenium package is quite outdated -(4.3.0, 2022-06-23 vs. current 4.25.0, 2024-09-20) and does not support -recent Python versions (through 3.10 vs. current 3.13). Selenium is a -tricky upgrade, so just disable the one test that uses Selenium. ---- - tests/examples/base.py | 40 -------------------- - tests/examples/test_native_spa_pkce_auth0.py | 39 ------------------- - 2 files changed, 79 deletions(-) - delete mode 100644 tests/examples/test_native_spa_pkce_auth0.py - -diff --git tests/examples/base.py tests/examples/base.py -index 2efa5dd74653..1e3d436bfd2d 100644 ---- tests/examples/base.py -+++ tests/examples/base.py -@@ -3,11 +3,6 @@ import os - import subprocess - import shlex - import shutil --from selenium import webdriver --from selenium.webdriver.common.by import By --from selenium.webdriver.common.keys import Keys --from selenium.webdriver.support import expected_conditions as EC --from selenium.webdriver.support.wait import WebDriverWait - - - cwd = os.path.dirname(os.path.realpath(__file__)) -@@ -69,38 +64,3 @@ class Sample(): - self.assertTrue(False, "timeout when looking for output") - return self.outputs[-1] - -- -- --class Browser(): -- def setUp(self): -- super().setUp() -- options = webdriver.ChromeOptions() -- options.add_argument("--headless=new") -- self.driver = webdriver.Chrome(options=options) -- self.user_username = os.environ.get("AUTH0_USERNAME") -- self.user_password = os.environ.get("AUTH0_PASSWORD") -- -- if not self.user_username or not self.user_password: -- self.skipTest("auth0 is not configured properly") -- -- def tearDown(self): -- super().tearDown() -- self.driver.quit() -- -- def authorize_auth0(self, authorize_url, expected_redirect_uri): -- self.driver.get(authorize_url) -- username = self.driver.find_element(By.ID, "username") -- password = self.driver.find_element(By.ID, "password") -- -- wait = WebDriverWait(self.driver, timeout=2) -- wait.until(lambda d : username.is_displayed()) -- wait.until(lambda d : password.is_displayed()) -- -- username.clear() -- username.send_keys(self.user_username) -- password.send_keys(self.user_password) -- username.send_keys(Keys.RETURN) -- -- wait.until(EC.url_contains(expected_redirect_uri)) -- return self.driver.current_url -- -diff --git tests/examples/test_native_spa_pkce_auth0.py tests/examples/test_native_spa_pkce_auth0.py -deleted file mode 100644 -index 6ff41e251ca4..000000000000 ---- tests/examples/test_native_spa_pkce_auth0.py -+++ /dev/null -@@ -1,39 +0,0 @@ --import os --import unittest -- --from . import base -- --class TestNativeAuth0Test(base.Sample, base.Browser, unittest.TestCase): -- def setUp(self): -- super().setUp() -- self.client_id = os.environ.get("AUTH0_PKCE_CLIENT_ID") -- self.idp_domain = os.environ.get("AUTH0_DOMAIN") -- -- if not self.client_id or not self.idp_domain: -- self.skipTest("native auth0 is not configured properly") -- -- def test_login(self): -- # redirect_uri is http:// -- os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = "1" -- -- self.run_sample( -- "native_spa_pkce_auth0.py", { -- "OAUTH_CLIENT_ID": self.client_id, -- "OAUTH_IDP_DOMAIN": self.idp_domain, -- } -- ) -- authorize_url = self.wait_for_pattern("https://") -- redirect_uri = self.authorize_auth0(authorize_url, "http://") -- self.write(redirect_uri) -- last_line = self.wait_for_end() -- -- import ast -- response = ast.literal_eval(last_line) -- self.assertIn("access_token", response) -- self.assertIn("id_token", response) -- self.assertIn("scope", response) -- self.assertIn("openid", response["scope"]) -- self.assertIn("expires_in", response) -- self.assertIn("expires_at", response) -- self.assertIn("token_type", response) -- self.assertEqual("Bearer", response["token_type"]) --- -2.47.0 - diff --git a/python/py-requests-oauthlib/files/patch-oauthlib_3.3.0_expires_test_fix.diff b/python/py-requests-oauthlib/files/patch-oauthlib_3.3.0_expires_test_fix.diff new file mode 100644 index 0000000000000..2cf8b167a663c --- /dev/null +++ b/python/py-requests-oauthlib/files/patch-oauthlib_3.3.0_expires_test_fix.diff @@ -0,0 +1,34 @@ +From b1dd93c5d024500b6236dea06734d6e6482c3565 Mon Sep 17 00:00:00 2001 +From: Jonathan Huot +Date: Thu, 12 Jun 2025 20:06:32 +0200 +Subject: [PATCH] Updated tests to support 3.3.0/changes rel. to expires_at + +--- + tests/test_compliance_fixes.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git tests/test_compliance_fixes.py tests/test_compliance_fixes.py +index c5166bdb2fcb..9ad6d0995b33 100644 +--- tests/test_compliance_fixes.py ++++ tests/test_compliance_fixes.py +@@ -115,7 +115,7 @@ class MailChimpComplianceFixTest(TestCase): + authorization_response="https://i.b/?code=hello", + ) + # Times should be close +- approx_expires_at = time.time() + 3600 ++ approx_expires_at = round(time.time()) + 3600 + actual_expires_at = token.pop("expires_at") + self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2) + +@@ -289,7 +289,7 @@ class PlentymarketsComplianceFixTest(TestCase): + authorization_response="https://i.b/?code=hello", + ) + +- approx_expires_at = time.time() + 86400 ++ approx_expires_at = round(time.time()) + 86400 + actual_expires_at = token.pop("expires_at") + self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2) + +-- +2.52.0 + diff --git a/python/py-selenium/Portfile b/python/py-selenium/Portfile index c0c4110730bb8..de5b7f8aa38da 100644 --- a/python/py-selenium/Portfile +++ b/python/py-selenium/Portfile @@ -4,7 +4,7 @@ PortSystem 1.0 PortGroup python 1.0 name py-selenium -version 4.32.0 +version 4.38.0 revision 0 license Apache-2 @@ -20,19 +20,20 @@ long_description The selenium package is used to automate web \ homepage https://www.seleniumhq.org/ -python.versions 310 311 312 313 +python.versions 310 311 312 313 314 python.pep517_backend if {${name} ne ${subport}} { depends_run-append \ - port:py${python.version}-urllib3 + port:py${python.version}-urllib3 \ + port:py${python.version}-websocket-client - master_sites https://files.pythonhosted.org/packages/ea/37/d07ed9d13e571b2115d4ed6956d156c66816ceec0b03b2e463e80d09f572 + master_sites https://files.pythonhosted.org/packages/8a/d3/76c8f4a8d99b9f1ebcf9a611b4dd992bf5ee082a6093cfc649af3d10f35b distname selenium-${version}-py3-none-any - checksums rmd160 0a5fbdb3007f23d803ecec76dd06844788953474 \ - sha256 c4d9613f8a45693d61530c9660560fadb52db7d730237bc788ddedf442391f97 \ - size 9369668 + checksums rmd160 d4a67ac8fd17daf321e605d2423856f4b2d55867 \ + sha256 ed47563f188130a6fd486b327ca7ba48c5b11fb900e07d6457befdde320e35fd \ + size 9694571 extract.suffix .whl extract.only diff --git a/python/py-socks/Portfile b/python/py-socks/Portfile index fbda0e4f2acfc..19b42d387b58a 100644 --- a/python/py-socks/Portfile +++ b/python/py-socks/Portfile @@ -18,7 +18,7 @@ description python SOCKS client module long_description PySOCKS is a SOCKS client module, branched off several \ earlier abandoned projects -python.versions 27 39 310 311 312 313 +python.versions 27 39 310 311 312 313 314 checksums rmd160 61b783fd0d1654186536bddc1e7dd3e1890ffb32 \ sha256 85b0e9271c46278e3970b619211c0d99584288825819cd51305d6e328a224f92 \ diff --git a/python/py-websocket-client/Portfile b/python/py-websocket-client/Portfile index 65af940a8c3ef..5725682cbb402 100644 --- a/python/py-websocket-client/Portfile +++ b/python/py-websocket-client/Portfile @@ -26,7 +26,7 @@ checksums rmd160 21cebe24ac88e337db6a5303109517751cbd2a04 \ sha256 9e813624b6eb619999a97dc7958469217c3176312b3a16a4bd1bc7e08a46ec98 \ size 70576 -python.versions 39 310 311 312 313 +python.versions 39 310 311 312 313 314 if {${subport} ne ${name}} { depends_test-append \