From d8ef911ba70c5342d11d90c60d6ade5009b838bf Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 27 Sep 2022 21:39:49 -0500 Subject: [PATCH 01/28] PYTHON-3347 Test against Python 3.11 beta --- .evergreen/config.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 9d016f4d8a..bf139bad01 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2061,6 +2061,10 @@ axes: display_name: "Python 3.10" variables: PYTHON_BINARY: "/opt/python/3.10/bin/python3" + - id: "3.11" + display_name: "Python 3.11" + variables: + PYTHON_BINARY: "/opt/python/3.11/bin/python3" - id: "pypy3.7" display_name: "PyPy 3.7" variables: @@ -2097,6 +2101,10 @@ axes: display_name: "Python 3.10" variables: PYTHON_BINARY: "C:/python/Python310/python.exe" + - id: "3.11" + display_name: "Python 3.11" + variables: + PYTHON_BINARY: "C:/python/Python311/python.exe" - id: python-version-windows-32 display_name: "Python" @@ -2117,6 +2125,10 @@ axes: display_name: "32-bit Python 3.10" variables: PYTHON_BINARY: "C:/python/32/Python310/python.exe" + - id: "3.11" + display_name: "32-bit Python 3.11" + variables: + PYTHON_BINARY: "C:/python/32/Python311/python.exe" # Choice of mod_wsgi version - id: mod-wsgi-version From 2d7ad60af8510e4f868a6c895496ad444bc7640c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 27 Sep 2022 21:54:59 -0500 Subject: [PATCH 02/28] debug print --- .evergreen/run-tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 9a0eb25e00..039515107f 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -34,6 +34,9 @@ LIBMONGOCRYPT_URL=${LIBMONGOCRYPT_URL:-} DATA_LAKE=${DATA_LAKE:-} TEST_ARGS="" +echo "HI HI HI" +ls /opt/python + if [ -n "$COMPRESSORS" ]; then export COMPRESSORS=$COMPRESSORS fi From 2074a05eba3ce527deaa09ef56cd67da5889427f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 5 Oct 2022 15:03:08 -0500 Subject: [PATCH 03/28] undo changes --- .evergreen/run-tests.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 039515107f..9a0eb25e00 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -34,9 +34,6 @@ LIBMONGOCRYPT_URL=${LIBMONGOCRYPT_URL:-} DATA_LAKE=${DATA_LAKE:-} TEST_ARGS="" -echo "HI HI HI" -ls /opt/python - if [ -n "$COMPRESSORS" ]; then export COMPRESSORS=$COMPRESSORS fi From 68c5e2e82ef42de01c80a71b202d4c385258a763 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 6 Oct 2022 11:45:13 -0500 Subject: [PATCH 04/28] python 3.11 fixes --- pymongo/topology_description.py | 2 +- test/test_bson.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pymongo/topology_description.py b/pymongo/topology_description.py index b32a86e2d7..327a9c62e7 100644 --- a/pymongo/topology_description.py +++ b/pymongo/topology_description.py @@ -494,7 +494,7 @@ def _updated_topology_description_srv_polling(topology_description, seedlist): new_hosts = set(seedlist) - set(sds.keys()) n_to_add = topology_description.srv_max_hosts - len(sds) if n_to_add > 0: - seedlist = sample(new_hosts, min(n_to_add, len(new_hosts))) + seedlist = sample(sorted(new_hosts), min(n_to_add, len(new_hosts))) else: seedlist = [] # Add SDs corresponding to servers recently added to the SRV record. diff --git a/test/test_bson.py b/test/test_bson.py index a8fd1fef45..60e8469e40 100644 --- a/test/test_bson.py +++ b/test/test_bson.py @@ -982,6 +982,10 @@ def test_codec_options_repr(self): "fallback_encoder=None), " "datetime_conversion=DatetimeConversion.DATETIME)" ) + # The repr() of an enum changed in Python 3.11. + if sys.version_info >= (3, 11): + r = r.replace("DatetimeConversion.DATETIME", str(DatetimeConversion.DATETIME)) + self.assertEqual(r, repr(CodecOptions())) def test_decode_all_defaults(self): From 8db3bcbbe2ac995db0148586fbfe5467f9733e0c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 6 Oct 2022 14:33:36 -0500 Subject: [PATCH 05/28] address regression and add trove classifier --- setup.py | 1 + test/test_client.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 524c1303e6..028a7db61f 100755 --- a/setup.py +++ b/setup.py @@ -330,6 +330,7 @@ def build_extension(self, ext): "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Database", diff --git a/test/test_client.py b/test/test_client.py index 7e7e14c0e5..5bb116dbda 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -1641,7 +1641,8 @@ def server_description_count(): # If a bug like PYTHON-2433 is reintroduced then too many # ServerDescriptions will be kept alive and this test will fail: # AssertionError: 19 != 46 within 15 delta (27 difference) - self.assertAlmostEqual(initial_count, final_count, delta=15) + # On Python 3.11 we seem to get more of a delta. + self.assertAlmostEqual(initial_count, final_count, delta=20) @client_context.require_failCommand_fail_point def test_network_error_message(self): From 6b430849e93813d59b290433fa71655b56e18f9f Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Oct 2022 13:17:15 -0500 Subject: [PATCH 06/28] install green framework from pip --- .evergreen/run-tests.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 9a0eb25e00..c375ae2303 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -220,5 +220,7 @@ if [ -z "$GREEN_FRAMEWORK" ]; then $PYTHON $COVERAGE_ARGS setup.py $C_EXTENSIONS test $TEST_ARGS $OUTPUT else # --no_ext has to come before "test" so there is no way to toggle extensions here. + # Install the framework from pip. + $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 0ba77d6ea268e318e5528534b5340caf34753651 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Oct 2022 13:18:41 -0500 Subject: [PATCH 07/28] address review --- bson/codec_options.py | 2 +- test/test_bson.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bson/codec_options.py b/bson/codec_options.py index efba8af78d..3c0a976a1b 100644 --- a/bson/codec_options.py +++ b/bson/codec_options.py @@ -199,7 +199,7 @@ def __eq__(self, other: Any) -> Any: ) -class DatetimeConversion(enum.IntEnum): +class DatetimeConversion(int, enum.Enum): """Options for decoding BSON datetimes.""" DATETIME = 1 diff --git a/test/test_bson.py b/test/test_bson.py index 60e8469e40..a8fd1fef45 100644 --- a/test/test_bson.py +++ b/test/test_bson.py @@ -982,10 +982,6 @@ def test_codec_options_repr(self): "fallback_encoder=None), " "datetime_conversion=DatetimeConversion.DATETIME)" ) - # The repr() of an enum changed in Python 3.11. - if sys.version_info >= (3, 11): - r = r.replace("DatetimeConversion.DATETIME", str(DatetimeConversion.DATETIME)) - self.assertEqual(r, repr(CodecOptions())) def test_decode_all_defaults(self): From dfdd7c5209923b7b6335f6da7b7bcd0b9bf56713 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Oct 2022 14:05:54 -0500 Subject: [PATCH 08/28] try setting flags --- .evergreen/run-tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index c375ae2303..d65b768713 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -221,6 +221,7 @@ if [ -z "$GREEN_FRAMEWORK" ]; then else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. - $PYTHON -m pip install $GREEN_FRAMEWORK + # Use the same flags as the ones used by gevent, in case we have to build the wheel. + CFLAGS="-O3 -pipe -Wno-strict-aliasing -Wno-comment" CPPFLAGS="-DEV_VERIFY=1" $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 6796d431b1a5ba83773c60f10fa7753a312d0b8c Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Oct 2022 16:43:01 -0500 Subject: [PATCH 09/28] run green framework on ubuntu 20.04 --- .evergreen/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index bf139bad01..d097c40a94 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2506,7 +2506,7 @@ buildvariants: - matrix_name: "tests-python-version-green-framework-ubuntu18" matrix_spec: - platform: ubuntu-18.04 + platform: ubuntu-20.04 python-version: "*" green-framework: "*" auth-ssl: "*" From a78200ca553083a86c0951ac984e0800c89864a7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 10 Oct 2022 16:43:58 -0500 Subject: [PATCH 10/28] fix matrix --- .evergreen/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index d097c40a94..15f1be3e3a 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2504,7 +2504,7 @@ buildvariants: - "test-4.0-standalone" - "test-3.6-standalone" -- matrix_name: "tests-python-version-green-framework-ubuntu18" +- matrix_name: "tests-python-version-green-framework-ubuntu20" matrix_spec: platform: ubuntu-20.04 python-version: "*" @@ -2512,7 +2512,7 @@ buildvariants: auth-ssl: "*" exclude_spec: # Don't test green frameworks on these Python versions. - - platform: ubuntu-18.04 + - platform: ubuntu-20.04 python-version: ["pypy3.7", "pypy3.8"] green-framework: "*" auth-ssl: "*" From e0c7123184b8bb0f494704e6880ed61ed5cb7b56 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 10:29:06 -0500 Subject: [PATCH 11/28] try adding deps --- .evergreen/run-tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index d65b768713..22d355d999 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,6 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. + pip install cython>=3.0a9 greenlet>=1.0a1,<2 CFLAGS="-O3 -pipe -Wno-strict-aliasing -Wno-comment" CPPFLAGS="-DEV_VERIFY=1" $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 912309ebeff9f1225a5e654e36669d4106fbf739 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 10:39:16 -0500 Subject: [PATCH 12/28] fix pip install --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 22d355d999..859b566d8c 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - pip install cython>=3.0a9 greenlet>=1.0a1,<2 + $PYTHON -m pip install cython>=3.0a9 greenlet>=1.0a1,<2 CFLAGS="-O3 -pipe -Wno-strict-aliasing -Wno-comment" CPPFLAGS="-DEV_VERIFY=1" $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 47558ddf0f8630706024aef7c92145364c5f5178 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 10:52:14 -0500 Subject: [PATCH 13/28] fix install --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 859b566d8c..42a796b8bb 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install cython>=3.0a9 greenlet>=1.0a1,<2 + $PYTHON -m pip install "cython>=3.0a9" "greenlet>=1.0a1,<2" CFLAGS="-O3 -pipe -Wno-strict-aliasing -Wno-comment" CPPFLAGS="-DEV_VERIFY=1" $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 98cca28e6bd4d5fe0ed9d3cf6d2e388905c29f69 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 11:49:03 -0500 Subject: [PATCH 14/28] try with less strict deps --- .evergreen/run-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 42a796b8bb..dc6e4d4dab 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install "cython>=3.0a9" "greenlet>=1.0a1,<2" - CFLAGS="-O3 -pipe -Wno-strict-aliasing -Wno-comment" CPPFLAGS="-DEV_VERIFY=1" $PYTHON -m pip install $GREEN_FRAMEWORK + $PYTHON -m pip install --upgrade "cython" "greenlet" + $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 2f2d429a2a8d08ea50bef96ed64f488cbbd9796b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 12:43:13 -0500 Subject: [PATCH 15/28] try upgrading pip and wheel --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index dc6e4d4dab..867f59d896 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --upgrade "cython" "greenlet" + $PYTHON -m pip install --upgrade pip wheel $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From c7b2aa6318c54b5f059a3438b8ff022715696047 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 12:50:23 -0500 Subject: [PATCH 16/28] try upgrading setuptools --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 867f59d896..4023f83932 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --upgrade pip wheel + $PYTHON -m pip install --upgrade pip wheel setuptools $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 57954a1e626f9025b7bb13464446f29961ab3a7a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 14:13:32 -0500 Subject: [PATCH 17/28] return to ubuntu 18 --- .evergreen/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 15f1be3e3a..bf139bad01 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -2504,15 +2504,15 @@ buildvariants: - "test-4.0-standalone" - "test-3.6-standalone" -- matrix_name: "tests-python-version-green-framework-ubuntu20" +- matrix_name: "tests-python-version-green-framework-ubuntu18" matrix_spec: - platform: ubuntu-20.04 + platform: ubuntu-18.04 python-version: "*" green-framework: "*" auth-ssl: "*" exclude_spec: # Don't test green frameworks on these Python versions. - - platform: ubuntu-20.04 + - platform: ubuntu-18.04 python-version: ["pypy3.7", "pypy3.8"] green-framework: "*" auth-ssl: "*" From dfe75f1e4882996f52daa54181aeaf6186c01aff Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 14:18:56 -0500 Subject: [PATCH 18/28] add py311 to release --- .evergreen/config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index bf139bad01..2c8e3a8001 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1050,6 +1050,10 @@ tasks: tags: ["release_tag"] run_on: macos-1100 commands: + - func: "build release" + vars: + VERSION: "3.11" + ENSURE_UNIVERSAL2: "1" - func: "build release" vars: VERSION: "3.10" From 0d460734fa9932ebf4964e98f3cc1745b52a1e59 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 14:25:34 -0500 Subject: [PATCH 19/28] debug release mac --- .evergreen/build-mac.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.evergreen/build-mac.sh b/.evergreen/build-mac.sh index 270c92b59a..51005a9a94 100755 --- a/.evergreen/build-mac.sh +++ b/.evergreen/build-mac.sh @@ -9,6 +9,7 @@ mkdir -p validdist mv dist/* validdist || true VERSION=${VERSION:-3.10} +ls /Library/Frameworks/Python.framework/Versions/ PYTHON=/Library/Frameworks/Python.framework/Versions/$VERSION/bin/python3 rm -rf build From f401735f6a299cd885d8afed584ef029aada223e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 14:43:22 -0500 Subject: [PATCH 20/28] debug release windows --- .evergreen/build-windows.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.evergreen/build-windows.sh b/.evergreen/build-windows.sh index 09f5e7f0b4..ed111d79b4 100755 --- a/.evergreen/build-windows.sh +++ b/.evergreen/build-windows.sh @@ -8,6 +8,8 @@ rm -rf validdist mkdir -p validdist mv dist/* validdist || true +ls C:/Python/ + for VERSION in 37 38 39 310; do _pythons=("C:/Python/Python${VERSION}/python.exe" \ "C:/Python/32/Python${VERSION}/python.exe") From 6b78490dac611f5797daf8fcd898024e37c4471a Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 17:10:44 -0500 Subject: [PATCH 21/28] cleanup --- .evergreen/build-mac.sh | 2 +- .evergreen/build-windows.sh | 2 -- .evergreen/config.yml | 4 ---- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.evergreen/build-mac.sh b/.evergreen/build-mac.sh index 51005a9a94..60846ae92a 100755 --- a/.evergreen/build-mac.sh +++ b/.evergreen/build-mac.sh @@ -9,7 +9,7 @@ mkdir -p validdist mv dist/* validdist || true VERSION=${VERSION:-3.10} -ls /Library/Frameworks/Python.framework/Versions/ + PYTHON=/Library/Frameworks/Python.framework/Versions/$VERSION/bin/python3 rm -rf build diff --git a/.evergreen/build-windows.sh b/.evergreen/build-windows.sh index ed111d79b4..09f5e7f0b4 100755 --- a/.evergreen/build-windows.sh +++ b/.evergreen/build-windows.sh @@ -8,8 +8,6 @@ rm -rf validdist mkdir -p validdist mv dist/* validdist || true -ls C:/Python/ - for VERSION in 37 38 39 310; do _pythons=("C:/Python/Python${VERSION}/python.exe" \ "C:/Python/32/Python${VERSION}/python.exe") diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 2c8e3a8001..bf139bad01 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -1050,10 +1050,6 @@ tasks: tags: ["release_tag"] run_on: macos-1100 commands: - - func: "build release" - vars: - VERSION: "3.11" - ENSURE_UNIVERSAL2: "1" - func: "build release" vars: VERSION: "3.10" From 901645c4b86eb5462f5b663df08897ede0ba124b Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 17:33:41 -0500 Subject: [PATCH 22/28] try explicit deps --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 4023f83932..b2a675b7f5 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --upgrade pip wheel setuptools + $PYTHON -m pip install --pre cython cffi $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From a582317ba13d70a8d4f6c33c729cd5288a9cb213 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 17:40:02 -0500 Subject: [PATCH 23/28] try installing newer greenlet --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index b2a675b7f5..3773654a53 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --pre cython cffi + $PYTHON -m pip install --pre cython cffi greenlet $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 00bc33a44e1cfbf9be91cc7f960f16f4ccfdc91d Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 17:46:27 -0500 Subject: [PATCH 24/28] pin greenlet --- .evergreen/run-tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 3773654a53..e79d38ef26 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --pre cython cffi greenlet + $PYTHON -m pip install --pre cython cffi "greenlet>=1.0a1,<2" $PYTHON -m pip install $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 6779c482f3d8cac5f49d772fcd225aec0cd77bc7 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 11 Oct 2022 17:52:19 -0500 Subject: [PATCH 25/28] try without pin in verbose mode --- .evergreen/run-tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index e79d38ef26..2d484aeac4 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -222,7 +222,7 @@ else # --no_ext has to come before "test" so there is no way to toggle extensions here. # Install the framework from pip. # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --pre cython cffi "greenlet>=1.0a1,<2" - $PYTHON -m pip install $GREEN_FRAMEWORK + $PYTHON -m pip install --pre pip setuptools + $PYTHON -m pip install -v $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi From 25a3352bb923bf40e734760d39d61df9524832b3 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 12 Oct 2022 10:02:58 -0500 Subject: [PATCH 26/28] build linux and windows wheels --- .evergreen/build-manylinux-internal.sh | 2 +- .evergreen/build-manylinux.sh | 3 ++- .evergreen/build-windows.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.evergreen/build-manylinux-internal.sh b/.evergreen/build-manylinux-internal.sh index 4fd43a67a3..7c3747f4e2 100755 --- a/.evergreen/build-manylinux-internal.sh +++ b/.evergreen/build-manylinux-internal.sh @@ -11,7 +11,7 @@ mv dist/* validdist || true # Compile wheels for PYTHON in /opt/python/*/bin/python; do - if [[ ! $PYTHON =~ (cp37|cp38|cp39|cp310) ]]; then + if [[ ! $PYTHON =~ (cp37|cp38|cp39|cp310|cp311) ]]; then continue fi # https://github.com/pypa/manylinux/issues/49 diff --git a/.evergreen/build-manylinux.sh b/.evergreen/build-manylinux.sh index cac435fb11..4967fab906 100755 --- a/.evergreen/build-manylinux.sh +++ b/.evergreen/build-manylinux.sh @@ -37,7 +37,8 @@ unexpected=$(find dist \! \( -iname dist -or \ -iname '*cp37*' -or \ -iname '*cp38*' -or \ -iname '*cp39*' -or \ - -iname '*cp310*' \)) + -iname '*cp310*' -or \ + -iname '*cp311*' \ )) if [ -n "$unexpected" ]; then echo "Unexpected files:" $unexpected exit 1 diff --git a/.evergreen/build-windows.sh b/.evergreen/build-windows.sh index 09f5e7f0b4..aeb16892b1 100755 --- a/.evergreen/build-windows.sh +++ b/.evergreen/build-windows.sh @@ -8,7 +8,7 @@ rm -rf validdist mkdir -p validdist mv dist/* validdist || true -for VERSION in 37 38 39 310; do +for VERSION in 37 38 39 310 311; do _pythons=("C:/Python/Python${VERSION}/python.exe" \ "C:/Python/32/Python${VERSION}/python.exe") for PYTHON in "${_pythons[@]}"; do From 3808c6cd5890f8c6c414187ed2ac188e281d06b1 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 12 Oct 2022 14:17:42 -0500 Subject: [PATCH 27/28] fix syntax --- .evergreen/build-manylinux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.evergreen/build-manylinux.sh b/.evergreen/build-manylinux.sh index 4967fab906..871151a5f3 100755 --- a/.evergreen/build-manylinux.sh +++ b/.evergreen/build-manylinux.sh @@ -38,7 +38,7 @@ unexpected=$(find dist \! \( -iname dist -or \ -iname '*cp38*' -or \ -iname '*cp39*' -or \ -iname '*cp310*' -or \ - -iname '*cp311*' \ )) + -iname '*cp311*' \)) if [ -n "$unexpected" ]; then echo "Unexpected files:" $unexpected exit 1 From fa3f39c98bbfc7a420deb188cc8a92df55288210 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 12 Oct 2022 16:51:02 -0500 Subject: [PATCH 28/28] address review --- .evergreen/run-tests.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index 2d484aeac4..9a0eb25e00 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -220,9 +220,5 @@ if [ -z "$GREEN_FRAMEWORK" ]; then $PYTHON $COVERAGE_ARGS setup.py $C_EXTENSIONS test $TEST_ARGS $OUTPUT else # --no_ext has to come before "test" so there is no way to toggle extensions here. - # Install the framework from pip. - # Use the same flags as the ones used by gevent, in case we have to build the wheel. - $PYTHON -m pip install --pre pip setuptools - $PYTHON -m pip install -v $GREEN_FRAMEWORK $PYTHON green_framework_test.py $GREEN_FRAMEWORK $OUTPUT fi