[issue28403] Porting guide: disabling & warning on implicit unicode conversions

2016-10-10 Thread Petr Viktorin
Petr Viktorin added the comment: In portingguide [0] I could only recommend sitecustomize with a (possibly third-party) codec that emits warnings; not 'undefined'. The things that aren't ported yet are generally either Non-Python applications with Python bindings or plugins (Gimp, Samba,

[issue28230] tarfile does not support pathlib

2016-10-10 Thread Berker Peksag
New submission from Berker Peksag: Here's an updated patch with different tests and documentation changes. I simplified Lib/tarfile.py a bit (see my review comments) A slightly off-topic question: I had to update both docstrings and documentation. Should we use this as an opportunity to

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: You're right, RuntimeError is a more suitable exception type. So +1 for the second version of the patch that uses `__cause__` and the patch itself looks good to me. -- ___ Python tracker

[issue28397] Faster index range checks

2016-10-10 Thread Stefan Krah
Stefan Krah added the comment: The same applies to memoryview.c and _testbuffer.c -- I doubt that there's any measurable speed benefit and the clarity is reduced (I also don't want macros there). -- ___ Python tracker

[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: The main problem with the "undefined" encoding is that it actually *fails* the application, rather than allowing it to continue, but providing a warning at each new point where it encounters implicit encoding or decoding. This means the parts of the standard

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-10 Thread José Manuel
New submission from José Manuel: I'm using SyslogHandler from logging.handlers to send syslog messages to a Fluentd input (https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/in_syslog.rb), both in TCP and UDP. UDP works fine, but TCP does not work. The "problem" is that the

[issue28403] Porting guide: disabling & warning on implicit unicode conversions

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: Adding Petr to the nosy list, as I'd like to get his perspective on this once I have a draft docs patch to review. I also realised it made more sense to just repurpose this issue to cover the proposed docs updates. -- assignee: -> docs@python

[issue28230] tarfile does not support pathlib

2016-10-10 Thread Ethan Furman
Ethan Furman added the comment: As Serhiy was alluding to, if the incoming path is for the actual tar file and is only passed along to Python itself then we probably don't need to worry about os.fspath(). For names that will be interally stored, or are for accessing internal files, then the

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a8dd18e375c8 by INADA Naoki in branch '3.6': Issue #28405: Fix compile error for _futuresmodule.c on Cygwin. https://hg.python.org/cpython/rev/a8dd18e375c8 New changeset d2a313d13542 by INADA Naoki in branch 'default': Issue #28405: Fix compile

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread R. David Murray
R. David Murray added the comment: That sounds like a regression in argparse that we'd better track down. -- nosy: +larry, ned.deily, r.david.murray priority: normal -> release blocker ___ Python tracker

[issue28406] Possible PyUnicode_InternInPlace() edge-case bug

2016-10-10 Thread INADA Naoki
INADA Naoki added the comment: I think the comment described "Why Py_ALLOW_RECURSION is required", not "t may be NULL even if s is in the intern dict". > If PyDict_GetItem fails due to stack overflow, perhaps the Python process is > doomed to fail soon anyway. When I changed the code to use

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread INADA Naoki
INADA Naoki added the comment: Oh! Thanks, While I ran make, I had missed error message somehow. -- ___ Python tracker ___

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Charalampos Stratakis
New submission from Charalampos Stratakis: Until python3.6.0a04 it was possible to pass multiple times the -x option at regrtest. However since the 3.6.0b1 when trying the same thing I get an error. Test names are random. python3 -m test.regrtest -x test_venv -x test_gdb usage: python -m

[issue28407] Improve coverage of email.utils.make_msgid()

2016-10-10 Thread Dillon Brock
New submission from Dillon Brock: There were 2 lines of email.utils.make_msgid() that were not covered (lines 202 and 204 of Lib/email/utils.py), so I wrote a quick patch to cover them. -- components: Tests, email files: make_msgid_coverage.patch keywords: patch messages: 278430 nosy:

[issue20463] sqlite dumpiter dumps invalid script when virtual tables are used

2016-10-10 Thread Aviv Palivoda
Aviv Palivoda added the comment: Attached is patch with a fix for this issue. This is not as comprehensive as the solution in apsw but I think this should cover most of the cases. The result for Ronny dump after this fix is: BEGIN TRANSACTION; PRAGMA writable_schema=ON; INSERT INTO

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo stage: -> needs patch type: -> behavior versions: +Python 3.7 ___ Python tracker

[issue28334] netrc does not work if $HOME is not set

2016-10-10 Thread Dimitri Merejkowsky
Dimitri Merejkowsky added the comment: > if it make sense to run this on Windows I found this issue while running cross-platform code. I needed to store some credentials, did not mind having them in plain-text and I thought .netrc was a good place for this. (did not need to re-invent the

[issue20215] socketserver.TCPServer can not listen IPv6 address

2016-10-10 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- nosy: +jason.coombs ___ Python tracker ___ ___

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: Thanks, INADA. I confirmed your solution, and has succeeded to build _futures extension. Your patch has a little misspell. I fixed it. -- Added file: http://bugs.python.org/file45046/gc_track-2.patch ___ Python

[issue28408] Fix redundant code and memory leak in _PyUnicodeWriter_Finish

2016-10-10 Thread Xiang Zhang
New submission from Xiang Zhang: _PyUnicodeWriter_Finish gets 2 problems now: 1. It has two same branches handling empty strings which is redundant. 2. It may leak the inner buffer object when resize_compact fails. When resize_compact fails, the buffer object is left untouched. Then the

[issue28328] statistics.geometric_mean has no tests. Defer to 3.7?

2016-10-10 Thread Ned Deily
Changes by Ned Deily : -- priority: release blocker -> normal ___ Python tracker ___ ___

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems this is related to some changes in argparse. -- nosy: +bethard, serhiy.storchaka versions: +Python 3.5 ___ Python tracker

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Ned Deily
Ned Deily added the comment: revised patch LGTM -- nosy: +ned.deily ___ Python tracker ___ ___

[issue28179] Segfault in test_recursionlimit_fatalerror

2016-10-10 Thread Ned Deily
Ned Deily added the comment: Since this is also reproducible on some 3.5.2 platforms, I don't think it qualifies as a release blocker for 3.6.0. But it still should be addressed. -- priority: release blocker -> high ___ Python tracker

[issue2897] Deprecate structmember.h

2016-10-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: docs@python -> belopolsky stage: patch review -> commit review ___ Python tracker

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-10 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +vinay.sajip ___ Python tracker ___ ___

[issue28230] tarfile does not support pathlib

2016-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It seems to me that tarfile already supports path protocol for all external patches and no changes for tarfile are needed. Proposed patch adds tests for (already implemented) support of pathlike protocol in tarfile. -- Added file:

[issue28230] tarfile does not support pathlib

2016-10-10 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Sometimes after catching an exception we need to raise new exception of specific type, but save the information about current exception. In Python the syntax "raise ... from ..." serves this purpose (PEP 3134). But in C the code that implements this is

[issue28214] Improve exception reporting for problematic __set_name__ attributes

2016-10-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add convenient C API for "raise ... from ..." ___ Python tracker ___

[issue26869] unittest longMessage docs

2016-10-10 Thread Thomas Guettler
Thomas Guettler added the comment: @Mariatta thank you very much. This update makes the docs easy to read and understand. Thank you :-) -- ___ Python tracker

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-10 Thread Vinay Sajip
Vinay Sajip added the comment: > So I think it must be a Fluentd error. So I'll close this. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-10-10 Thread Ned Deily
Changes by Ned Deily : -- stage: needs patch -> patch review ___ Python tracker ___ ___

[issue28208] update sqlite to 3.14.2

2016-10-10 Thread Ned Deily
Ned Deily added the comment: I'd like to see this in 3.6.0b3. -- ___ Python tracker ___ ___ Python-bugs-list

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-10-10 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hi, I updated the openssl version from 1.0.2h to 1.0.2j in build-installer.py Please let me know if this works. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45054/issue28248.patch

[issue13646] Document poor interaction between multiprocessing and -m on Windows

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: These interactions were fixed in the release where *nix multiprocessing gained the ability to mimic the Windows behaviour. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: Serhiy, how does this version compare/relate to the previous discussion in http://bugs.python.org/issue23188 ? -- nosy: +ncoghlan ___ Python tracker

[issue28208] update sqlite to 3.14.2

2016-10-10 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Hello, Attached is the patch for updating sqlite version to 3.14.2. Please review, and let me know if this works. Thanks :) -- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45053/issue28208.patch

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread INADA Naoki
INADA Naoki added the comment: Thank you for reporting. C-API doc [https://docs.python.org/3.7/c-api/gcsupport.html#c._PyObject_GC_TRACK] says: > A macro version of PyObject_GC_Track(). It should not be used for extension > modules. So simply replacing it to PyObject_GC_Track() may solve

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread INADA Naoki
INADA Naoki added the comment: I need another LGTM from core developer before committing. Yury, could you see it? This is one line patch. -- ___ Python tracker

[issue28406] Possible PyUnicode_InternInPlace() edge-case bug

2016-10-10 Thread Xiang Zhang
Xiang Zhang added the comment: The code has already been changed in #27454. -- nosy: +xiang.zhang ___ Python tracker ___

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-10-10 Thread Joshua Jay Herman
Joshua Jay Herman added the comment: Thanks for reviewing Mariatta I have made a new patch that has those typos corrected. -- Added file: http://bugs.python.org/file45045/correctedRebasedAddMissingEnvironmentalVariables.patch ___ Python tracker

[issue27761] Private _nth_root function loses accuracy

2016-10-10 Thread Ned Deily
Changes by Ned Deily : -- priority: release blocker -> normal ___ Python tracker ___ ___

[issue28406] Possible PyUnicode_InternInPlace() edge-case bug

2016-10-10 Thread Larry Hastings
Larry Hastings added the comment: Ah, indeed. My mistake--I'm working in the Gilectomy branch, which is hilariously out of date. (It's stuck in February 2016.) The new version using PyDict_SetDefault() won't have *this* specific problem. Perhaps later I'll read the new code and see if I

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-10-10 Thread Ned Deily
Ned Deily added the comment: We didn't get this into 3.6.0b2; needs to be in 3.6.0b3. -- ___ Python tracker ___

[issue28373] input() prints to original stdout even if sys.stdout is wrapped

2016-10-10 Thread Adam Bartoš
Adam Bartoš added the comment: Does GNU readline do anything fancy about printing the prompt? Because you may want to use GNU readline for autocompletition while still enable colored output via wrapped stdout. Both at the same time with one call to input(). It seems that currently either you

[issue28395] Remove unnecessary semicolons

2016-10-10 Thread Mariatta Wijaya
New submission from Mariatta Wijaya: Thanks scop. The patch looks good to me, and it can be applied cleanly to 3.5, 3.6, and default branches. I did find more occurrences of unnecessary semicolons, for example (not a complete list)

[issue28403] Migration RFE: optional warning for implicit unicode conversions

2016-10-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Nick, I think you've missed the "undefined" encoding that we've had for this ever since Unicode was added to Python. You put the needed code into your sitecustomize.py file and Python2 will then behave just like Python3, i.e. raise an exception instead of

[issue28412] os.path.splitdrive documentation out of date

2016-10-10 Thread Michael Partridge
New submission from Michael Partridge: ntpath.splitdrive was updated in patch 26ec6248ee8b. (I think this was released in 2.7.8.) This changes the behaviour of splitdrive for UNC style paths. Previously: >>> ntpath.splitdrive(r'\\nancy\foo\bar') ('', 'nancy\\foo\\bar')

[issue28412] os.path.splitdrive documentation out of date

2016-10-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +benjamin.peterson ___ Python tracker ___

[issue28411] Eliminate PyInterpreterState.modules.

2016-10-10 Thread Eric Snow
New submission from Eric Snow: tl;dr PyInterpreterState does not need a "modules" field. Attached is a patch that removes it. During interpreter startup [1] the sys module is imported using the same C API [2] as any other builtin module. That API only requires one bit of import state,

[issue28334] netrc does not work if $HOME is not set

2016-10-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: FWIW, some history: The $HOME lookup was in Guido's original 1998-12-22 patch: if not file: file = os.path.join(os.environ['HOME'], ".netrc") The lookup was wrapped in try-except 4 years later to give a 'consistent error message'. Module

[issue28410] Add convenient C API for "raise ... from ..."

2016-10-10 Thread Emanuel Barry
Changes by Emanuel Barry : -- nosy: +ebarry ___ Python tracker ___ ___ Python-bugs-list

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28248] Upgrade installers to OpenSSL 1.0.2j

2016-10-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset c29045efd25e by Zachary Ware in branch '2.7': Issue #28248: Update Windows build to use OpenSSL 1.0.2j https://hg.python.org/cpython/rev/c29045efd25e New changeset d7b9ce8ae79b by Zachary Ware in branch '3.4': Issue #28248: Update Windows build to

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is not specific to -x, but affects all options. Following lines work: ./python -m test.regrtest -v test_unary test_binop ./python -m test.regrtest -u all test_unary test_binop ./python -m test.regrtest test_unary test_binop -v

[issue28411] Eliminate PyInterpreterState.modules.

2016-10-10 Thread Graham Dumpleton
Graham Dumpleton added the comment: I always use PyImport_GetModuleDict(). So long as that isn't going away I should be good. -- ___ Python tracker ___

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Xiang Zhang
Xiang Zhang added the comment: So should we still consider this a regression? Actually -x is used as a hint flag and should not be used as -x arg pair. The right usage could still work now. -- ___ Python tracker

[issue28208] update sqlite to 3.14.2

2016-10-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b7e068d6c53f by Zachary Ware in branch '3.6': Issue #28208: Update Windows build to use SQLite 3.14.2.0 https://hg.python.org/cpython/rev/b7e068d6c53f New changeset 3e329b553567 by Zachary Ware in branch 'default': Issue #28208: Merge with 3.6

[issue28411] Eliminate PyInterpreterState.modules.

2016-10-10 Thread Nick Coghlan
Nick Coghlan added the comment: (added Graham Dumpleton to the nosy list to ask if this change may impact mod_wsgi for 3.7) +1 on the general idea, but given that the current field is a public part of the interpreter state, the replacement access API should really be public as well - we

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Xiang Zhang
Xiang Zhang added the comment: This regression is introduced in 4df2d43e995d. And actually to skip multiple tests, you should use python3 -m test.regrtest -x test_venv test_gdb. Although Charalampos's example could work, it actually treats -x as a test. -- nosy: +xiang.zhang

[issue28409] test.regrtest does not support multiple -x flags

2016-10-10 Thread Xiang Zhang
Xiang Zhang added the comment: > ./python -m test.regrtest test_unary -v test_binop > ./python -m test.regrtest test_unary -u all test_binop These also fail in 3.6.0a4. You can only specify options after args now. test_binop is not valid option. Isn't this the expected behaviour?

[issue27972] Confusing error during cyclic yield

2016-10-10 Thread Max von Tettenborn
Max von Tettenborn added the comment: You are very welcome, glad I could help. -- ___ Python tracker ___ ___

[issue28397] Faster index range checks

2016-10-10 Thread Stefan Krah
Stefan Krah added the comment: Serhiy, could you please take out _decimal.c? I thought we had been through that before. :) :) :) -- nosy: +skrah ___ Python tracker

[issue28230] tarfile does not support pathlib

2016-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two kinds of paths in tarinfo: 1) External paths that correspond to filesystem paths. The path of the tar file itself, patches of added files and target directory for extraction. Supporting path protocol looks reasonable for them. 1) Internal

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Masayuki Yamamoto
New submission from Masayuki Yamamoto: I tried to build cpython on cygwin (vista x86). Core interpretor has built to success, but '_futures' extension module has failed (compile error on Modules/_futuresmodule.c:946 ). It has occured since f8815001a390 part of build log: $ uname -a

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +inada.naoki, yselivanov ___ Python tracker ___ ___

[issue28406] Possible PyUnicode_InternInPlace() edge-case bug

2016-10-10 Thread Larry Hastings
New submission from Larry Hastings: A visual inspection of PyUnicode_InternInPlace() suggests there might be a rare edge-case bug lurking there. Specifically, the bug has to do with "interned mortal" strings. Interned mortal strings are stored in the static "interned" dictionary, with their

[issue28403] Porting guide: disabling & warning on implicit unicode conversions

2016-10-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 10.10.2016 15:08, Petr Viktorin wrote: > If sys.setdefaultencoding('undefined') breaks parts of the standard library, > it might be OK for smaller scripts but I fear it won't help big projects much. That's true. It does break the stdlib (the codec was

[issue28404] Logging SyslogHandler not appending '\n' to the end

2016-10-10 Thread José Manuel
José Manuel added the comment: After reading the RFC5424 it seems that there is no such "new line message delimiter": 4.3.1. Message Length The message length is the octet count of the SYSLOG-MSG in the SYSLOG-FRAME. A transport receiver MUST use the

[issue28405] Compile error on Modules/_futuresmodule.c

2016-10-10 Thread Masayuki Yamamoto
Masayuki Yamamoto added the comment: I searched declaration for _PyGC_generation0, And it has be found at Include/objimpl.h:259 The found declaration hasn't used PyAPI_DATA macro. Hence, I wrote a patch to wrap declaration by the macro. I has succeeded to build _futures module using the