Skip to content

Commit aac0250

Browse files
committed
clean up gevent
1 parent 07fd9af commit aac0250

File tree

7 files changed

+42
-39
lines changed

7 files changed

+42
-39
lines changed

.evergreen/generated_configs/variants.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ buildvariants:
332332
# Green framework tests
333333
- name: green-gevent-rhel8
334334
tasks:
335-
- name: .test-standard .sync !.python-3.14
335+
- name: .test-standard
336336
display_name: Green Gevent RHEL8
337337
run_on:
338338
- rhel87-small

.evergreen/scripts/generate_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def create_green_framework_variants():
297297
variants = []
298298
host = DEFAULT_HOST
299299
for framework in ["gevent"]:
300-
tasks = [".test-standard .sync !.python-3.14"]
300+
tasks = [".test-standard"]
301301
expansions = dict(GREEN_FRAMEWORK=framework)
302302
display_name = get_variant_name(f"Green {framework.capitalize()}", host)
303303
variant = create_variant(tasks, display_name, host=host, expansions=expansions)

doc/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ Changes in Version 4.14.0 (XXXX/XX/XX)
55
--------------------------------------
66
PyMongo 4.14 brings a number of changes including:
77

8+
.. warning:: PyMongo 4.14 drops support for Python 3.9: Python 3.10+ or PyPy 3.10+ is now required.
9+
10+
- Added support for Python 3.14 and Python 3.14t.
811
- Added :attr:`bson.codec_options.TypeRegistry.codecs` and :attr:`bson.codec_options.TypeRegistry.fallback_encoder` properties
912
to allow users to directly access the type codecs and fallback encoder for a given :class:`bson.codec_options.TypeRegistry`.
1013
- Added :meth:`pymongo.asynchronous.mongo_client.AsyncMongoClient.append_metadata` and
1114
:meth:`pymongo.mongo_client.MongoClient.append_metadata` to allow instantiated MongoClients to send client metadata
1215
on-demand
1316
- Improved performance of selecting a server with the Primary selector.
17+
- Dropped support for Eventlet.
1418

1519
- Introduces a minor breaking change. When encoding :class:`bson.binary.BinaryVector`, a ``ValueError`` will be raised
1620
if the 'padding' metadata field is < 0 or > 7, or non-zero for any type other than PACKED_BIT.

pyproject.toml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ dev = [
5151
]
5252
doctest = ["sphinx"]
5353
pip = ["pip"]
54-
gevent = ["gevent"]
54+
# Install cffi with free-threading and Python 3.14 support
55+
gevent = ["gevent", "cffi>=2.0.0b1"]
5556
eventlet = ["eventlet"]
5657
coverage = [
5758
"pytest-cov",
@@ -102,32 +103,32 @@ log_cli_level = "INFO"
102103
faulthandler_timeout = 1500
103104
asyncio_default_fixture_loop_scope = "session"
104105
xfail_strict = true
105-
filterwarnings = [
106-
"error",
107-
# Internal warnings raised during tests.
108-
"module:use an explicit session with no_cursor_timeout=True:UserWarning",
109-
"module:serverselectiontimeoutms must be:UserWarning",
110-
"module:Unsupported compressor:UserWarning",
111-
"module:zlibcompressionlevel must be:UserWarning",
112-
"module:Wire protocol compression with:UserWarning",
113-
"module:GridIn property:DeprecationWarning",
114-
"module:GridOut property:DeprecationWarning",
115-
# pytest-asyncio known issue: https://github.com/pytest-dev/pytest-asyncio/issues/1032
116-
"module:.*WindowsSelectorEventLoopPolicy:DeprecationWarning",
117-
"module:.*et_event_loop_policy:DeprecationWarning",
118-
# TODO: Remove as part of PYTHON-3923.
119-
"module:unclosed <eventlet.green.ssl.GreenSSLSocket:ResourceWarning",
120-
"module:unclosed <socket.socket:ResourceWarning",
121-
"module:unclosed <ssl.SSLSocket:ResourceWarning",
122-
"module:unclosed <socket object:ResourceWarning",
123-
"module:unclosed transport:ResourceWarning",
124-
# pytest-asyncio known issue: https://github.com/pytest-dev/pytest-asyncio/issues/724
125-
"module:unclosed event loop:ResourceWarning",
126-
# https://github.com/eventlet/eventlet/issues/818
127-
"module:please use dns.resolver.Resolver.resolve:DeprecationWarning",
128-
# https://github.com/dateutil/dateutil/issues/1314
129-
"module:datetime.datetime.utc:DeprecationWarning",
130-
]
106+
# filterwarnings = [
107+
# "error",
108+
# # Internal warnings raised during tests.
109+
# "module:use an explicit session with no_cursor_timeout=True:UserWarning",
110+
# "module:serverselectiontimeoutms must be:UserWarning",
111+
# "module:Unsupported compressor:UserWarning",
112+
# "module:zlibcompressionlevel must be:UserWarning",
113+
# "module:Wire protocol compression with:UserWarning",
114+
# "module:GridIn property:DeprecationWarning",
115+
# "module:GridOut property:DeprecationWarning",
116+
# # pytest-asyncio known issue: https://github.com/pytest-dev/pytest-asyncio/issues/1032
117+
# "module:.*WindowsSelectorEventLoopPolicy:DeprecationWarning",
118+
# "module:.*et_event_loop_policy:DeprecationWarning",
119+
# # TODO: Remove as part of PYTHON-3923.
120+
# "module:unclosed <eventlet.green.ssl.GreenSSLSocket:ResourceWarning",
121+
# "module:unclosed <socket.socket:ResourceWarning",
122+
# "module:unclosed <ssl.SSLSocket:ResourceWarning",
123+
# "module:unclosed <socket object:ResourceWarning",
124+
# "module:unclosed transport:ResourceWarning",
125+
# # pytest-asyncio known issue: https://github.com/pytest-dev/pytest-asyncio/issues/724
126+
# "module:unclosed event loop:ResourceWarning",
127+
# # https://github.com/eventlet/eventlet/issues/818
128+
# "module:please use dns.resolver.Resolver.resolve:DeprecationWarning",
129+
# # https://github.com/dateutil/dateutil/issues/1314
130+
# "module:datetime.datetime.utc:DeprecationWarning",
131+
# ]
131132
markers = [
132133
"auth_aws: tests that rely on pymongo-auth-aws",
133134
"auth_oidc: tests that rely on oidc auth",

test/asynchronous/test_cursor.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,10 @@ async def test_explain_csot(self):
366366
# Create a MongoClient with command monitoring enabled (referred to as client).
367367
listener = AllowListEventListener("explain")
368368
client = await self.async_rs_or_single_client(event_listeners=[listener])
369+
client.drop_database("explain-test")
369370

370371
# Create a collection, referred to as collection, with the namespace explain-test.collection.
371-
names = await client["explain-test"].list_collection_names()
372-
if "collection" not in names:
373-
collection = await client["explain-test"].create_collection("collection")
374-
else:
375-
collection = client["explain-test"]["collection"]
372+
collection = client["explain-test"]["collection"]
376373

377374
# Run an explained find on collection. The find will have the query predicate { name: 'john doe' }. Specify a maxTimeMS value of 2000ms for the explain.
378375
with pymongo.timeout(2.0):

test/test_cursor.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,10 @@ def test_explain_csot(self):
358358
# Create a MongoClient with command monitoring enabled (referred to as client).
359359
listener = AllowListEventListener("explain")
360360
client = self.rs_or_single_client(event_listeners=[listener])
361+
client.drop_database("explain-test")
361362

362363
# Create a collection, referred to as collection, with the namespace explain-test.collection.
363-
names = client["explain-test"].list_collection_names()
364-
if "collection" not in names:
365-
collection = client["explain-test"].create_collection("collection")
366-
else:
367-
collection = client["explain-test"]["collection"]
364+
collection = client["explain-test"]["collection"]
368365

369366
# Run an explained find on collection. The find will have the query predicate { name: 'john doe' }. Specify a maxTimeMS value of 2000ms for the explain.
370367
with pymongo.timeout(2.0):

uv.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)