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
b7efad76
Commit
b7efad76
authored
Jan 18, 2021
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a TypeError on Python 2 with zope.schema installed.
parent
9825ad5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
CHANGES.rst
CHANGES.rst
+10
-1
src/gevent/_interfaces.py
src/gevent/_interfaces.py
+4
-1
No files found.
CHANGES.rst
View file @
b7efad76
...
...
@@ -6,9 +6,18 @@
.. towncrier release notes start
21.1.
0 (2021-01-15
)
21.1.
1 (unreleased
)
===================
Bugfixes
--------
Fix a ``TypeError`` on startup on Python 2 with ``zope.schema``
installed. Reported by Josh Zuech.
21.1.0 (2021-01-15)
===================
Bugfixes
--------
...
...
src/gevent/_interfaces.py
View file @
b7efad76
...
...
@@ -19,6 +19,8 @@ import sys
from
zope.interface
import
Interface
from
zope.interface
import
Attribute
_text_type
=
type
(
u''
)
try
:
from
zope
import
schema
except
ImportError
:
# pragma: no cover
...
...
@@ -26,6 +28,7 @@ except ImportError: # pragma: no cover
__allowed_kw__
=
(
'readonly'
,
'min'
,)
def
__init__
(
self
,
description
,
required
=
False
,
**
kwargs
):
description
=
"%s (required? %s)"
%
(
description
,
required
)
assert
isinstance
(
description
,
_text_type
)
for
k
in
self
.
__allowed_kw__
:
kwargs
.
pop
(
k
,
None
)
if
kwargs
:
...
...
@@ -300,7 +303,7 @@ class ICallback(Interface):
gevent's blocking API; any exception they raise cannot be caught.
"""
pending
=
schema
.
Bool
(
description
=
"Has this callback run yet?"
,
pending
=
schema
.
Bool
(
description
=
u
"Has this callback run yet?"
,
readonly
=
True
)
def
stop
():
...
...
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