Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
059c7569
Commit
059c7569
authored
Jul 07, 2023
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
leak checks.
parent
faf1ec7c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
src/gevent/testing/leakcheck.py
src/gevent/testing/leakcheck.py
+18
-5
src/gevent/testing/patched_tests_setup.py
src/gevent/testing/patched_tests_setup.py
+8
-6
src/gevent/tests/test__contextvars.py
src/gevent/tests/test__contextvars.py
+1
-2
No files found.
src/gevent/testing/leakcheck.py
View file @
059c7569
...
...
@@ -73,12 +73,25 @@ class _RefCountChecker(object):
self
.
needs_setUp
=
False
def
_ignore_object_p
(
self
,
obj
):
if
(
obj
is
self
or
obj
in
self
.
__dict__
.
values
()
or
obj
==
self
.
_ignore_object_p
# pylint:disable=comparison-with-callable
):
if
obj
is
self
:
return
False
try
:
# Certain badly written __eq__ and __contains__ methods
# (I'm looking at you, Python 3.10 importlib.metadata._text!
# ``__eq__(self, other): return self.lower() == other.lower()``)
# raise AttributeError which propagates here, and must be caught.
# Similarly, we can get a TypeError
if
(
obj
in
self
.
__dict__
.
values
()
or
obj
==
self
.
_ignore_object_p
# pylint:disable=comparison-with-callable
):
return
False
except
(
AttributeError
,
TypeError
):
# `obj` is things like that _text class. Also have seen
# - psycopg2._psycopg.type
# - relstorage.adapters.drivers._ClassDriverFactory
return
True
kind
=
type
(
obj
)
if
kind
in
self
.
IGNORED_TYPES
:
return
False
...
...
src/gevent/testing/patched_tests_setup.py
View file @
059c7569
...
...
@@ -257,6 +257,7 @@ disabled_tests = [
# The same patch that fixed that removed this test,
# because it would now fail.
'test_context.ContextTest.test_context_var_new_2'
,
]
...
...
@@ -550,8 +551,15 @@ if WIN:
# 'No connection could be made because the target machine
# actively refused it'
'test_socket.NonBlockingTCPTests.testAccept'
,
# On appveyor, this test has been seen to fail on 3.9 and 3.8
]
if
sys
.
version_info
[
2
]
<=
(
3
,
9
):
disabled_tests
+=
[
'test_context.HamtTest.test_hamt_collision_3'
,
]
# These are a problem on 3.5; on 3.6+ they wind up getting (accidentally) disabled.
wrapped_tests
.
update
({
'test_socket.SendfileUsingSendTest.testWithTimeout'
:
_flaky_socket_timeout
,
...
...
@@ -962,12 +970,6 @@ if ARES:
'test_socket.GeneralModuleTests.test_getnameinfo'
,
]
if
sys
.
version_info
[
1
]
==
5
:
disabled_tests
+=
[
# This test tends to time out, but only under 3.5, not under
# 3.6 or 3.7. Seen with both libev and libuv
'test_socket.SendfileUsingSendTest.testWithTimeoutTriggeredSend'
,
]
disabled_tests
+=
[
'test_threading.MiscTestCase.test__all__'
,
...
...
src/gevent/tests/test__contextvars.py
View file @
059c7569
...
...
@@ -1085,5 +1085,4 @@ class ContextTest(unittest.TestCase):
if
__name__
==
"__main__"
:
if
not
monkey
.
PY37
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment