[issue29557] binhex documentation claims unknown bug

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue29566. Perhaps hexbin() bug is related to that bug. -- ___ Python tracker ___

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-03-04 Thread Nick Coghlan
Nick Coghlan added the comment: An updated reference implementation has been pushed to the pep538-coerce-c-locale branch in my GitHub fork: https://github.com/python/cpython/compare/master...ncoghlan:pep538-coerce-c-locale (That doesn't include Xavier's Android fixes yet, though) --

[issue29557] binhex documentation claims unknown bug

2017-03-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +390 ___ Python tracker ___ ___

[issue29557] binhex documentation claims unknown bug

2017-03-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +389 ___ Python tracker ___ ___

[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This could fix other issues: * issue16535 -- for Decimal. * issue20774 -- for deque. * issue24313 -- for NumPy numeric types. * issue26263 -- for array. Currently the blessed way of JSON encoder customization is to implement the default method in

[issue20774] collections.deque should ship with a stdlib json serializer

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue27362 for more general approach. -- ___ Python tracker ___ ___

[issue29722] heapq.merge docs are misleading with the "reversed" flag

2017-03-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___

[issue29701] Add close method to queue.Queue

2017-03-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's a link to the feature request for Ruby, https://bugs.ruby-lang.org/issues/10600 . It looks like the feature was implemented without examining any concrete use cases. A quick code search on Github did not reveal any cases where the feature was ever

[issue29710] Incorrect representation caveat on bitwise operation docs

2017-03-04 Thread Nick Coghlan
Nick Coghlan added the comment: Added 2.7 to the list of affected versions. Clearly my 2's-complement arithmetic is incredibly rusty, as for some reason I was thinking "~(-sys.maxint-1)" could overflow, but no, the answer to that is just "sys.maxint" :) -- versions: +Python 2.7

[issue29722] heapq.merge docs are misleading with the "reversed" flag

2017-03-04 Thread Adam
Changes by Adam : -- title: heapq.merge docs don't handle reverse flag well -> heapq.merge docs are misleading with the "reversed" flag ___ Python tracker

[issue29722] heapq.merge docs don't handle reverse flag well

2017-03-04 Thread Adam
New submission from Adam: The docs for heapq.merge are a little misleading. Iterables passed into heapq.merge with the reversed flag set to True must be sorted from largest to smallest to achieve the desired sorting effect, but the paragraph describing the function in the general case states

[issue20774] collections.deque should ship with a stdlib json serializer

2017-03-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: See also, the same feature request from Tarek Ziadé, http://bugs.python.org/issue29663 , "collections.deque could be serialized in JSON as a simple array. The only thing we can lose in the process is the maxlen value, but I think it's a decent behaviour to

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-04 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +387 ___ Python tracker ___ ___

[issue13986] ValueError: cannot convert float NaN to integer

2017-03-04 Thread David Robins
David Robins added the comment: I saw a similar error with Python 3.6 on a MIPS (32-bit - mipsisa32r2el-axis-linux-gnu) platform, but during interpreter startup, not install (perhaps because it was cross-compiled so install on the host doesn't run the target Python). It was due to building

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

2017-03-04 Thread Steve Dower
Steve Dower added the comment: I just did my build for 3.6.1rc1 and it looks like `git name-rev --name-only --tags HEAD` returns "3.6.1rc1^0" for some reason. Perhaps "git describe" is the better command to use here? From what I've seen of that, it should do "tag if tagged, else short hash"

[issue24037] Argument Clinic: add the boolint converter

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch uses bool(accept={int}) rather of boolint. It also updates more functions converted to Argument Clinic. -- versions: +Python 3.7 -Python 3.5 Added file: http://bugs.python.org/file46700/clinic-boolint-converter-3.patch

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-03-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Proposed patch renames METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS > and makes bare METH_FASTCALL be used for functions with > positional-only parameters. +1 -- nosy: +rhettinger ___ Python tracker

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-03-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file46699/fastcall-no-keywords-3.patch ___ Python tracker ___

[issue29721] "abort: repository . not found!" during the build of Python 2.7

2017-03-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The message "abort: repository . not found!" is output to stderr three times during the build of Python 2.7. To be more precise, it happens during the build of getbuildinfo.c. $ touch Modules/getbuildinfo.c $ make -s abort: repository . not found! abort:

[issue29670] argparse: does not respect required args pre-populated into namespace

2017-03-04 Thread paul j3
paul j3 added the comment: One refactoring that I'd like to see is to move all the tests at the end of _parse_know_known_args to its caller, parse_known_args. It would have to return more values than the current namespace and extras, in particular the see_actions and

[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-03-04 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I've just tried with the latest git-master. With NDK r13b and my build scripts, [1] test_curses passed. shell@ASUS_Z00E_2:/data/local/tmp $ python3.7m -m test test_curses -u curses Run tests sequentially 0:00:00 [1/1] test_curses 1 test OK. Total duration:

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

2017-03-04 Thread Brett Cannon
Brett Cannon added the comment: git actually does not always shorten to 7 characters. In git 2.11 (I think) they shorten to the shortest length to guarantee uniqueness. So `git rev-parse --short HEAD` gives a hash of de04644627 which is 10 characters. --

[issue29715] Arparse improperly handles "-_"

2017-03-04 Thread Max Rothman
Max Rothman added the comment: Martin: huh, I didn't notice that documentation. The error message definitely could be improved. It still seems like an odd choice given that argparse knows about the expected spec, so it knows whether there are any options or not. Perhaps one could

[issue29719] "Date" of what's new is confusing

2017-03-04 Thread INADA Naoki
INADA Naoki added the comment: > is the URL for the current 3.6 branch, in other words, what will be in the > next 3.6 release. "next 3.6 release" means 3.6.1? > These are rebuilt as changes are checked in. There are some commit for fixing something after 3.6.0 released. But I think rebuild

[issue29701] Add close method to queue.Queue

2017-03-04 Thread Davin Potts
Davin Potts added the comment: The example of AMQP is perhaps a stronger argument for why multiprocessing.Queue.close should (or does) exist, not as much a reason for queue.Queue. The strongest point, I think, is the argument that existing patterns are lacking. In the multiprocessing

[issue29716] Python 3 Module doc still sounds like __init__.py is required

2017-03-04 Thread Marco Buttu
Changes by Marco Buttu : -- nosy: +marco.buttu ___ Python tracker ___ ___

[issue29720] potential silent truncation in PyLong_AsVoidPtr

2017-03-04 Thread Oren Milman
New submission from Oren Milman: I am not sure whether such a platform exists, but on a platform where SIZEOF_VOID_P < SIZEOF_LONG, PyLong_AsVoidPtr (which is in Objects/longobject.c) is: long x; if (PyLong_Check(vv) && _PyLong_Sign(vv) < 0) x = PyLong_AsLong(vv); else

[issue29708] support reproducible Python builds

2017-03-04 Thread Chi Hsuan Yen
Changes by Chi Hsuan Yen : -- nosy: +Chi Hsuan Yen ___ Python tracker ___ ___

[issue29718] Fixed compile on cygwin.

2017-03-04 Thread Decorater
Decorater added the comment: And yeah that is why I stuck most of the changes in here under __CYGWIN__ macros for now until I know otherwise that all of the changes will not break other platforms. -- ___ Python tracker

[issue29718] Fixed compile on cygwin.

2017-03-04 Thread Decorater
Decorater added the comment: hmm maybe if TSS is available on all platforms maybe python could use that instead of TLS so that way I would not have to have a lot of __CYGWIN__'s all over the place. However I am not sure if all of the OS's that are on the buildbot for python supports TSS. hmm

[issue29454] Shutting down consumer on a remote queue

2017-03-04 Thread Davin Potts
Davin Potts added the comment: My understanding of other message queueing systems is that many are motivated by speed to the point that they will permit messages to be "lost" due to specific scenarios that would be overly costly to defend against. Other message queueing systems adopt a

[issue29454] Shutting down consumer on a remote queue

2017-03-04 Thread Davin Potts
Changes by Davin Potts : -- stage: -> needs patch type: behavior -> enhancement ___ Python tracker ___

[issue29454] Shutting down consumer on a remote queue

2017-03-04 Thread Davin Potts
Davin Potts added the comment: My understanding is that example uses a queue.Queue() to demonstrate how to create a custom, remote service from scratch. The implementation in this simple example lacks the sophistication of multiprocessing.Queue() for handling situations such as the one

[issue29104] Left bracket remains in format string result when '\' preceeds it

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not experienced with git and am waiting until new workflow be described in the devguide. -- ___ Python tracker

[issue29649] struct.pack_into check boundary error message ignores offset

2017-03-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Different error messages are needed if original offset < 0. For example packing 4 bytes with offset -2 always fails, not depending of the size of the buffer. Packing into buffer of size 10 with offset -11 always fails, not depending of the size of packed

[issue29719] "Date" of what's new is confusing

2017-03-04 Thread Ned Deily
Ned Deily added the comment: It's a bit confusing but: 1. https://docs.python.org/3/whatsnew/3.6.html is the URL for the current 3.6 branch, in other words, what will be in the next 3.6 release. These are rebuilt as changes are checked in. 2.

[issue29719] "Date" of what's new is confusing

2017-03-04 Thread INADA Naoki
New submission from INADA Naoki: See https://docs.python.org/3/whatsnew/3.6.html At top: :Release: |release| :Date: |today| :Editors: Elvis Pranskevichus , Yury Selivanov This |today| is replaced with day when HTML is build (like "Last updated:" in footer).

[issue28087] macOS 12 poll syscall returns prematurely

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

[issue28087] macOS 12 poll syscall returns prematurely

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

[issue29718] Fixed compile on cygwin.

2017-03-04 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: The patch can split to several issues, moreover, some issues are able to pick up as general not Cygwin specific. Perhaps, it will be an opportunity to fix even if Cygwin specific, if we could explain the implicit issue on implementation. See #4032, #25658,

[issue26187] sqlite3 trace callback prints duplicate line

2017-03-04 Thread Aviv Palivoda
Changes by Aviv Palivoda : -- pull_requests: +384 ___ Python tracker ___ ___

[issue29659] Expose the `length` arg from shutil.copyfileobj for public use

2017-03-04 Thread INADA Naoki
INADA Naoki added the comment: How about increasing default value to 32KiB or 64KiB too? binutils's cp works well for most cases, while it doesn't have option to specify blocksize. I want Python's copy functions works nice enough for common cases too. binutils cp uses 128KiB block for normal

[issue29572] Upgrade installers to OpenSSL 1.0.2k

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