[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be nice if you provided the solution with %S. But if you don't do this, and nobody other provide other pull request, I'll merge the current solution. When the dictionary keys are changed during iteration PyDict_Next() can skip some key-value pairs

[issue27880] cPickle fails on large objects (still - 2011 and counting)

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

[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Xiang! -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue29540] Add compact=True flag to json.dump/dumps

2017-03-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: [Serhiy] > Personally I dislike any complication of json API. > Likely it is already the most complicated API in the stdlib. [Bob Ippolito] > the interface here is already a bit too complex > and the benefit is pretty minimal I concur with those

[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Xiang Zhang
Xiang Zhang added the comment: >>> import cPickle [45575 refs] >>> cPickle.dumps('a' * (2 ** 31),-1) Traceback (most recent call last): File "", line 1, in OverflowError: cannot serialize a string larger than 2 GiB [45606 refs] >>> :-) -- nosy: +xiang.zhang

[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread Ned Deily
Changes by Ned Deily : -- stage: -> resolved status: open -> closed type: crash -> ___ Python tracker ___

[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread INADA Naoki
INADA Naoki added the comment: > 1.On both Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, > using lowercase v's causes a crash on some kind of import. Lowercase -v is not version, it's "verbose". and -vv is "very verbose". So it's not crash, just a verbose message about

[issue29806] Requesting version info with lowercase -v or -vv causes an import crash

2017-03-13 Thread Anne Moroney
New submission from Anne Moroney: In trying to test the new feature in 3.6.0, $ python -VV # get more info than python -V or python --version I found several oddities. 1.On both Amazon Linux AMI Python 2.7.12 and also Anaconda Python 3.6.0, using lowercase v's causes a crash on some kind

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread DAVID ALEJANDRO Pineda
DAVID ALEJANDRO Pineda added the comment: Hello Again. The problem can be replicated in the same structure when call the 'functools.partial' feature I wrote a simple example. It uses the asyncio and multiprocessing structure. https://github.com/dpineiden/async_multiprocessing With this

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Eryk Sun
Eryk Sun added the comment: Moving a file across volumes isn't atomic. Getting an exception in this case can be useful. There could be a "strict" keyword-only parameter that defaults to False. If it's true, then replace() won't try to move the file. -- nosy: +eryksun

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Michael Seifert
Michael Seifert added the comment: Given that this my first contribution to CPython I'm not too sure about the etiquette. When do I know (or who decides) when an agreement on a fix is reached? I wouldn't mind retracting the pull request if someone else wants to fix it differently. I actually

[issue27657] urlparse fails if the path is numeric

2017-03-13 Thread Tim Graham
Tim Graham added the comment: Based on discussion in issue 16932, I agree that reverting the parsing decisions from issue 754016 (as Martin suggested in msg271719) seems appropriate. I created a pull request that does that. -- nosy: +Tim.Graham ___

[issue19675] Pool dies with excessive workers, but does not cleanup

2017-03-13 Thread ppperry
ppperry added the comment: Can't you just mock the Process class to have a start method that always raises an error? -- nosy: +ppperry ___ Python tracker

[issue29715] Arparse improperly handles "-_"

2017-03-13 Thread paul j3
paul j3 added the comment: The change to `_parse_optional` that did go through is the ability to turn off abbreviations http://bugs.python.org/issue14910 Even that has had a few complaints, http://bugs.python.org/issue29777 -- ___ Python tracker

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Łukasz Langa
Łukasz Langa added the comment: I'd also prefer %S instead of a hard-coded check. -- nosy: +lukasz.langa ___ Python tracker ___

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread Yury Selivanov
Yury Selivanov added the comment: > AttributeError: Can't pickle local object 'WeakSet.__init__.._remove' Well, I don't think we can do something about it. Just re-pack your arguments from WeakSet to a regular set. -- ___ Python tracker

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Laurent Mazuel
Laurent Mazuel added the comment: Just to confirm, I was able to workaround it with Py3.6: # client_generated_path.replace(destination_folder) shutil.move(client_generated_path, destination_folder) It is reasonable to think about adding a similar feature to pathlib if it doesn't

[issue29517] "Can't pickle local object" when uses functools.partial with method and args...

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide your code as a text, not a picture. -- ___ Python tracker ___

[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 662 presumably fixes this issue. Could anyone please check that the test case is fixed? I have no enough memory for testing. -- assignee: -> serhiy.storchaka nosy: +alexandre.vassalotti, serhiy.storchaka stage: -> patch review

[issue27880] cPickle fails on large objects (still - 2011 and counting)

2017-03-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +545 ___ Python tracker ___ ___

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Brett Cannon
Changes by Brett Cannon : -- components: +Library (Lib) -IO ___ Python tracker ___ ___

[issue29805] Pathlib.replace cannot move file to a different drive on Windows if filename different

2017-03-13 Thread Laurent Mazuel
New submission from Laurent Mazuel: Trying to use Pathlib and Path.replace on Windows if drive are different leads to an issue: File "D:\myscript.py", line 184, in update client_generated_path.replace(destination_folder) File "c:\program files (x86)\python35-32\Lib\pathlib.py", line

[issue754016] urlparse goes wrong with IP:port without scheme

2017-03-13 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue17560] problem using multiprocessing with really big objects?

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Pickle currently handle byte strings and unicode strings larger than 4GB only with protocol 4. But multiprocessing currently uses the default protocol which currently equals 3. There was suggestions to change the default pickle protocol (issue23403), the

[issue29540] Add compact=True flag to json.dump/dumps

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I expressed my opinion, but I am ready to change it if this proposal meets the support of other core developers after discussion on the mailing list. -- ___ Python tracker

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyUnicode_FromFormat() crashes in debug build if the argument for %U is not a unicode string. I thought about using %S. This would correspond possible Python implementation (`'%s=%r' % (key, value)`). But in that case we should increase refcounts of key

[issue15564] cgi.FieldStorage should not call read_multi on files

2017-03-13 Thread Joshua Shields
Joshua Shields added the comment: I ran into this issue as well. I think it is something cgi.py will need to handle correctly when this type of file is uploaded from a browser's file input. -- nosy: +jshields ___ Python tracker

[issue29800] functools.partial segfaults in repr when keywords attribute is abused

2017-03-13 Thread Josh Rosenberg
Josh Rosenberg added the comment: I feel like adding a type check to partial_repr might not be the correct fix here. If PyUnicode_FromFormat returned NULL and set an exception here, then the existing code would work as written (raising an exception, but not segfaulting). Alternatively, if the

[issue29540] Add compact=True flag to json.dump/dumps

2017-03-13 Thread Brett Cannon
Brett Cannon added the comment: So new options sounds like a no-go, but what about the COMPACT attribute on the json module as per https://github.com/python/cpython/pull/72? -- ___ Python tracker

[issue27657] urlparse fails if the path is numeric

2017-03-13 Thread Tim Graham
Changes by Tim Graham : -- pull_requests: +543 ___ Python tracker ___ ___

[issue754016] urlparse goes wrong with IP:port without scheme

2017-03-13 Thread Tim Graham
Changes by Tim Graham : -- pull_requests: +544 ___ Python tracker ___ ___

[issue16932] urlparse fails at parsing "www.python.org:80/"

2017-03-13 Thread Tim Graham
Changes by Tim Graham : -- pull_requests: +542 ___ Python tracker ___ ___

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-13 Thread Iryna
Changes by Iryna : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2017-03-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: @xiang.zhang - I am the OP for this issue, so naturally I expect this to be fixed. I have a work-around in place for my own code, so I have no opinion on the particular versions. I guess the normal policy on bug fixes should apply. --

[issue29787] Internal importlib frames visible when module imported by import_module throws exception

2017-03-13 Thread Brett Cannon
Brett Cannon added the comment: That's because the frame-stripping trick is done through import.c which importlib.import_module() doesn't pass through. So thanks for the report, Ulrich, but it is working as expected and we won't be changing import_module() to pass through the C code to keep

[issue29688] Add support for Path.absolute()

2017-03-13 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: brett.cannon -> ___ Python tracker ___ ___

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2017-03-13 Thread Ethan Furman
Ethan Furman added the comment: I suspect it was a simple oversight, and should be added now. Since it's been missing for so long I think we should put it in 3.7, maybe put it in 3.6 (maybe not, since it has two point releases out now), but definitely not in 3.5. --

[issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture

2017-03-13 Thread Iryna
New submission from Iryna: I am trying to build Python 3.6.1rc1 on Fedora, and have the following test failing on arm64 (aarch64) architecture: == FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase)

[issue29770] Executable help output (--help) at commandline is wrong for option -B

2017-03-13 Thread Wolfgang Langner
Wolfgang Langner added the comment: Thanks for fixing this so fast. Good work. -- ___ Python tracker ___ ___

[issue3353] make built-in tokenizer available via Python C API

2017-03-13 Thread Dustin J. Mitchell
Dustin J. Mitchell added the comment: If the patch still applies cleanly, I have no issues with you or anyone opening a PR. I picked this up several years ago at the PyCon sprints, and don't remember a thing about it, nor have I touched any other bit of the CPython source since then. So any

[issue12284] argparse.ArgumentParser: usage example option

2017-03-13 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> works for me stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue29715] Arparse improperly handles "-_"

2017-03-13 Thread Martin Panter
Martin Panter added the comment: Max, I’m not sure if you saw the double-dash (--) workaround. IMO that is the “correct” way to do this for Unix command lines, and for the current version of “argparse”. But I guess that may be too inconvenient for your Morse Code case. Perhaps you can write

[issue3353] make built-in tokenizer available via Python C API

2017-03-13 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: Could you submit a PR for this? I haven't seen any objections to this change, a PR will expose this to more people and a clear decision on whether this change is warranted can be finally made (I hope). -- nosy: +Jim Fasarakis-Hilliard

[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-03-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Extension Modules nosy: +serhiy.storchaka stage: -> patch review ___ Python tracker

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

2017-03-13 Thread Nick Coghlan
Nick Coghlan added the comment: OK, the PEP 538 reference implementation has reached the point where I was willing to create a PR for it: https://github.com/python/cpython/pull/659 That PR/branch also includes the necessary changes to always force the C.UTF-8 locale on Android rather than

[issue28856] %b format for bytes does not support objects that follow the buffer protocol

2017-03-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sometimes the implementation can expose drawbacks of initial design. I don't know whether there was good reason for omitting the support of the buffer protocol (in that case the PEP should be updated) or this is just an oversign. We should ask Ethan about

[issue29803] Remove some redandunt ops in unicodeobject.c

2017-03-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +541 ___ Python tracker ___ ___ Python-bugs-list

[issue29803] Remove some redandunt ops in unicodeobject.c

2017-03-13 Thread Xiang Zhang
Changes by Xiang Zhang : -- components: Interpreter Core nosy: haypo, serhiy.storchaka, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Remove some redandunt ops in unicodeobject.c type: enhancement versions: Python 3.7

[issue29730] unoptimal calls to PyNumber_Check

2017-03-13 Thread Oren Milman
Oren Milman added the comment: thanks for the reviews :) -- ___ Python tracker ___ ___ Python-bugs-list

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

2017-03-13 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +540 ___ Python tracker ___ ___