[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: > I will probably remove the optimization on frozenset since it's only useful > for AST optimizers (the optimization is a new feature, I considered that it > was worth it to add it Python 3.6 as part of my work on the PEP 511). Hum, it doesn't work:

[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2016-01-22 Thread Milan Zamazal
New submission from Milan Zamazal: When calling multiprocessing.managers.BaseManager repeatedly from a client, each time from a new thread, new entry with (already existent) multiprocessing.util.ForkAwareLocal instance is inserted as a value into multiprocessing.util._afterfork_registry

[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2016-01-22 Thread Thomas Levine
Thomas Levine added the comment: I noticed something else that might be interesting. If I delete my .pypirc and have setuptools create it, python3.5 -c 'import setuptools; setuptools.setup()' register the .pypirc is created with the un-escaped percent sign and without error. I receive the

[issue26183] 2.7.11 won't clean install on Windows 10 x64

2016-01-22 Thread Roger Cook
New submission from Roger Cook: The Windows installer stops the installation and backs out on a clean system. Here is the relevant section of the log file (msiexec /i python-2.7.11.amd64.msi /l*v): MSI (s) (14:90) [15:13:32:577]: Executing op: ActionStart(Name=RemovePip,,) Action 15:13:32:

[issue21949] Document the Py_SIZE() macro.

2016-01-22 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- resolution: out of date -> fixed ___ Python tracker ___ ___

[issue21949] Document the Py_SIZE() macro.

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63183596db79 by Gregory P. Smith in branch '2.7': Per issue21949 and issue1629: Document the Py_SIZE, Py_TYPE, Py_REFCNT macros. https://hg.python.org/cpython/rev/63183596db79 -- nosy: +python-dev ___

[issue1629] Py_Size() should be named Py_SIZE()

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63183596db79 by Gregory P. Smith in branch '2.7': Per issue21949 and issue1629: Document the Py_SIZE, Py_TYPE, Py_REFCNT macros. https://hg.python.org/cpython/rev/63183596db79 -- nosy: +python-dev ___

[issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction

2016-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: Am I really still needed on this issue? On Tue, Jan 19, 2016 at 7:46 PM, Hiroyuki Takagi wrote: > > Hiroyuki Takagi added the comment: > > Thank you for reviewing patch. > > I wrote test and updated patch. To pass the test, both this

[issue26182] Deprecation warnings for the future async and await keywords

2016-01-22 Thread Marco Buttu
New submission from Marco Buttu: I saw that async and await will become keywords in Python 3.7 : https://www.python.org/dev/peps/pep-0492/#deprecation-plans I enabled the deprecation warnings in Python 3.5.1 and Python 3.6 dev, and I noticed that assigning to async or await does not issue any

[issue26177] tkinter: Canvas().keys returns empty strings.

2016-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: split() has many warts, it shouldn't be used. It is enough just call splitlist() for elements of a list. Proposed patch fixes Misc.keys(). It also adds tests for missed options (some of them are not explicitly documented). -- components: +Library

[issue26049] Poor performance when reading large xmlrpc data

2016-01-22 Thread Raimon Esteve
Changes by Raimon Esteve : -- nosy: +resteve ___ Python tracker ___ ___

[issue20120] Percent-signs (%) in .pypirc should not be interpolated

2016-01-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: Setuptools 19 has been out for over a month now with no adverse consequences. Łukasz and David, as you both originally tagged this as won't fix, how would you feel about interpreting this as a defect and regression over Python 2.7 and fixing it it all Python

[issue26184] raise an error when create_module() is not defined by exec_module() is for loaders

2016-01-22 Thread Brett Cannon
New submission from Brett Cannon: As explained in https://docs.python.org/3/reference/import.html#loaders, as of Python 3.6 an error is to be raised when a loader defines exec_module() but not create_module(). Probably should raise a TypeError. -- components: Interpreter Core

[issue26169] Pasting 900000 chars into a tk Entry widget fails

2016-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: I understand now what you were thinking. Even a timeout might not work for this because one could paste and within a second click Find-next and likely trigger the crash. I tested printing, copying, and finding 'a'*1 and it worked. I think this is good

[issue26177] tkinter: Canvas().keys returns empty strings.

2016-01-22 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___

[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: I pushed my latest patch with minor changes in comments. I will wait for buildbots before backporting the change to Python 2.7 and 3.5. For the backport, I will probably remove the optimization on frozenset since it's only useful for AST optimizers (the

[issue19883] Integer overflow in zipimport.c

2016-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Synchronized with current sources. -- components: +Extension Modules keywords: +needs review nosy: +benjamin.peterson versions: -Python 3.4 Added file: http://bugs.python.org/file41687/zipimport_int_overflow_3.patch

[issue19225] lack of PyExc_BufferError doc

2016-01-22 Thread Gedai Tamás Bence
Gedai Tamás Bence added the comment: I've created a new table for warnings and added the missing exceptions to the exceptions table. I did not find a link for VMSError, but I added it to the table. Note that the exceptions table is not absolutely in alphabetical order, I can fix it as well,

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Brett: "Semantics are fine (I initially misread what you wanted to do; sorry)." Ok, I pushed my change. Brett: "And I wouldn't backport since it's an enhancement and not a bugfix." Ok, fine. -- resolution: -> fixed status: open -> closed versions:

[issue26099] site ignores ImportError when running sitecustomize and usercustomize

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset c873a479a6a3 by Victor Stinner in branch 'default': site: error on sitecustomize import error https://hg.python.org/cpython/rev/c873a479a6a3 -- nosy: +python-dev ___ Python tracker

[issue26169] Pasting 900000 chars into a tk Entry widget fails

2016-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I want to say that may be we can make a workaround for this issue in IDLE if it is worth. The "wont fix" resolution looks reasonable to me, but this doesn't mean that the issue couldn't be solved in principle (though the solution can be very costly). I'm

[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6c33d4cc9b8f by Victor Stinner in branch 'default': code_richcompare() now uses the constants types https://hg.python.org/cpython/rev/6c33d4cc9b8f -- nosy: +python-dev ___ Python tracker

[issue26146] PEP 511: Add ast.Constant to allow AST optimizer to emit constants

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Patch version 2: - rework the whole patch - add unit tests - fix AST validation: the code was completly wrong in patch 1, I don't understand how it worked :-p Validate also correctly nested tuple and nested frozenset. - add a comment to explain why

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2016-01-22 Thread Brett Cannon
Brett Cannon added the comment: Thanks to everyone for providing feedback. I went with ImportError in the end as that's what the pure Python implementation of __import__() already raised. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed

[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2016-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: STARTUPINFO is a class whose instances have 5 attributes. Being able to set attributes on creation is pretty normal. If one can optionally be set in __init__, same should be true for all. I would recommend that params be keyword-only. -- nosy:

[issue26128] Let the subprocess.STARTUPINFO constructor take arguments

2016-01-22 Thread Ram Rachum
Ram Rachum added the comment: Agreed on keywords-only. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18018] SystemError: Parent module '' not loaded, cannot perform relative import

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset c4e4886c6052 by Brett Cannon in branch 'default': Issue #18018: Raise an ImportError if a relative import is attempted https://hg.python.org/cpython/rev/c4e4886c6052 -- nosy: +python-dev ___ Python

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

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 219c44fe8968 by Brett Cannon in branch 'default': Issue #25791: Warn when __package__ != __spec__.parent. https://hg.python.org/cpython/rev/219c44fe8968 -- ___ Python tracker

[issue21762] update the import machinery to only use __spec__

2016-01-22 Thread Brett Cannon
Brett Cannon added the comment: I think that leaves the following attributes to be updated/checked for dependencies in importlib (and if they are found, raise ImportWarning when they differ): 1. __path__ 2. __loader__ 3. __file__ 4. __cached__ --

[issue26095] Update porting HOWTO to special-case Python 2 code, not Python 3

2016-01-22 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: docs@python -> brett.cannon ___ Python tracker ___

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9d65a195246b by Brett Cannon in branch 'default': Issue #25234: Skip test_eintr.test_open() under OS X to avoid hanging https://hg.python.org/cpython/rev/9d65a195246b -- ___ Python tracker

[issue25234] test_eintr.test_os_open hangs under Xcode 7

2016-01-22 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___

[issue26149] Suggest PyCharm Community as an editor for Unix platforms

2016-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Berker, I agree with you. The doc section is woefully incomplete and unix-specific. It probably dates back to when Python only ran on unix. -- nosy: +terry.reedy ___ Python tracker

[issue25934] ICC compiler: ICC treats denormal floating point numbers as 0.0

2016-01-22 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch that specifies /fp:strict if it looks like ICC is being used for the build. It also adds a convenient property for checking whether it's an ICC build ($(ICCBuild)). This doesn't change anything for MSVC builds but allows ICC builds to pass

[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2016-01-22 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset b1615165fa4a by Victor Stinner in branch '3.5': doc: i18n HTML templates https://hg.python.org/cpython/rev/b1615165fa4a New changeset 5af5b36c197e by Victor Stinner in branch 'default': Merge 3.5 (i18n doc, issue #25907)

[issue26163] FAIL: test_hash_effectiveness (test.test_set.TestFrozenSet)

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: as i expected, the bug disappeared. I'm not interested to investigate a random failure which only occurred once. I close the issue. -- resolution: -> out of date status: open -> closed ___ Python tracker

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: I applied 3 patches to branches 3.5 and default (3.6), but the patches don't apply cleanly to Python 2.7. Can you please cook patches for Python 2.7? (I suggest to focus on translation of the Python 3 documentation, but for me, it's cheap to apply such patch

[issue26164] test_with_pip() of test_venv fails on Windows buildbots

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: It looks like the issue was fixed with the upgrade of pip to 8.0.2: changeset c75802aaa4de (merge into default: changeset ca78f5e41012). -- ___ Python tracker

[issue26161] Use Py_uintptr_t instead of void* for atomic pointers

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff68ffcc6244 by Victor Stinner in branch 'default': Use Py_uintptr_t for atomic pointers https://hg.python.org/cpython/rev/ff68ffcc6244 -- nosy: +python-dev ___ Python tracker

[issue26161] Use Py_uintptr_t instead of void* for atomic pointers

2016-01-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26178] Python C-API: __all__ Creator

2016-01-22 Thread Devyn Johnson
New submission from Devyn Johnson: When creating Python modules via th C-API, it would be wonderful if there were an easier and more efficient way of creating an "__all__" for the module. In my opinion, an API function should be made; i.e., something like PyALL("FUNC1", "FUNC2", ...)

[issue25876] test_gdb: use subprocess._args_from_interpreter_flags() to test Python with more options

2016-01-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26178] Python C-API: __all__ Creator

2016-01-22 Thread Devyn Johnson
Devyn Johnson added the comment: Thanks, @skrah and @haypo . I never thought of it that way. I made "__all__" in my extensions because "__all__" was used in many Python scripts. Thanks for the alternative perspective. -- status: open -> closed ___

[issue25876] test_gdb: use subprocess._args_from_interpreter_flags() to test Python with more options

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9faa15da2dde by Victor Stinner in branch 'default': Issue #25876: Fix also test_set() of test_gdb when -E command line is used https://hg.python.org/cpython/rev/9faa15da2dde -- ___ Python tracker

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-22 Thread Eryk Sun
Changes by Eryk Sun : -- stage: -> resolved ___ Python tracker ___ ___

[issue25876] test_gdb: use subprocess._args_from_interpreter_flags() to test Python with more options

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 05ea3efadead by Victor Stinner in branch 'default': Issue #25876: test_gdb: use subprocess._args_from_interpreter_flags() to test https://hg.python.org/cpython/rev/05ea3efadead -- nosy: +python-dev ___

[issue26178] Python C-API: __all__ Creator

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Seting __all__ is usually need to exclude some symbols from "from module import *". In Python, it's common to write public or private (name prefixed by "_") helper functions which are excluded from __all__. In C extensions, you have to explicitly expose a

[issue26178] Python C-API: __all__ Creator

2016-01-22 Thread Stefan Krah
Stefan Krah added the comment: I agree, and that's pretty much what Guido said here, too: https://mail.python.org/pipermail/python-dev/2001-February/012591.html -- nosy: +skrah ___ Python tracker

[issue26164] test_with_pip() of test_venv fails on Windows buildbots

2016-01-22 Thread Donald Stufft
Donald Stufft added the comment: Yes, it should have been. Sorry forgot this issue was opened. -- ___ Python tracker ___

[issue26164] test_with_pip() of test_venv fails on Windows buildbots

2016-01-22 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue26108] Calling PyInitialize with 2.7.11 on Windows x64 terminates process

2016-01-22 Thread Eryk Sun
Changes by Eryk Sun : -- resolution: not a bug -> duplicate superseder: -> 32-bit 2.7.11 installer creates registry keys that are incompatible with the installed python27.dll ___ Python tracker

[issue26179] Python C-API "unused-parameter" warnings

2016-01-22 Thread Devyn Johnson
New submission from Devyn Johnson: When compiling Python C-API extensions with "-Wextra", warnings like warning: unused parameter ‘self’ [-Wunused-parameter] appear for code (like below). It seems like a minor issue for a warning to appear when "PyObject *self, PyObject *args" is required.

[issue26179] Python C-API "unused-parameter" warnings

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: > Is there an underlying issue in the API? You can use self if your code. If you don't need it, you can use Py_UNUSED() macro available since Python 3.4. -- nosy: +haypo ___ Python tracker

[issue26179] Python C-API "unused-parameter" warnings

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Please don't open bug reports to ask questions on your own code. The bug tracker is not forum. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-22 Thread Yury Selivanov
Yury Selivanov added the comment: > Patch version 5: a global counter is now used to set ma_version field of > dictionaries. The global counter is incremented each time that a dictionary > is created and each time that a dictionary is modified. This is great, thank you, Victor. --

[issue21949] Document the Py_SIZE() macro.

2016-01-22 Thread Berker Peksag
Berker Peksag added the comment: Thanks for triaging! The relevant commit is 760c5cfacbaa. -- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: > This is great, thank you, Victor. I will update the PEP 509 later for the global counter. -- ___ Python tracker ___

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-22 Thread Julien
Julien added the comment: And tags for the layout template. -- Added file: http://bugs.python.org/file41694/i18n-tags-in-layout.patch ___ Python tracker

[issue25907] Documentation i18n: Added trans tags in sphinx templates

2016-01-22 Thread Julien
Julien added the comment: And here are the i18n tags for the sidebar, thanks @haypo it was a good idea to translate them too ^-^ -- Added file: http://bugs.python.org/file41693/i18n-tags-in-sidebar.patch ___ Python tracker

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Patch version 4: Fix sys_set_code_transformers(), initialize seq to NULL to fix a crash on error handling. -- Added file: http://bugs.python.org/file41695/transformers-4.patch ___ Python tracker

[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8e0a736b82ff by Victor Stinner in branch '3.5': code_richcompare() now uses the constants types https://hg.python.org/cpython/rev/8e0a736b82ff -- ___ Python tracker

[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Ok, the fix is now pushed to Python 2.7, 3.5 and 3.6. Thanks Tijs Van Oevelen for your bug report ;-) A workaround look to define the two lambda functions on two different lines. Or maybe cast explicitly to float? I don't think that it's a common bug so you

[issue21949] Document the Py_SIZE() macro.

2016-01-22 Thread Gedai Tamás Bence
Gedai Tamás Bence added the comment: Py_SIZE: https://docs.python.org/3.5/c-api/structures.html#c.Py_SIZE PyList_New: https://docs.python.org/3.5/c-api/list.html#c.PyList_New I think they're documented now, so I guess the issue can be closed. -- nosy: +beng94

[issue26181] argparse can't handle positional argument after list (help message is wrong)

2016-01-22 Thread Alex
New submission from Alex: This code is meant to take a filename and a list of integers as arguments. The filename is required, the integers are optional: import argparse parser = argparse.ArgumentParser() parser.add_argument('filename') parser.add_argument('-L', metavar='integer', type=int,

[issue25843] code_richcompare() don't use constant type when comparing code constants

2016-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e13d97ceca2 by Victor Stinner in branch '2.7': code_richcompare() now uses the constants types https://hg.python.org/cpython/rev/9e13d97ceca2 -- ___ Python tracker

[issue24520] Stop using deprecated floating-point environment functions on FreeBSD

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: > @koobs: sorry, 3.4 now only accept security fixes :-p I wrote a table giving the status of each Python branch to know which ones still accept bugfixes or not: https://docs.python.org/devguide/#status-of-python-branches -- resolution: -> fixed

[issue26058] PEP 509: Add ma_version to PyDictObject

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Patch version 5: a global counter is now used to set ma_version field of dictionaries. The global counter is incremented each time that a dictionary is created and each time that a dictionary is modified. A dictionary version is now unique: two dictionaries

[issue26145] PEP 511: Add sys.set_code_transformers()

2016-01-22 Thread STINNER Victor
STINNER Victor added the comment: Rebased patch. -- Added file: http://bugs.python.org/file41692/transformers-3.patch ___ Python tracker ___

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

2016-01-22 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___

[issue26180] multiprocessing.util._afterfork_registry leak in threaded environment

2016-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Please post your 3.x version. 3.4 only gets security patches now. -- nosy: +terry.reedy versions: +Python 3.5, Python 3.6 -Python 3.4 ___ Python tracker