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

2017-03-12 Thread Artem Smotrakov
Changes by Artem Smotrakov : -- keywords: +patch Added file: http://bugs.python.org/file46723/_struct_cache.patch ___ Python tracker

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

2017-03-12 Thread Artem Smotrakov
New submission from Artem Smotrakov: Attached struct_unpack_crash.py results to a null-pointer dereference in s_unpack_internal() function of _struct module: ASAN:SIGSEGV = ==20245==ERROR: AddressSanitizer: SEGV on unknown address

[issue29715] Arparse improperly handles "-_"

2017-03-12 Thread paul j3
paul j3 added the comment: http://bugs.python.org/issue9334, 'argparse does not accept options taking arguments beginning with dash (regression from optparse)' is an old discussion about strings that begin with a dash and don't match defined flags. One proposal was to add a

[issue29798] Handle "git worktree" in "make patchcheck"

2017-03-12 Thread Nick Coghlan
Nick Coghlan added the comment: Turns out I missed another isdir() check in get_base_branch(), so this still isn't working properly in git worktree directories. -- resolution: fixed -> stage: resolved -> needs patch status: closed -> open ___

[issue17560] problem using multiprocessing with really big objects?

2017-03-12 Thread artxyz
artxyz added the comment: @davin Thanks for your answer! I will update to the current version. -- ___ Python tracker ___

[issue29795] Clarify how to share multiprocessing primitives

2017-03-12 Thread Davin Potts
Changes by Davin Potts : -- resolution: -> works for me stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue17560] problem using multiprocessing with really big objects?

2017-03-12 Thread Davin Potts
Davin Potts added the comment: @artxyz: The current release of 2.7 is 2.7.13 -- if you are still using 2.7.5 you might consider updating to the latest release. As pointed out in the text of the issue, the multiprocessing pickler has been made pluggable in 3.3 and it's been made more

[issue29801] Spam

2017-03-12 Thread Zachary Ware
Changes by Zachary Ware : -- nosy: -SH4Y4N resolution: -> not a bug stage: -> resolved status: open -> closed title: amazing! -> Spam ___ Python tracker

[issue29801] amazing!

2017-03-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- Removed message: http://bugs.python.org/msg289525 ___ Python tracker ___

[issue29688] Add support for Path.absolute()

2017-03-12 Thread INADA Naoki
INADA Naoki added the comment: > posixpath.abspath() collapses "//.." to "", this is not > correct. Not sure about ntpath.abspath(). I feel this is reasonable limitation, and expected behavior for some cases. So I think adding note about this in document is enough. -- nosy:

[issue17560] problem using multiprocessing with really big objects?

2017-03-12 Thread artxyz
artxyz added the comment: This is still an issue in Python 2.7.5 Will it be fixed? -- nosy: +artxyz ___ Python tracker ___

[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-12 Thread Tim Peters
Tim Peters added the comment: @ppperry, I believe you're right - good catch! I expect the current patch would treat the NotImplemented return as meaning "the first argument is less than the second argument". I added a comment to the code (on github) suggesting an obvious fix for that.

[issue22576] ftplib documentation gives a wrong argument name for storbinary

2017-03-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- versions: +Python 2.7 ___ Python tracker ___ ___

[issue22576] ftplib documentation gives a wrong argument name for storbinary

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

[issue29795] Clarify how to share multiprocessing primitives

2017-03-12 Thread Max
Max added the comment: Actually, never mind, I think one of the paragraphs in the Programming Guidelines ("Explicitly pass resources to child processes") basically explains everything already. I just didn't notice it until @noxdafox pointed it out to me on SO. Close please. --

[issue29715] Arparse improperly handles "-_"

2017-03-12 Thread Max Rothman
Max Rothman added the comment: I think that makes sense, but there's still an open question: what should the correct way be to allow dashes to be present at the beginning of positional arguments? -- ___ Python tracker

[issue29756] Improve documentation for list methods that compare items by equality

2017-03-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

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

2017-03-12 Thread Xiang Zhang
Xiang Zhang added the comment: What's your opinions Alexander and Ethan? -- ___ Python tracker ___ ___

[issue29756] Improve documentation for list methods that compare items by equality

2017-03-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: I'm afraid I don't know what SUT means. But 3 == 3.0 is the correct and expected behaviour. If you need to check that two values are both the same type and the same value, you have to validate the type and value separately. Changing the behaviour of == is

[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-12 Thread ppperry
ppperry added the comment: - Doesn't youre skipping PyObject_RichCompareBool and directly getting tp_richcompare also mean that you bypass the NotImplemented checking? Thus, wouldn't this code, which raises a TypeError currently, silently work? class PointlessComparator: def

[issue28810] Document bytecode changes in 3.6

2017-03-12 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +538 ___ Python tracker ___ ___

[issue29688] Add support for Path.absolute()

2017-03-12 Thread Eryk Sun
Eryk Sun added the comment: It's the same with ntpath.abspath since the underlying GetFullPathName function processes the path only as a string. OK, so it seems we're requiring that p.absolute().resolve() is the same as p.resolve(). Consider the following example: >>> p =

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. Thank you Oren. -- assignee: -> serhiy.storchaka resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue29799] Add tests for header API of 'urllib.request.Request' class

2017-03-12 Thread Martin Panter
New submission from Martin Panter: I think the RequestTests class really belongs in test_urllib2, which already has a RequestHdrsTests class testing these APIs. BTW test_urllib.py (no 2) is mainly for testing the stuff that came from Python 2’s “urllib” module, but the Request class is in

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Oren Milman
Oren Milman added the comment: I am sorry, but I guess I am missing something about startswith() and endswith(). ISTM that PyTuple_Check() is already called by unicode_startswith, unicode_endswith and _Py_bytes_tailmatch, which already raise a TypeError with an appropriate error message (e.g.

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Oren Milman
Changes by Oren Milman : -- pull_requests: +537 ___ Python tracker ___ ___ Python-bugs-list

[issue8450] httplib: false BadStatusLine() raised

2017-03-12 Thread Martin Panter
Martin Panter added the comment: I don’t think so. It is best to avoid a new exception type (even a subclass) in a bug fix. That would break code which checks “type(exc) == BadStatusLine” or similar. Specific exception messages are supposed to be implementation details, and the current

[issue29756] Improve documentation for list methods that compare items by equality

2017-03-12 Thread Alexander Todorov
Alexander Todorov added the comment: Hi folks, I have another very similar issue, it could be the same root cause. Let me know if it is. assert 3 == 3.0 will pass self.assertEqual(3, 3.0) - will pass this had the nasty side effect of my test suite not catching a problem with SUT. I have

[issue7427] BadStatusLine is hell to debug

2017-03-12 Thread Martin Panter
Martin Panter added the comment: This change was only made in 2.7a4, not 2.6 -- versions: +Python 2.7 -Python 2.6 ___ Python tracker ___

[issue15082] [httplib] httplib.BadStatusLine on any HTTPS connection in certain unknown cases.

2017-03-12 Thread Martin Panter
Changes by Martin Panter : -- resolution: -> fixed stage: -> test needed status: open -> pending ___ Python tracker ___

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

2017-03-12 Thread Michael Seifert
Changes by Michael Seifert : -- pull_requests: +536 ___ Python tracker ___ ___

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

2017-03-12 Thread Michael Seifert
New submission from Michael Seifert: It's possible to create a segfault when one (inappropriatly) changes the functools.partial.keywords attribute manually. A minimal example reproducing the segfault is: >>> from functools import partial >>> p = partial(int) >>> p.keywords[1] = 10 >>> repr(p)

[issue29742] asyncio get_extra_info() throws exception

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!?

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue29688] Add support for Path.absolute()

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: posixpath.abspath() collapses "//.." to "", this is not correct. Not sure about ntpath.abspath(). -- nosy: +serhiy.storchaka ___ Python tracker

[issue28685] Optimizing list.sort() by performing safety checks in advance

2017-03-12 Thread Elliot Gorokhovsky
Elliot Gorokhovsky added the comment: OK, I added the safety check to unsafe_object_compare. I verified that it matches the current implementation on all the tests proposed in this thread. -- ___ Python tracker

[issue29688] Add support for Path.absolute()

2017-03-12 Thread Brett Cannon
Brett Cannon added the comment: "What's the rationale for not calling self._flavour.pathmod.abspath() to implement absolute()?" Beats me. :) It's just how Antoine wrote it and that's all I know. -- ___ Python tracker

[issue26121] Use C99 functions in math if available

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

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please open a PR for review. Checking PyTuple_Check() is needed if this code is used in startswith() and endswith(). "integer argument or None expected" -- I'm not sure this wording is correct enough. What wording is used in other similar code? I'm sure

[issue29742] asyncio get_extra_info() throws exception

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +534 ___ Python tracker ___ ___

[issue29742] asyncio get_extra_info() throws exception

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +535 ___ Python tracker ___ ___

[issue29795] Clarify how to share multiprocessing primitives

2017-03-12 Thread Max
Max added the comment: Somewhat related is this statement from Programming Guidelines: > When using the spawn or forkserver start methods many types from > multiprocessing need to be picklable so that child processes can use them. > However, one should generally avoid sending shared objects

[issue29715] Arparse improperly handles "-_"

2017-03-12 Thread paul j3
paul j3 added the comment: I think that this string falls through to the last case in 'parser._parse_optional' (the first parsing loop) # it was meant to be an optional but there is no such option # in this parser (though it might be a valid option in a subparser)

[issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!?

2017-03-12 Thread Yury Selivanov
Yury Selivanov added the comment: What a bizarre bug. Created a PR with a fix. Nathaniel, please put me in a nosy list when you submit issues about generators/coroutines. -- nosy: +yselivanov ___ Python tracker

[issue29600] Returning an exception object from a coroutine triggers implicit exception chaining?!?

2017-03-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- pull_requests: +533 ___ Python tracker ___ ___

[issue29715] Arparse improperly handles "-_"

2017-03-12 Thread paul j3
Changes by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Oren Milman
Oren Milman added the comment: "Perhaps some methods need to check also PyTuple_Check()." which methods? anyway, a new patch diff file is attached, according to your other seggustions, Serhiy. (I ran the test module, and some tests of my own, and it seems that the patch doesn't break anything.)

[issue29797] Deadlock with multiprocessing.Queue()

2017-03-12 Thread Tim Peters
Changes by Tim Peters : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-03-12 Thread Claudiu Popa
Claudiu Popa added the comment: I'm adding another example here, where the lineno reporting is wrong: from ast import parse n = parse(''' def test(): return f"{a}" ''') f = n.body[0].body[0].value.values[0] n = f.value print("name lineno", n.lineno) In this example, the

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-12 Thread Steve Dower
Steve Dower added the comment: Thanks, Nick! I agree that this alone isn't worth a second RC, though if we fix another "nearly worth it" (especially anything related to the github transition) we may want to consider it still. Ned - I'd be okay to sneak out another release this week if we

[issue29799] Add tests for header API of 'urllib.request.Request' class

2017-03-12 Thread Jaysinh shukla
Changes by Jaysinh shukla : -- pull_requests: +532 ___ Python tracker ___ ___

[issue28667] FD_SETSIZE is unsigned on FreeBSD

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

[issue29799] Add tests for header API of 'urllib.request.Request' class

2017-03-12 Thread Jaysinh shukla
Changes by Jaysinh shukla : -- components: Tests nosy: jaysinh.shukla priority: normal severity: normal status: open title: Add tests for header API of 'urllib.request.Request' class type: enhancement versions: Python 3.7 ___

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +531 ___ Python tracker ___ ___

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +530 ___ Python tracker ___ ___

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Done. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue15695] Correct __sizeof__ support for StgDict

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker

[issue8450] httplib: false BadStatusLine() raised

2017-03-12 Thread Shoham Peller
Shoham Peller added the comment: How about back-porting the v3.5 fix, and the new "RemoteDisconnected" exception? Is that reasonable? -- nosy: +Shoham Peller ___ Python tracker

[issue8256] input() doesn't catch _PyUnicode_AsString() exception; io.StringIO().encoding is None

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +529 ___ Python tracker ___ ___

[issue29779] New environment variable PYTHONHISTORY

2017-03-12 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: That's a great feature! Here's a question: what should be CPython's behavior when PYTHONHISTORY is explicitly set to empty? Currently there's an error: $ PYTHONHISTORY= ./python Python 3.7.0a0 (master:f6595983e08fe20cf06a2535d74d912c6dbb044f, Mar 12 2017,

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2017-03-12 Thread Nick Coghlan
Nick Coghlan added the comment: With the fix for issue 29723 merged, this should be properly resolved now (and the fix available with 3.6.1). -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-12 Thread Nick Coghlan
Nick Coghlan added the comment: Noting for the record: Steve reviewed & approved the original PR before I merged that and did the backport to 3.6. With the new test case ensuring sys.path configuration consistency and Paul's report of success when checking the original problem from issue

[issue15695] Correct __sizeof__ support for StgDict

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +528 ___ Python tracker ___ ___

[issue29779] New environment variable PYTHONHISTORY

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

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +527 ___ Python tracker ___ ___

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 637 revert to using the own implementations of lgamma and gamma on all platforms. -- ___ Python tracker ___

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +526 ___ Python tracker ___ ___

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-12 Thread Nick Coghlan
Nick Coghlan added the comment: I've merged PR 575 to master, and 636 is pending a successful Travis run for 3.6. Both branches still need NEWS entries- I'll do those as independent PRs rather than cherry-picking (since cherry picking NEWS changes is currently still doomed to fail)

[issue29319] Embedded 3.6.0 distribution cannot run pyz files

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +525 ___ Python tracker ___ ___

[issue29723] 3.6.1rc1 adds the current directory to sys.path when running a subdirectory's __main__.py; previous versions did not

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +524 ___ Python tracker ___ ___

[issue29797] Deadlock with multiprocessing.Queue()

2017-03-12 Thread Max
Max added the comment: Yes, this makes sense. My bad, I didn't realize processes might need to wait until the queue is consumed. I don't think there's any need to update the docs either, nobody should have production code that never reads the queue (mine was a test of some other issue).

[issue29798] Handle "git worktree" in "make patchcheck"

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Mark Dickinson
Mark Dickinson added the comment: Please can we revert to using the existing implementations of lgamma and gamma on all platforms? It's clear that there are many issues with OS-provided implementations. -- ___ Python tracker

[issue29797] Deadlock with multiprocessing.Queue()

2017-03-12 Thread Eryk Sun
Eryk Sun added the comment: On Windows the "QueueFeederThread" in each child process is blocked in WaitForMultipleObjects in PipeConnection._send_bytes. The pipe buffer size is 8 KiB, and each pickled int is 5-6 bytes. With 2 processes the pipe is full after sending (256 + 469) * 2 == 1450

[issue29798] Handle "git worktree" in "make patchcheck"

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +523 ___ Python tracker ___ ___

[issue29798] Handle "git worktree" in "make patchcheck"

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +522 ___ Python tracker ___ ___

[issue29798] Handle "git worktree" in "make patchcheck"

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- pull_requests: +521 ___ Python tracker ___ ___

[issue29656] Change "make patchcheck" to be branch aware

2017-03-12 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The call of PyNumber_Check() is redundant if we don't bother about error message. But if we want to have accurate error message we should check types before converting. In parse_args_finds_byte we should check rather PyObject_CheckBuffer() (and maybe

[issue29730] unoptimal calls to PyNumber_Check

2017-03-12 Thread Oren Milman
Oren Milman added the comment: "In bytes/bytearray methods -- integers and bytes-like objects." (I guess you refer to parse_args_finds_byte (in Objects/bytes_methods.c)) so you suggest that in case (!PyIndex_Check(tmp_subobj)), we also check whether (PyByteArray_Check(tmp_subobj) or

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are accuracy issues with tgamma() and lgamma() on Windows. But less than on OS X. == FAIL: test_mtestfile (test.test_math.MathTests)

[issue29797] Deadlock with multiprocessing.Queue()

2017-03-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +davin ___ Python tracker ___ ___

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 632 switch on using libc implementation on Windows. Will see how AppVeyor tests passed. -- ___ Python tracker ___

[issue26121] Use C99 functions in math if available

2017-03-12 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +520 ___ Python tracker ___ ___

[issue29746] Update marshal docs to Python 3

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

[issue25996] Add support of file descriptor in os.scandir()

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your investigation Eryk. Helpful as always. Since I have no access to Windows I left this feature Unix-only. -- ___ Python tracker

[issue28749] Fixed the documentation of the mapping codec APIs

2017-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you still have objections Marc-Andre? -- ___ Python tracker ___ ___