[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-01 Thread tzickel
tzickel added the comment: here is something quick I did to check if it works (it works) but I'm not fluent in multiprocessing code, so If i'm missing something or doing something wrong feel free to tell me: https://github.com/tzickel/cpython/commit/ec63a43706f3bf615ab7ed30fb095607f6101e26

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-01 Thread tzickel
tzickel added the comment: A. It would be nice to add a test that tests this. B. Now that Pool is cleaning up properly, any of it's functions which return another object (like imap's IMapIterator) need to hold a reference to the Pool, so it won't get cleanedup before computing. --

[issue35228] Index search in CHM help crashes viewer

2018-12-01 Thread Ma Lin
Ma Lin added the comment: I suffered this problem more than one years. Here is a solution, before compiling the chm, modify like this: --- D:\Python-3.7.1\Doc\build\htmlhelp\python371.hhpSun Dec 02 13:12:37 2018 +++ D:\fix_crash\python371.hhp Sun Dec 02 13:05:57 2018 @@ -1,6 +1,6 @@

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This also happens on Linux, hanging in different moments: ❯ ./python test.py Begin 4 [hangs] ❯ ./python test.py Begin 4 3 [hangs] ❯ ./python test.py [hangs] -- ___ Python tracker

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: Bisecting between 3.7.0(good) and 3.7.1(bad) with the code in my previous commit points to: 97f998a4dfd6db6d867f446daa62445d0782bf39 is the first bad commit commit 97f998a4dfd6db6d867f446daa62445d0782bf39 Author: Miss Islington (bot)

[issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

2018-12-01 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: multiprocessing.Pool.imap hangs in MacOs after applying this commit: import multiprocessing def the_test(): print("Begin") for x in multiprocessing.Pool().imap(int, ["4", "3"]): print(x) print("End") the_test() This

[issue16516] argparse types (and actions) must be hashable

2018-12-01 Thread Luna Chen
Luna Chen added the comment: Hi bradengroom, I have reviewed your PR, it's just a small thing! If you could update your PR, it would be amazing! Thank you! -- nosy: +BNMetrics ___ Python tracker

[issue35369] List sorting makes duplicate comparisons

2018-12-01 Thread David Wyde
David Wyde added the comment: Okay. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35341] Add generic version of OrderedDict to typing module

2018-12-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Now that regular dicts are ordered, my expectation is that OrderedDict() is going to mostly fall into disuse (much like UserDict, UserList, UserString). That said, it would be nice if all of the collections classes had generic counterparts in the typing

[issue35369] List sorting makes duplicate comparisons

2018-12-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > I've heard of using human choices for comparisons, when fewer decisions could > provide a notable speedup. Memoization is the usual solution when expensive computations are being repeated. That technique preserves the work that was done and it avoids

[issue27715] call-matcher breaks if a method is mocked with spec=True

2018-12-01 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak versions: +Python 3.7, Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue35335] msgfmt should be able to merge more than one po file

2018-12-01 Thread s-ball
s-ball added the comment: I have followed SilentGhost's advice and begun by thoroughly testing the current behaviour. I then realized that I was wrong, and that (probably by chance) msgfmt.py partially followed my requirements, but pybabel did not and GNU gettext msgfmt did not really. I

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35373] PyInit_timezone() must return a value

2018-12-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : PyInit_timezone() is declared as returning int, but it contains return statements without value. >From compiler output on Windows: timemodule.c ..\Modules\timemodule.c(1584): warning C4033: 'PyInit_timezone' must return a value

[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2018-12-01 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am closing this as fixed since all the PRs were merged. Feel free to reopen this if needed. Thanks @mariocj89 and @vstinner for the review. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed

[issue35365] Use wchar_t* buffer instead of Unicode object in code page decoder

2018-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Code page decoder incorrectly handles input >2GiB ___ Python tracker ___ ___

[issue35372] Code page decoder incorrectly handles input >2GiB

2018-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +10083 stage: -> patch review ___ Python tracker ___ ___

[issue35332] shutil.rmtree(..., ignore_errors=True) doesn't ignore errors from os.close()

2018-12-01 Thread Ronal Abraham
Ronal Abraham added the comment: I forgot to mention: the exception raised is an OSError and the errno is 52 (ESTALE on AIX). -- ___ Python tracker ___

[issue35372] Code page decoder incorrectly handles input >2GiB

2018-12-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : >>> b = b'a'*(2**31-2)+b'\xff'*2 >>> x, y = codecs.code_page_decode(932, b, 'replace', True) >>> len(x) 2 >>> x, y ('aa', 2147483648) -- assignee: serhiy.storchaka components: Interpreter Core messages: 330855 nosy: serhiy.storchaka, vstinner

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2018-12-01 Thread Cyker Way
Cyker Way added the comment: Can confirm this bug still exists on master branch, python3.7, python3.6, and very likely other versions since it's reported. It seems only `_format_action_invocation` and `_get_action_name` need to be fixed. So we can do it more lightweight (<10 lines).

[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple

2018-12-01 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +10082 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue22496] urllib2 fails against IIS (urllib2 can't parse 401 reply www-authenticate headers)

2018-12-01 Thread Mathieu Dupuy
Change by Mathieu Dupuy : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread miss-islington
miss-islington added the comment: New changeset 013832ff964a0b3b59e04a07a33bae65c1c3ae84 by Miss Islington (bot) in branch '3.6': bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844) https://github.com/python/cpython/commit/013832ff964a0b3b59e04a07a33bae65c1c3ae84 --

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread miss-islington
miss-islington added the comment: New changeset 265b41996aa3f604624a8046d1c314a1aee4b590 by Miss Islington (bot) in branch '3.7': bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844) https://github.com/python/cpython/commit/265b41996aa3f604624a8046d1c314a1aee4b590 --

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +10081 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +10080 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a by Serhiy Storchaka in branch 'master': bpo-35371: Fix possible crash in os.utime() on Windows. (GH-10844) https://github.com/python/cpython/commit/32bc11c33cf5ccea165b5f4ac3799f02fdf9c76a --

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +10079 stage: -> patch review ___ Python tracker ___ ___

[issue35371] Fix undefined behavior in os.utime() on Windows

2018-12-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The hFile variable is used uninitialized in os.utime() on Windows when an error is raised in arguments parsing. This is an undefined behavior, and can cause a crash. -- assignee: serhiy.storchaka components: Extension Modules messages: 330850

[issue35370] Provide API to set the tracing function to be used for running threads.

2018-12-01 Thread Fabio Zadrozny
New submission from Fabio Zadrozny : Right now it's hard for debuggers to set the tracing function to be used for running threads. This would be really handy for debuggers when attaching to a running program to debug all threads. -- Note: currently there is a way to achieve that by pausing

[issue35370] Provide API to set the tracing function to be used for running threads.

2018-12-01 Thread Fabio Zadrozny
Change by Fabio Zadrozny : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2018-12-01 Thread miss-islington
miss-islington added the comment: New changeset 422c1658b7d34fdc73c5fc895b135862103d1983 by Miss Islington (bot) in branch '3.7': bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) https://github.com/python/cpython/commit/422c1658b7d34fdc73c5fc895b135862103d1983

[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2018-12-01 Thread miss-islington
miss-islington added the comment: New changeset c0566e0ff6c2dd1a8b814ecd65649605c090527b by Miss Islington (bot) in branch '3.6': bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) https://github.com/python/cpython/commit/c0566e0ff6c2dd1a8b814ecd65649605c090527b

[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2018-12-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +10078 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2018-12-01 Thread miss-islington
Change by miss-islington : -- pull_requests: +10077 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2018-12-01 Thread STINNER Victor
STINNER Victor added the comment: New changeset edeca92c84a3b08902ecdfe987cde00c7e617887 by Victor Stinner (Xtreak) in branch 'master': bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302) https://github.com/python/cpython/commit/edeca92c84a3b08902ecdfe987cde00c7e617887

[issue34850] Emit a syntax warning for "is" with a literal

2018-12-01 Thread Gregory P. Smith
Gregory P. Smith added the comment: Oh neat, I didn't realize that Nathaniel. That makes such warnings much more useful. I'm fine if you go ahead with this change. In the unlikely event it turns out to cause user annoyance problems in betas due to third party code that can't be updated,

[issue35369] List sorting makes duplicate comparisons

2018-12-01 Thread David Wyde
David Wyde added the comment: Thanks for the speedy and helpful response. Keeping complexity down is fair. The wasted if-checks on subsequent iterations are certainly a negative trade-off. I saw that binarysort() is only called in one place, but I understand wanting to keep it generic. I