Skip to content

bpo-32842: Fixing epoll timeout logics#5670

Closed
YoSTEALTH wants to merge 1215 commits into
python:masterfrom
YoSTEALTH:patch-1
Closed

bpo-32842: Fixing epoll timeout logics#5670
YoSTEALTH wants to merge 1215 commits into
python:masterfrom
YoSTEALTH:patch-1

Conversation

@YoSTEALTH

@YoSTEALTH YoSTEALTH commented Feb 14, 2018

Copy link
Copy Markdown
Contributor

current

if timeout is None:
timeout = -1
elif timeout <= 0:
timeout = 0

changed

if timeout is None:
timeout = -1
elif timeout < -1:
timeout = 0

what if "timeout=-1" ?

  • currently it would result in being timeout=0

https://bugs.python.org/issue32842

terryjreedy and others added 30 commits November 5, 2017 20:30
Manual partial backport of patch that fixed nearly 50 other files.
…_init__() more than once (GH-3968) (#4301)

(cherry picked from commit e56ab74)
…or object is uninitialized (GH-3958) (#4303)

(cherry picked from commit edb13ae)
By accident the size of the empty dict keys object matched the
size of values array.
(cherry picked from commit 39a156c)
…GH-4304) (#4321)

* fix doc for multiprocessing.connection.Client

The authenticate argument does not exist on either Client or Listener:
- https://github.com/python/cpython/blob/master/Lib/multiprocessing/connection.pyGH-L483 (master)
- https://github.com/python/cpython/blob/3.6/Lib/multiprocessing/connection.pyGH-L478 (3.6)
- https://github.com/python/cpython/blob/3.5/Lib/multiprocessing/connection.pyGH-L478 (3.5)
- https://github.com/python/cpython/blob/3.4/Lib/multiprocessing/connection.pyGH-L487 (3.4)
The documentation also claimed that these functions will call `current_process().auth_key`, for which I could find no evidence in the code. I rewrote the documentation to reflect the actual behavior.

Also made some small changes to vary sentence structure.
(cherry picked from commit 1e5d54c)
…H-4314) (#4322)

* bpo-31970: Reduce performance overhead of asyncio debug mode..
(cherry picked from commit 921e943)
…s. (GH-4235) (#4352)

* Fix compilation of the socket module on NetBSD 8.
* Fix the assertion failure or reading arbitrary data when parse
  a AF_BLUETOOTH address on NetBSD and DragonFly BSD.
* Fix other potential errors and make the code more reliable.
(cherry picked from commit d318715)
It can be removed after python/peps@c28890f
(cherry picked from commit 7c9da3e)
…ite an… (GH-4386) (#4393)

* bpo-32015: Asyncio cycling during simultaneously socket read/write and reconnection

* Tests fix

* Tests fix

* News add

* Add new unit tests.
(cherry picked from commit e1d62e0)
…Back_Print()). (GH-4289) (#4406)

* Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks.
* Setting sys.tracebacklimit to None now causes using the default limit.
* Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
  the limit LONG_MAX rather than the default limit.
* Fixed integer overflows in the case of more than 2**31 traceback items on
  Windows.
* Fixed output errors handling..
(cherry picked from commit edad8ee)
miss-islington and others added 14 commits February 10, 2018 19:42
…GH-5612)

The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f4)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
…H-5570)

It now reads: ...be aware that Python has no control over...
(cherry picked from commit 517da1e)

Co-authored-by: Alexey <forestbiiird@gmail.com>
… (GH-5547)

`arg_name` and `element_index` are defined as `digit`+ instead of `integer`.
(cherry picked from commit 7a561af)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.

(cherry picked from commit 3c34aad)

Co-authored-by: SSE4 <tomskside@gmail.com>
…t. (GH-5639)

GUI test test_file_buttons() only looks at initial ascii-only lines,
but failed on systems where open() defaults to 'ascii' because
readline() internally reads and decodes far enough ahead to encounter
a non-ascii character in CREDITS.txt.
(cherry picked from commit f34e03e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…H-5646)

Using the system and place-dependent default encoding for open()
is a bad idea for IDLE's system and location-independent files.
(cherry picked from commit 688722c)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
…uuid module. (GH-5608). (#5654)

(cherry picked from commit da6c3da)


Co-authored-by: Segev Finer <segev208@gmail.com>
… handler. (GH-5636)

(cherry picked from commit b7e2d67)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit f0bc645)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
This note incorrectly stated that "Base64 has an expansion factor of 6
to 4" (it is actually 4 to 3). It was decided to remove the note.

(cherry picked from commit 88c38a4)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
# current
if timeout is None:
    timeout = -1
elif timeout <= 0:
    timeout = 0

# changed
if timeout is None:
    timeout = -1
elif timeout < -1:
    timeout = 0

what if "timeout=-1" ?
- currently it would result in being timeout=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.