[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Nick Coghlan
Nick Coghlan added the comment: For CPython, I was thinking of having it be "whatever gets passed to Py_Main", and that accepts wchar_t in Py3 [1], so on *Nix systems, the command line has already been decoded with [2] by the time it runs. [1]

[issue21895] signal.pause() and signal handlers don't react to SIGCHLD in non-main thread

2017-03-20 Thread Nathaniel Smith
Nathaniel Smith added the comment: It turns out that this bug is more general than signal.pause, and has caused problems for a few different people: https://github.com/dabeaz/curio/issues/118#issuecomment-287735781 https://github.com/dabeaz/curio/issues/118#issuecomment-287798241

[issue29863] Add a COMPACT constant to the json module

2017-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Actually, only put me down for -0. This isn't a necessary change but it isn't egregious either. -- ___ Python tracker

[issue27593] Deprecate sys._mercurial and create sys._git

2017-03-20 Thread Ned Deily
Ned Deily added the comment: Based on Brett's and Steve's feedback, I've pushed some tweaks to the captured git info. With the changes, we now use --short form of git hash. And we use output from "git describe --all --always --dirty" for the tag. I added --all and --always for better

[issue27593] Deprecate sys._mercurial and create sys._git

2017-03-20 Thread Ned Deily
Changes by Ned Deily : -- pull_requests: +660 ___ Python tracker ___ ___ Python-bugs-list

[issue27593] Deprecate sys._mercurial and create sys._git

2017-03-20 Thread Ned Deily
Changes by Ned Deily : -- pull_requests: +659 ___ Python tracker ___ ___ Python-bugs-list

[issue29863] Add a COMPACT constant to the json module

2017-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 We already have a way to do it. I teach this way in my Python courses and there is a zero learning curve. It isn't difficult at all. -- assignee: -> bob.ippolito nosy: +bob.ippolito ___ Python tracker

[issue26418] multiprocessing.pool.ThreadPool eats up memories

2017-03-20 Thread renlifeng
renlifeng added the comment: I confirm that 3.5.3 and 2.7.13 have fixed this problem. Now the memory usage will stop growing after using 28% of physical memory. In other words, this problem can not be reproduced with the latest version of python, Thanks. It's OK for me to set it to any of

[issue27593] Deprecate sys._mercurial and create sys._git

2017-03-20 Thread Ned Deily
Changes by Ned Deily : -- pull_requests: +658 ___ Python tracker ___ ___ Python-bugs-list

[issue29849] fix memory leak in import_from

2017-03-20 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread INADA Naoki
INADA Naoki added the comment: I don't know your patch is worth enough or not. (I dislike fprintf(stderr, ...) at least). But my advice is stop mixing multithreading and fork (except fork+exec). It's almost impossible. While Python has GIL, some extension can release GIL and run any C code.

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Is EHLO the only command sent in lower case? I think it might not be. I suppose I'm a solid ±0 on changing this (how's that for a completely neutral endorsement?). I won't do the change myself, but I'd review a pull request. --

[issue29863] Add a COMPACT constant to the json module

2017-03-20 Thread Eric V. Smith
Eric V. Smith added the comment: +1: gets the job done without complicating the API. -- nosy: +eric.smith ___ Python tracker ___

[issue29863] Add a COMPACT constant to the json module

2017-03-20 Thread Andrew Nester
Changes by Andrew Nester : -- pull_requests: +657 ___ Python tracker ___ ___

[issue29863] Add a COMPACT constant to the json module

2017-03-20 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +benhoyt, r.david.murray ___ Python tracker ___ ___

[issue29863] Add a COMPACT constant to the json module

2017-03-20 Thread Brett Cannon
New submission from Brett Cannon: In issue #29540 there was a suggestion to add a `compact` argument to json.dump() and json.dumps(). That was eventually rejected as adding complexity to an API that's already messy. But in GH-72 someone created a COMPACT constant to the json module which gets

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread Daniel Birnstiel
Daniel Birnstiel added the comment: While you might scold me for the following code, it is just some fiddling with the cpython functions from python side. Backstory is issue 6721 or related to it. I am working on a multi-process service which uses multiprocessing (or rather the billiard

[issue29851] Have importlib.reload() raise ImportError when a spec can't be found

2017-03-20 Thread Brett Cannon
Brett Cannon added the comment: First, I don't know what version you're testing against because 3.0.6.1 isn't an actual release of Python and 3.6.1 isn't released yet (unless you know something I don't know :) ). Second, the issue is that you're trying to import a module under a name which

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The support of **kwargs in Path.__new__ is needed if you want to implement a subclass of Path with __init__ accepting keyword arguments (and since Path constructor takes variable number of positional arguments, new arguments should be keyword-only). >>>

[issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS

2017-03-20 Thread Ned Deily
Ned Deily added the comment: Thanks, Adam! Note to self: see Makefile changes in PR 737 for Issue15590. -- ___ Python tracker ___

[issue29862] Fix grammar in importlib.reload() exception

2017-03-20 Thread Brett Cannon
New submission from Brett Cannon: https://github.com/python/cpython/blob/05f53735c8912f8df1077e897f052571e13c3496/Lib/importlib/__init__.py#L140 "reload() argument must be a module" (missing the "a"). -- assignee: brett.cannon components: Library (Lib) messages: 289901 nosy:

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46747/long-shift-overflow-long-long.diff ___ Python tracker ___

[issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS

2017-03-20 Thread Ned Deily
Changes by Ned Deily : -- Removed message: http://bugs.python.org/msg289899 ___ Python tracker ___

[issue29846] ImportError: Symbol not found: __PyCodecInfo_GetIncrementalDecoder when building 2.7.x on macOS

2017-03-20 Thread Ned Deily
Ned Deily added the comment: Thanks, Adam! Note to self: see Makefile changes in GH-737 for Issue15590. -- ___ Python tracker ___

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46748/long-shift-overflow-divrem1.diff ___ Python tracker ___

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are two patches. The first uses C long long arithmetic (it corresponds current PR 680), the second uses PyLong arithmetic. What is easier to read and verify? -- ___ Python tracker

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Jelle Zijlstra
Jelle Zijlstra added the comment: Thanks, I'll add a PR. This doesn't need to be documented, right? -- ___ Python tracker ___

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-03-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- pull_requests: +656 ___ Python tracker ___ ___

[issue22708] httplib/http.client in method _tunnel used HTTP/1.0 CONNECT method

2017-03-20 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +655 ___ Python tracker ___

[issue29847] Path takes and ignores **kwargs

2017-03-20 Thread Brett Cannon
Brett Cannon added the comment: Yep, kwargs should be dropped since it isn't used or documented: https://docs.python.org/3/library/pathlib.html#pathlib.PurePath (probably just a hold-over from when it did in some earlier version of the code). -- components: +Library (Lib) nosy:

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-03-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Quick patch below. I'll make a PR once I have time to :-) diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py index ffdf426..945afa2 100644 --- a/Lib/multiprocessing/pool.py +++ b/Lib/multiprocessing/pool.py @@ -128,6 +128,8 @@ def

[issue29861] multiprocessing Pool keeps objects (tasks, args, results) alive too long

2017-03-20 Thread Antoine Pitrou
New submission from Antoine Pitrou: The various workers in multiprocessing.Pool keep a reference to the last encountered task or task result. This means some data may be kept alive even after the caller is done with them, as long as some other task doesn't clobber the relevant variables.

[issue26418] multiprocessing.pool.ThreadPool eats up memories

2017-03-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your script works fine here. I see: iter 30, 30040 iter 29, 269848 iter 28, 269848 iter 27, 271996 [...] -- nosy: +davin, pitrou ___ Python tracker

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread INADA Naoki
INADA Naoki added the comment: Could you give us minimum sample Python code to reproduce the error? -- nosy: +inada.naoki ___ Python tracker ___

[issue14003] __self__ on built-in functions is not as documented

2017-03-20 Thread Jim Fasarakis-Hilliard
Changes by Jim Fasarakis-Hilliard : -- nosy: +Jim Fasarakis-Hilliard ___ Python tracker ___

[issue14965] super() and property inheritance behavior

2017-03-20 Thread Ken Odegard
Changes by Ken Odegard : -- nosy: +njalerikson ___ Python tracker ___ ___

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread R. David Murray
R. David Murray added the comment: On the other hand, the current mixed case sending found a bug in your code, so it has some value. I'm neither in favor nor in objection to the change, at this point. -- ___ Python tracker

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread Daniel Birnstiel
Changes by Daniel Birnstiel : -- pull_requests: +654 ___ Python tracker ___ ___

[issue29734] nt._getfinalpathname handle leak

2017-03-20 Thread Mark Becwar
Changes by Mark Becwar : -- pull_requests: +653 ___ Python tracker ___ ___

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Lord Anton Hvornum
Lord Anton Hvornum added the comment: Seeing as I'm the one who built the server, it sure is out of spec :) I could also quickly correct for this "issue" server-side. So this is more of a "style guideline" change client-side - If no one opposes of keeping commands stylistically the same.

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread R. David Murray
R. David Murray added the comment: It is interesting that in all the years smtplib has been in use, this is the first time (as far as I know) this has been reported as a problem. I don't see any reason to object to changing it to send the commands in upper case, but the server you are

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Lord Anton Hvornum
Lord Anton Hvornum added the comment: Turns out, this goes for a lot more commands, such as: ``` Traceback (most recent call last): File "mail.py", line 12, in smtp_server.sendmail(fromaddr, toaddrs, msg) File "/usr/lib/python3.6/smtplib.py", line 866, in sendmail raise

[issue24796] Deleting names referencing from enclosed and enclosing scopes

2017-03-20 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- keywords: +easy stage: -> needs patch versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread Daniel Birnstiel
Daniel Birnstiel added the comment: I have attached a diff adding a new macro for handling pthread_* status codes. Will submit PR as soon as my CLA is approved. -- keywords: +patch versions: +Python 3.7 Added file: http://bugs.python.org/file46746/patch.diff

[issue29860] smtplib.py doesn't capitalize EHLO.

2017-03-20 Thread Lord Anton Hvornum
New submission from Lord Anton Hvornum: ``` File "mail.py", line 9, in smtp_server.starttls(context) File "/usr/lib/python3.6/smtplib.py", line 748, in starttls self.ehlo_or_helo_if_needed() File "/usr/lib/python3.6/smtplib.py", line 600, in ehlo_or_helo_if_needed (code, resp)

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: As bytes? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue29859] Return code of pthread_* in thread_pthread.h is not used for perror

2017-03-20 Thread Daniel Birnstiel
New submission from Daniel Birnstiel: Python/thread_pthread.h:145 defines the CHECK_STATUS macro used for printing error messages in case any of the calls fail. CHECK_STATUS uses perror for formatting an error message, which relies on the global erno being set (see man perror). Since the

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29854] Segfault when readline history is more then 2 * history size

2017-03-20 Thread Nir Soffer
Nir Soffer added the comment: Sure, I'll add news entry and tests. -- ___ Python tracker ___ ___

[issue29844] Windows Python installers not installing DLL to System32/SysWOW64

2017-03-20 Thread Eryk Sun
Eryk Sun added the comment: > It's inconsistent with the Linux experience of an all-users > installation Yes, if you build with --enable-shared on Linux, then the shared libraries libpython3.X.so.1.0 and libpython3.so are installed in /usr/local/lib. Currently there's no direct equivalent

[issue15590] --libs is inconsistent for python-config --libs and pkgconfig python --libs

2017-03-20 Thread Michael Haubenwallner
Changes by Michael Haubenwallner : -- pull_requests: +652 ___ Python tracker ___

[issue28522] can't make IDLEX work with python._pth and python-3.6.0b2

2017-03-20 Thread illagrenan
Changes by illagrenan : -- nosy: +illagrenan ___ Python tracker ___ ___

[issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +yselivanov stage: -> patch review type: -> behavior versions: -Python 3.3, Python 3.4 ___ Python tracker

[issue29854] Segfault when readline history is more then 2 * history size

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The fix LGTM. Any chance to write a test? And please add an entry in Misc/NEWS. -- nosy: +serhiy.storchaka, twouters stage: -> patch review type: -> crash versions: +Python 3.6 ___ Python tracker

[issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods

2017-03-20 Thread anton-ryzhov
Changes by anton-ryzhov : -- pull_requests: +650 ___ Python tracker ___ ___ Python-bugs-list

[issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods

2017-03-20 Thread anton-ryzhov
anton-ryzhov added the comment: Related to http://bugs.python.org/issue24298 -- ___ Python tracker ___ ___

[issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods

2017-03-20 Thread anton-ryzhov
New submission from anton-ryzhov: If we wrap function with bound method, which is also a wrapper around function, `inspect.signature` will not do `skip_bound_arg`. It will use `inspect.unwrap` and pass by bound method from outer function to inner one. Reproduce: ``` import functools, inspect

[issue29816] Get rid of C limitation for shift count in right shift

2017-03-20 Thread Mark Dickinson
Mark Dickinson added the comment: > Mark, could you please make a review? I'll try to find time this week. At least in principle, the change sounds good to me. -- ___ Python tracker

[issue25455] Some repr implementations don't check for self-referential structures

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't know why statuses was not updated automatically. Updated them manually. Ivan in the comment on GitHub suggested to use "concatenate" instead of "concat" in "can't concat to bytes". Maybe make it more similar to messages for list, tuple, deque,

[issue28876] bool of large range raises OverflowError

2017-03-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Akira for your patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28876] bool of large range raises OverflowError

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +649 ___ Python tracker ___ ___

[issue28876] bool of large range raises OverflowError

2017-03-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +648 ___ Python tracker ___ ___

[issue29855] The traceback compounding of RecursionError fails to work with __get__

2017-03-20 Thread Nick Coghlan
Nick Coghlan added the comment: Indeed, the traceback abbreviation doesn't try to detect recursive loops, only exactly duplicated lines. The problem is that the more state management we do in the traceback printing, the higher the chance there is of getting an error while attempt to display

[issue14208] No way to recover original argv with python -m

2017-03-20 Thread Nick Coghlan
Nick Coghlan added the comment: A few updates here: * For the specific case of `python -m`, the original argument has been available as `__main__.__spec__.name` since Python 3.4 * Also since Python 3.4, the `multiprocessing` module has correctly handled the -m switch. For more details, see

[issue29857] Provide `sys._raw_argv` for host application's command line arguments

2017-03-20 Thread Nick Coghlan
New submission from Nick Coghlan: Issue 14208 was ultimately resolved through an import system specific solution, with PEP 451 making the module name passed to `python -m` available as `__main__.__spec__.name`. However, there are other situations where it may be useful to offer an