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
448127cd
Commit
448127cd
authored
Dec 22, 2020
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preparing release 20.12.0
parent
56092924
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
100 additions
and
74 deletions
+100
-74
CHANGES.rst
CHANGES.rst
+93
-0
docs/changes/1663.bugfix
docs/changes/1663.bugfix
+0
-3
docs/changes/1678.feature
docs/changes/1678.feature
+0
-6
docs/changes/1686.bugfix
docs/changes/1686.bugfix
+0
-5
docs/changes/1692.misc
docs/changes/1692.misc
+0
-7
docs/changes/1698.bugfix
docs/changes/1698.bugfix
+0
-16
docs/changes/1704.bugfix
docs/changes/1704.bugfix
+0
-4
docs/changes/1708.bugfix
docs/changes/1708.bugfix
+0
-5
docs/changes/1709.bugfix
docs/changes/1709.bugfix
+0
-1
docs/changes/1711.bugfix
docs/changes/1711.bugfix
+0
-6
docs/changes/1712.bugfix
docs/changes/1712.bugfix
+0
-7
docs/changes/1724.bugfix
docs/changes/1724.bugfix
+0
-7
src/gevent/__init__.py
src/gevent/__init__.py
+1
-1
src/gevent/_fileobjectcommon.py
src/gevent/_fileobjectcommon.py
+1
-1
src/gevent/_semaphore.py
src/gevent/_semaphore.py
+1
-1
src/gevent/exceptions.py
src/gevent/exceptions.py
+2
-2
src/gevent/subprocess.py
src/gevent/subprocess.py
+1
-1
src/gevent/threadpool.py
src/gevent/threadpool.py
+1
-1
No files found.
CHANGES.rst
View file @
448127cd
...
...
@@ -6,6 +6,99 @@
.. towncrier release notes start
20.12.0 (2020-12-22)
====================
Features
--------
- Make worker threads created by :class:`gevent.threadpool.ThreadPool` install
the :func:`threading.setprofile` and :func:`threading.settrace` hooks
while tasks are running. This provides visibility to profiling and
tracing tools like yappi.
Reported by Suhail Muhammed.
See :issue:`1678`.
Bugfixes
--------
- Incorrectly passing an exception *instance* instead of an exception
*type* to `gevent.Greenlet.kill` or `gevent.killall` no longer prints
an exception to stderr.
See :issue:`1663`.
- Make destroying a hub try harder to more forcibly stop loop processing
when there are outstanding callbacks or IO operations scheduled.
Thanks to Josh Snyder (:issue:`1686`) and Jan-Philip Gehrcke
(:issue:`1669`).
See :issue:`1686`.
- Improve the ability to use monkey-patched locks, and
`gevent.lock.BoundedSemaphore`, across threads, especially when the
various threads might not have a gevent hub or any other active
greenlets. In particular, this handles some cases that previously
raised ``LoopExit`` or would hang. Note that this may not be reliable
on PyPy on Windows; such an environment is not currently recommended.
The semaphore tries to avoid creating a hub if it seems unnecessary,
automatically creating one in the single-threaded case when it would
block, but not in the multi-threaded case. While the differences
should be correctly detected, it's possible there are corner cases
where they might not be.
If your application appears to hang acquiring semaphores, but adding a
call to ``gevent.get_hub()`` in the thread attempting to acquire the
semaphore before doing so fixes it, please file an issue.
See :issue:`1698`.
- Make error reporting when a greenlet suffers a `RecursionError` more
reliable.
Reported by Dan Milon.
See :issue:`1704`.
- gevent.pywsgi: Avoid printing an extra traceback ("TypeError: not
enough arguments for format string") to standard error on certain
invalid client requests.
Reported by Steven Grimm.
See :issue:`1708`.
- Add support for PyPy2 7.3.3.
See :issue:`1709`.
- Python 2: Make ``gevent.subprocess.Popen.stdin`` objects have a
``write`` method that guarantees to write the entire argument in
binary, unbuffered mode. This may require multiple trips around the
event loop, but more closely matches the behaviour of the Python 2
standard library (and gevent prior to 1.5). The number of bytes
written is still returned (instead of ``None``).
See :issue:`1711`.
- Make `gevent.pywsgi` trying to enforce the rules for reading chunked input or
``Content-Length`` terminated input when the connection is being
upgraded, for example to a websocket connection. Likewise, if the
protocol was switched by returning a ``101`` status, stop trying to
automatically chunk the responses.
Reported by Kavindu Santhusa.
See :issue:`1712`.
- Remove the ``__dict__`` attribute from `gevent.socket.socket` objects. The
standard library socket do not have a ``__dict__``.
Noticed by Carson Ip.
As part of this refactoring, share more common socket code between Python 2
and Python 3.
See :issue:`1724`.
Misc
----
- See :issue:`1692`.
----
20.9.0 (2020-09-22)
===================
...
...
docs/changes/1663.bugfix
deleted
100644 → 0
View file @
56092924
Incorrectly passing an exception *instance* instead of an exception
*type* to `gevent.Greenlet.kill` or `gevent.killall` no longer prints
an exception to stderr.
docs/changes/1678.feature
deleted
100644 → 0
View file @
56092924
Make worker threads created by
:
class
:
`gevent.threadpool.ThreadPool`
install
the
:
func
:
`threading.setprofile` and
:
func
:
`threading.settrace`
hooks
while
tasks
are
running.
This
provides
visibility
to
profiling
and
tracing
tools
like
yappi.
Reported
by
Suhail
Muhammed.
docs/changes/1686.bugfix
deleted
100644 → 0
View file @
56092924
Make destroying a hub try harder to more forcibly stop loop processing
when there are outstanding callbacks or IO operations scheduled.
Thanks to Josh Snyder (:issue:`1686`) and Jan-Philip Gehrcke
(:issue:`1669`).
docs/changes/1692.misc
deleted
100644 → 0
View file @
56092924
PyPy 7.3.2 (2.7 and 3.6) have been tested, and a small issue with 2.7
was corrected.
These are not yet tested on Travis CI.
.. note:: Support for Python 3.5 will be removed in 2021, as it has
now reached end-of-life.
docs/changes/1698.bugfix
deleted
100644 → 0
View file @
56092924
Improve the ability to use monkey-patched locks, and
`gevent.lock.BoundedSemaphore`, across threads, especially when the
various threads might not have a gevent hub or any other active
greenlets. In particular, this handles some cases that previously
raised ``LoopExit`` or would hang. Note that this may not be reliable
on PyPy on Windows; such an environment is not currently recommended.
The semaphore tries to avoid creating a hub if it seems unnecessary,
automatically creating one in the single-threaded case when it would
block, but not in the multi-threaded case. While the differences
should be correctly detected, it's possible there are corner cases
where they might not be.
If your application appears to hang acquiring semaphores, but adding a
call to ``gevent.get_hub()`` in the thread attempting to acquire the
semaphore before doing so fixes it, please file an issue.
docs/changes/1704.bugfix
deleted
100644 → 0
View file @
56092924
Make error reporting when a greenlet suffers a `RecursionError` more
reliable.
Reported by Dan Milon.
docs/changes/1708.bugfix
deleted
100644 → 0
View file @
56092924
gevent.pywsgi: Avoid printing an extra traceback ("TypeError: not
enough arguments for format string") to standard error on certain
invalid client requests.
Reported by Steven Grimm.
docs/changes/1709.bugfix
deleted
100644 → 0
View file @
56092924
Add support for PyPy2 7.3.3.
docs/changes/1711.bugfix
deleted
100644 → 0
View file @
56092924
Python 2: Make ``gevent.subprocess.Popen.stdin`` objects have a
``write`` method that guarantees to write the entire argument in
binary, unbuffered mode. This may require multiple trips around the
event loop, but more closely matches the behaviour of the Python 2
standard library (and gevent prior to 1.5). The number of bytes
written is still returned (instead of ``None``).
docs/changes/1712.bugfix
deleted
100644 → 0
View file @
56092924
Make `gevent.pywsgi` trying to enforce the rules for reading chunked input or
``Content-Length`` terminated input when the connection is being
upgraded, for example to a websocket connection. Likewise, if the
protocol was switched by returning a ``101`` status, stop trying to
automatically chunk the responses.
Reported by Kavindu Santhusa.
docs/changes/1724.bugfix
deleted
100644 → 0
View file @
56092924
Remove the ``__dict__`` attribute from `gevent.socket.socket` objects. The
standard library socket do not have a ``__dict__``.
Noticed by Carson Ip.
As part of this refactoring, share more common socket code between Python 2
and Python 3.
src/gevent/__init__.py
View file @
448127cd
...
...
@@ -27,7 +27,7 @@ version_info = _version_info(20, 0, 0, 'dev', 0) # XXX: Remove me
#: Use ``pkg_resources.parse_version(__version__)`` or
#: ``packaging.version.Version(__version__)`` to get a machine-usable
#: value.
__version__
=
'20.
9.1.dev
0'
__version__
=
'20.
12.
0'
__all__
=
[
...
...
src/gevent/_fileobjectcommon.py
View file @
448127cd
...
...
@@ -88,7 +88,7 @@ class WriteallMixin(object):
Returns the length of *value*.
.. versionadded::
NEXT
.. versionadded::
20.12.0
"""
# Do we need to play the same get_memory games we do with sockets?
# And what about chunking for large values? See _socketcommon.py
...
...
src/gevent/_semaphore.py
View file @
448127cd
...
...
@@ -71,7 +71,7 @@ class Semaphore(AbstractLinkable): # pylint:disable=undefined-variable
.. versionchanged:: 1.5a3
The low-level ``rawlink`` method (most users won't use this) now automatically
unlinks waiters before calling them.
.. versionchanged::
NEXT
.. versionchanged::
20.12.0
Improved support for multi-threaded usage. When multi-threaded usage is detected,
instances will no longer create the thread's hub if it's not present.
"""
...
...
src/gevent/exceptions.py
View file @
448127cd
...
...
@@ -42,7 +42,7 @@ class LoopExit(Exception):
"""
The (optional) hub that raised the error.
.. versionadded::
NEXT
.. versionadded::
20.12.0
"""
# XXX: Note that semaphore.py does this manually.
if
len
(
self
.
args
)
==
3
:
# From the hub
...
...
@@ -128,7 +128,7 @@ class HubDestroyed(GreenletExit):
Clients outside of gevent must not raise this exception.
.. versionadded::
NEXT
.. versionadded::
20.12.0
"""
def
__init__
(
self
,
destroy_loop
):
...
...
src/gevent/subprocess.py
View file @
448127cd
...
...
@@ -617,7 +617,7 @@ class Popen(object):
were added to Python 3.9, but are available in any gevent version, provided
the underlying platform support is present.
.. versionchanged::
NEXT
.. versionchanged::
20.12.0
On Python 2 only, if unbuffered binary communication is requested,
the ``stdin`` attribute of this object will have a ``write`` method that
actually performs internal buffering and looping, similar to the standard library.
...
...
src/gevent/threadpool.py
View file @
448127cd
...
...
@@ -276,7 +276,7 @@ class ThreadPool(GroupMappingMixin):
.. versionchanged:: 1.5a3
The undocumented ``apply_e`` function, deprecated since 1.1,
was removed.
.. versionchanged::
NEXT
.. versionchanged::
20.12.0
Install the profile and trace functions in the worker thread while
the worker thread is running the supplied task.
"""
...
...
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