[issue25720] Fix curses module compilation with ncurses6

2016-01-13 Thread Ismail Donmez
Ismail Donmez added the comment: Any patch review/comment ? -- ___ Python tracker ___ ___ Python-bugs-list

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: I'm not a big fan of pybench (it looks unstable and so not reliable), but here are results with dict_version-4.patch. I used more loops and a lower warp factor to get more reliable tests (I hope): ./python Tools/pybench/pybench.py -f pybench.orig -w 2 -C 100

[issue23551] IDLE to provide menu link to PIP gui.

2016-01-13 Thread Terry J. Reedy
Terry J. Reedy added the comment: On python-list, Chris Angelico reported 2 other problems when running something like "import pip; pip.main(['install','psycopg2'])" from IDLE. Both can be worked around in a pipgui program. 1. pip displays a progress bar by sending to stdout a sequence of

[issue25720] Fix curses module compilation with ncurses6

2016-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: configure.ac directly uses w->_flags in a check. It looks that this check always fails with ncurses6. -- ___ Python tracker

[issue23990] Callable builtin doesn't respect descriptors

2016-01-13 Thread Graham Dumpleton
Changes by Graham Dumpleton : -- nosy: +grahamd ___ Python tracker ___ ___

[issue19072] classmethod doesn't honour descriptor protocol of wrapped callable

2016-01-13 Thread Ionel Cristian Mărieș
Changes by Ionel Cristian Mărieș : -- nosy: +ionelmc ___ Python tracker ___ ___

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: Patch version 4: I forgot to include my patch to update test_sys. Now the full Python test suite pass. -- Added file: http://bugs.python.org/file41599/dict_version-4.patch ___ Python tracker

[issue23551] IDLE to provide menu link to PIP gui.

2016-01-13 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue26097] 2.7 documentation about TextTestRunner do not specify all the arguments

2016-01-13 Thread Nicolas Évrard
New submission from Nicolas Évrard: Some of the arguments although specified further in the documentation do not appear in the signature of TextTestRunner. Here's a simple patch to include them. -- assignee: docs@python components: Documentation files: unittest_doc_bug.diff keywords:

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Did we want a deprecation warning too? I didn't tested on Windows. If bytes paths considered deprecated on Windows, os.listdir() should emit a warning. Otherwise I don't think we should special case os.walk(). --

[issue25911] Regression: os.walk now using os.scandir() breaks bytes filenames on windows

2016-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed a typo found by Eryk Sun. -- Added file: http://bugs.python.org/file41598/walk_bytes_2.patch ___ Python tracker

[issue25720] Fix curses module compilation with ncurses6

2016-01-13 Thread Ismail Donmez
Ismail Donmez added the comment: Thats not an issue for ncurses because Include/py_curses.h does: #ifdef HAVE_NCURSES_H /* configure was checking , but we will use , which has all these features. */ #ifndef WINDOW_HAS_FLAGS #define WINDOW_HAS_FLAGS 1 #endif #ifndef

[issue26098] PEP 510: Specialize functions with guards

2016-01-13 Thread STINNER Victor
New submission from STINNER Victor: Attached patch implements the PEP 510 "Specialize functions with guards". Changes on the C API are described in the PEP: https://www.python.org/dev/peps/pep-0510/#changes Additions of the patch: * Add func_specialize() and func_get_specialized() to

[issue23762] python.org page on new-style classes should be updated

2016-01-13 Thread Berker Peksag
Berker Peksag added the comment: I've now added a warning to the document. -- stage: needs patch -> resolved status: pending -> closed ___ Python tracker

[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2016-01-13 Thread Ezio Melotti
Ezio Melotti added the comment: Thanks for the patch, however I got several errors while trying to apply it, so I ended up backporting d560eece0857 instead. This can be closed now. -- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open ->

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread R. David Murray
Changes by R. David Murray : -- nosy: -r.david.murray ___ Python tracker ___ ___

[issue22642] trace module: convert to argparse

2016-01-13 Thread Berker Peksag
Berker Peksag added the comment: Thanks, Senthil. My comment was for Vajrasky's patch, not for the whole argparse switch. We need to add tests for the old getopt code first to avoid regressions. After 0aa46b9ffba3, if we add tests we won't be able to test the old interface. My other

[issue26102] access violation in PyErrFetch if tcur==null in PyGILState_Release

2016-01-13 Thread Christian Berger
New submission from Christian Berger: I've been messing with PyGILState_... handling for my embedded python interpreter and came across this issue: code in PyGILState_Release: PyThreadState *tcur = (PyThreadState *)PyThread_get_key_value(

[issue26103] Contradiction in definition of "data descriptor" between (dotted lookup behavior/datamodel documentation) and (inspect lib/descriptor how-to)

2016-01-13 Thread Aaron Hall
New submission from Aaron Hall: Based on the data-model documentation (https://docs.python.org/2/reference/datamodel.html#invoking-descriptors) and the dotted lookup behavior, the follow definitions are correct: "If the descriptor defines __set__() and/or __delete__(), it is a data

[issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules

2016-01-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset e3763d98c46e by Ezio Melotti in branch '2.7': #7944: close files explicitly in test_tarfile (backport d560eece0857). https://hg.python.org/cpython/rev/e3763d98c46e -- nosy: +python-dev ___ Python tracker

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Vinay Sajip
Vinay Sajip added the comment: Logging has been in the Python stdlib for over a dozen years, and in all that time, no one else has had a problem with the way handler locks and formatting work in logging. Your problem arises because your use case is very unusual, and this is why I don't

[issue25924] investigate if getaddrinfo(3) on OSX is thread-safe

2016-01-13 Thread A. Jesse Jiryu Davis
A. Jesse Jiryu Davis added the comment: An Apple Developer Relations engineer tells me it's "reasonable to assume that getaddrinfo() is thread safe" on OS X 10.5 and later. (He mentioned that iOS inherited the OS X 10.5 DNS architecture, so Apple phones, watches, TVs, hairdryers, etc. can all

[issue24203] Deprecate threading.Thread.isDaemon etc

2016-01-13 Thread Berker Peksag
Berker Peksag added the comment: The docs for old API already say: Old getter/setter API for name; use it directly as a property instead. https://docs.python.org/3.5/library/threading.html#threading.Thread.getName Users don't read the documentation every six or fifteen months so it would

[issue26104] Reference leak in functools.partial constructor in failure case

2016-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This bug is fixed by more comprehensive patch for issue25945. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Type confusion in partial_setstate and partial_call leads to memory

[issue26106] Move licences to literal blocks

2016-01-13 Thread Ezio Melotti
Ezio Melotti added the comment: Sounds like a reasonable request to me. Given the content of document, special care should be taken in reviewing the patch and making sure that nothing has gone missing. -- nosy: +ezio.melotti stage: -> patch review type: -> enhancement

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames
Rose Ames added the comment: that's what I figured. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26069] Remove the Deprecated API in trace module

2016-01-13 Thread Berker Peksag
Berker Peksag added the comment: Sorry, I don't have much time investigate this further, but here is a few references from my bookmarks: * http://bugs.python.org/msg253473 (from issue 20438) * https://hg.python.org/peps/rev/570913685f49 (this doesn't mention old APIs, but I think we can

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames
Rose Ames added the comment: Patch with tests. Not sure if importlib.h should be included? -- ___ Python tracker ___

[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Ezio Melotti
Ezio Melotti added the comment: This is documented at https://docs.python.org/3/library/json.html#standard-compliance-and-interoperability and https://docs.python.org/3/library/json.html#infinite-and-nan-number-values The default could be changed if we go through a deprecation process, but I'm

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames
Changes by Rose Ames : -- keywords: +patch Added file: http://bugs.python.org/file41609/issue25791.patch ___ Python tracker ___

[issue26104] Reference leak in functools.partial constructor in failure case

2016-01-13 Thread Josh Rosenberg
New submission from Josh Rosenberg: Minor bug introduced while implementing the fix for #7830: In the case where functools.partial is wrapping another functools.partial instance, both of them providing positional arguments, the value nargs is not freed when the tuple concatenation fails and

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard
Florent Viard added the comment: Come on, please stop trying to close the issue so fast without deeply thinking about it. A lot of years without a "detailed" bug report indicating the root cause is not a "proof" that there is no bug. Otherwise, you can say that there is no more bug in

[issue26106] Move licences to literal blocks

2016-01-13 Thread Julien
New submission from Julien: In the context of translating the documentation: I'd like to move the licence texts in https://docs.python.org/3.5/license.html to literal blocks, so they won't pollute the po files with legal (untranslatable) stuff, and it's visually more appealing (as far as it's

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Rose Ames
Rose Ames added the comment: Thanks for the quick review, new patch uploaded. -- Added file: http://bugs.python.org/file41611/issue25791_2.patch ___ Python tracker

[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Connor Wolf
New submission from Connor Wolf: The Python library JSON library doesn't emit JSON by default. Basically, `json.dumps(float('nan'))` produces something that kind of looks like json, but isn't (specifically, `'NaN'`). Valid JSON must be `null`. JSON *does not allow `NaN`, `infinity`, or

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: Including importlib.h doesn't hurt. -- ___ Python tracker ___ ___

[issue25591] refactor imaplib tests

2016-01-13 Thread Maciej Szulik
Maciej Szulik added the comment: David can you please take a look once more, I've applied all the changes you've asked for. I'm currently working on adding the existing tests rewritten to use the new framework so it's easy to compare. It's still in progress but the general idea should

[issue26105] Python JSON module doesn't actually produce JSON

2016-01-13 Thread Connor Wolf
Connor Wolf added the comment: The problem here is that JSON is *everywhere*, and I only ran into this particular issue after a whole bunch of digging as to why my "JSON" messages were disappearing in some javascript. Basically, with the default the way it is, you have interoperability bombs

[issue25791] Raise an ImportWarning when __spec__.parent/__package__ isn't defined for a relative import

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

[issue26059] Integer Overflow in strop.replace()

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: > Do you have any idea how to fix it? strop is a deprecated module, you can write ("\x100" *0xEAAA).replace("\x100", "AA"*0x). Does this instruction also crash? -- nosy: +haypo ___ Python tracker

[issue25822] Add docstrings to fields of urllib.parse results

2016-01-13 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil ___ Python tracker ___ ___

[issue22642] trace module: convert to argparse

2016-01-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0aa46b9ffba3 by Senthil Kumaran in branch 'default': Issue22642 - Convert trace module's option handling mechanism from getopt to argparse. https://hg.python.org/cpython/rev/0aa46b9ffba3 -- nosy: +python-dev

[issue22642] trace module: convert to argparse

2016-01-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69aa17b1f894 by Senthil Kumaran in branch 'default': Add a NEWS entry for Issue #22642. https://hg.python.org/cpython/rev/69aa17b1f894 -- ___ Python tracker

[issue22642] trace module: convert to argparse

2016-01-13 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the contribution. The option handling of trace module is modernized now. As berker suggested in one of the review comments, this module could see an increase in test coverage and we could deal with this as separate ticket. -- resolution:

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor
New submission from STINNER Victor: If the code of sitecustomize raises an ImportError because the requested module doesn't exist, sitecustomize exception is silently ignored because site.py uses "try: import sitecustomize except ImportError: pass". It's possible to log a warning since

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +brett.cannon ___ Python tracker ___ ___

[issue26098] PEP 510: Specialize functions with guards

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: An unit test is needed on pickle serialization to ensure that the specialize code and guards are ignored. -- ___ Python tracker

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file41605/guard_benchmark.py ___ Python tracker ___

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: guard_benchmark.patch: patch adding a _testcapi.guard_benchmark(), a microbenchmark on dictionary guard. The benchmark measures the cost of checking if a dictionary key was modified. Run the benchmark with attached guard_benchmark.py. Result on my PC: *

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard
Florent Viard added the comment: Sorry to reply after a so long time. Please don't close this issue too fast, there is really a big issue that is not related to my specific case. (Note that the attached test case is not the real case, but a small piece of code that is able to reproduce the

[issue25668] Deadlock in logging caused by a possible race condition with "format"

2016-01-13 Thread Florent Viard
Florent Viard added the comment: Sorry, typo in my last sentence: "I would have agreed with your point if the problem was NOT solvable,..." -- ___ Python tracker

[issue26098] PEP 510: Specialize functions with guards

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2 fixes some bugs and add more tests. More notes about the patch: * RuntimeError is raised if guard check() result is greater than 2 * RuntimeError is raised if guard init() result is greater than 1 * (hum, maybe 'res < 0' check must be replaced

[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor
New submission from STINNER Victor: Attached patch adds a new optim_args_from_interpreter_flags() function to the test.support module, similar to the existing args_from_interpreter_flags() function. The function creates command line arguments related to optimization. The function is required

[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests ___ Python tracker ___ ___

[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: Do you want that the change should be applied to Python 3.5 too? -- ___ Python tracker ___

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread STINNER Victor
New submission from STINNER Victor: "./python Lib/test/test_compileall.py" fails on test_compile_path() because the Lib/test/ directory is in sys.path and this directory contains invalid Python scripts like Lib/test/badsyntax_pep3120.py Attached patch fixes the issue by removing temporarely

[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: Note: running directly "./python Lib/test/test_compileall.py" fails because of the issue #26101. -- nosy: +brett.cannon ___ Python tracker

[issue26100] Add test.support.optim_args_from_interpreter_flags()

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: I forgot Lib/test/test_cmd_line_script.py. -- Added file: http://bugs.python.org/file41608/optim_args-2.patch ___ Python tracker

[issue25752] asyncio.readline - add customizable line separator

2016-01-13 Thread Марк Коренберг
Марк Коренберг added the comment: During development, we decide not to change readline() function. So, yes, this issue is closed. -- ___ Python tracker

[issue25752] asyncio.readline - add customizable line separator

2016-01-13 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue3824] test_tarfile fails on cygwin (unicode decode error)

2016-01-13 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> out of date stage: -> resolved status: pending -> closed type: -> behavior ___ Python tracker

[issue26093] __qualname__ different when calling generator object w/ functions.partial

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

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: A cleaner way to do what you're after is to use test_importlib.util.import_state() where you can pass in an explicit value for sys.path to be temporarily set. Otherwise I'm fine with the idea of the proposed change. --

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: > A cleaner way to do what you're after is to use > test_importlib.util.import_state() where you can pass in an explicit value > for sys.path to be temporarily set. I would prefer to not couple test_importlib and test_compileall to keep tests independent. If

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: This is a change in semantics. It might be better to log an ImportWarning when the import fails and keep the current semantics (and be careful about importing warnings). -- ___ Python tracker

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: Don't care enough to do the work to separate it out, so if you don't want to bother either then LGTM. -- ___ Python tracker

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> haypo ___ Python tracker ___ ___