Skip to content

bpo-38781: Clear buffer in MemoryHandler flush #17132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

Penlect
Copy link
Contributor

@Penlect Penlect commented Nov 12, 2019

This makes it easier to use a custom buffer when subclassing
MemoryHandler (by avoiding the explicit empty list literal
assignment in the flush method). For example, collection.deque
can now be used without any modifications to MemoryHandler.flush.

The same applies to BufferingHandler.

https://bugs.python.org/issue38781

This makes it easier to use a custom buffer when subclassing
MemoryHandler (by avoiding the explicity empty list literal
assignment in the flush method). For example, collection.deque
can now be used without any modifications to MemoryHandler.flush.

The same applies to BufferingHandler.
@Penlect Penlect requested a review from vsajip as a code owner November 12, 2019 21:51
@Penlect Penlect changed the title bpo-38781: Clear buffer in MemoryHandler flush bpo-38781: Clear buffer in MemoryHandler flush (GH-17132) Nov 12, 2019
@Penlect Penlect changed the title bpo-38781: Clear buffer in MemoryHandler flush (GH-17132) bpo-38781: Clear buffer in MemoryHandler flush Nov 12, 2019
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD Non-Debug 3.x has failed when building commit d89cea1.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/368/builds/72) and take a look at the build logs.
  4. Check if the failure is related to this commit (d89cea1) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/368/builds/72

Failed tests:

  • test_multiprocessing_forkserver

Failed subtests:

  • test_mymanager_context - test.test_multiprocessing_forkserver.WithManagerTestMyManager

Summary of the results of the build (if available):

== Tests result: FAILURE then ENV CHANGED ==

397 tests OK.

10 slowest tests:

  • test_multiprocessing_spawn: 4 min 45 sec
  • test_concurrent_futures: 4 min 22 sec
  • test_multiprocessing_forkserver: 4 min 8 sec
  • test_tokenize: 4 min 7 sec
  • test_largefile: 3 min 30 sec
  • test_tools: 3 min 25 sec
  • test_lib2to3: 2 min 49 sec
  • test_asyncio: 2 min 24 sec
  • test_multiprocessing_fork: 2 min 19 sec
  • test_unicodedata: 1 min 43 sec

1 test altered the execution environment:
test_multiprocessing_spawn

21 tests skipped:
test_dbm_gnu test_devpoll test_epoll test_gdb test_idle test_ioctl
test_msilib test_ossaudiodev test_spwd test_sqlite test_startfile
test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly
test_turtle test_winconsoleio test_winreg test_winsound
test_zipfile64

1 re-run test:
test_multiprocessing_forkserver

Total duration: 20 min 30 sec

Click to see traceback logs
Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.x.koobs-freebsd-9e36.nondebug/build/Lib/test/_test_multiprocessing.py", line 2807, in test_mymanager_context
    self.assertIn(manager._process.exitcode, (0, -signal.SIGTERM))
AssertionError: None not found in (0, -15)

@vsajip
Copy link
Member

vsajip commented Nov 13, 2019

Failure appears unrelated to this change.

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
This makes it easier to use a custom buffer when subclassing
MemoryHandler (by avoiding the explicity empty list literal
assignment in the flush method). For example, collection.deque
can now be used without any modifications to MemoryHandler.flush.

The same applies to BufferingHandler.
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
This makes it easier to use a custom buffer when subclassing
MemoryHandler (by avoiding the explicity empty list literal
assignment in the flush method). For example, collection.deque
can now be used without any modifications to MemoryHandler.flush.

The same applies to BufferingHandler.
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.

4 participants