Skip to content

Commit d60ed39

Browse files
markmentovaireneeotten
authored andcommitted
py-requests-oauthlib: add py314 subport
1 parent 32ce4d0 commit d60ed39

File tree

3 files changed

+38
-124
lines changed

3 files changed

+38
-124
lines changed

python/py-requests-oauthlib/Portfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ checksums rmd160 5745b9c2ca02e8a1a07380c05c45ab5e34bebf8a \
2222
sha256 91dedcfb4d577aaba88122496d16927150accf12b641f9d75078c59b66171a66 \
2323
size 51366
2424

25-
python.versions 27 310 311 312 313
25+
python.versions 27 310 311 312 313 314
2626

2727
if {${name} ne ${subport}} {
2828
depends_build-append \
@@ -34,10 +34,11 @@ if {${name} ne ${subport}} {
3434

3535
depends_test-append \
3636
port:py${python.version}-mock \
37-
port:py${python.version}-requests-mock
37+
port:py${python.version}-requests-mock \
38+
port:py${python.version}-selenium
3839

3940
patchfiles-append \
40-
patch-no_selenium_tests.diff
41+
patch-oauthlib_3.3.0_expires_test_fix.diff
4142

4243
test.run yes
4344

python/py-requests-oauthlib/files/patch-no_selenium_tests.diff

Lines changed: 0 additions & 121 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From b1dd93c5d024500b6236dea06734d6e6482c3565 Mon Sep 17 00:00:00 2001
2+
From: Jonathan Huot <[email protected]>
3+
Date: Thu, 12 Jun 2025 20:06:32 +0200
4+
Subject: [PATCH] Updated tests to support 3.3.0/changes rel. to expires_at
5+
6+
---
7+
tests/test_compliance_fixes.py | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git tests/test_compliance_fixes.py tests/test_compliance_fixes.py
11+
index c5166bdb2fcb..9ad6d0995b33 100644
12+
--- tests/test_compliance_fixes.py
13+
+++ tests/test_compliance_fixes.py
14+
@@ -115,7 +115,7 @@ class MailChimpComplianceFixTest(TestCase):
15+
authorization_response="https://i.b/?code=hello",
16+
)
17+
# Times should be close
18+
- approx_expires_at = time.time() + 3600
19+
+ approx_expires_at = round(time.time()) + 3600
20+
actual_expires_at = token.pop("expires_at")
21+
self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2)
22+
23+
@@ -289,7 +289,7 @@ class PlentymarketsComplianceFixTest(TestCase):
24+
authorization_response="https://i.b/?code=hello",
25+
)
26+
27+
- approx_expires_at = time.time() + 86400
28+
+ approx_expires_at = round(time.time()) + 86400
29+
actual_expires_at = token.pop("expires_at")
30+
self.assertAlmostEqual(actual_expires_at, approx_expires_at, places=2)
31+
32+
--
33+
2.52.0
34+

0 commit comments

Comments
 (0)