[issue26914] Fix formatting of lists in PEP 420

2016-05-02 Thread Georg Brandl
Georg Brandl added the comment: Looks pretty rampant to me :) Anyway, +1 for fixing, you can just do it without review if you have the time. -- ___ Python tracker

[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2016-05-02 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue26914] Fix formatting of lists in PEP 420

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For references: PEP 0302: New Import Hooks PEP 0327: Decimal Data Type PEP 0339: Design of the CPython Compiler PEP 0362: Function Signature Object PEP 0364: Transitioning to the Py3K Standard Library PEP 0372: Adding an ordered dictionary to collections PEP

[issue26914] Fix formatting of lists in PEP 420

2016-05-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +georg.brandl ___ Python tracker ___ ___

[issue26905] from multiprocessing.pool import Pool bug on linux

2016-05-02 Thread SilentGhost
Changes by SilentGhost : -- nosy: +jnoller, sbt -larry type: -> behavior ___ Python tracker ___

[issue18391] socket.fromfd()'s API is difficult or impossible to use correctly in general

2016-05-02 Thread Christian Heimes
Christian Heimes added the comment: fromfd() can be simplified after #26907 has landed. -- versions: +Python 3.6 -Python 2.7, Python 3.4 ___ Python tracker

[issue26907] Add missing getsockopt constants

2016-05-02 Thread Christian Heimes
New submission from Christian Heimes: The socket doesn't expose some constants for getsockopt() and setsockopt(): Get domain and protocol from socket fd SO_DOMAIN SO_PROTOCOL enable/disable passing of credentials SO_PASSCRED get security context (SELinux context) SO_PEERSEC enable/disable

[issue26906] format(object.__reduce__) fails intermittently

2016-05-02 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith type: -> behavior ___ Python tracker ___

[issue26906] format(object.__reduce__) fails intermittently

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch makes method descriptors types to be explicitly initialized as in 3.x. -- components: +Interpreter Core keywords: +patch nosy: +serhiy.storchaka stage: -> patch review Added file:

[issue22656] `help` ignores `__doc__` of descriptors

2016-05-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue23903] Generate PC/python3.def by scraping headers

2016-05-02 Thread Zachary Ware
Zachary Ware added the comment: > There is a code for parsing preprocessor instructions in Argument Clinic. > May be it can be reused here. It already is, actually; its availability was a major factor in my thinking this would be possible and starting to work on it. --

[issue26908] "1and 0" evaluated a zero, instead of SyntaxError

2016-05-02 Thread Vladimir Rutsky
New submission from Vladimir Rutsky: Looks like there is no need to place space separators after numbers: $ python3.5 -c "print(1and 0)" 0 $ python3.5 -c "print([1for i in range(1)])" [1] Not sure is this a bug or a feature, but I would expect that this should be SyntaxError, same as here: $

[issue26909] Serious performance loss (10 times) when NOT using .drain()

2016-05-02 Thread Марк Коренберг
New submission from Марк Коренберг: https://github.com/python/asyncio/issues/338 (example of program shows bug resides on github) -- components: asyncio messages: 264655 nosy: gvanrossum, haypo, mmarkk, yselivanov priority: normal severity: normal status: open title: Serious

[issue26908] "1and 0" evaluated a zero, instead of SyntaxError

2016-05-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 13610. You can read issue 13610 for more information. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> On Python parsing numbers.

[issue26858] setting SO_REUSEPORT fails on android

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I'll wait until Android support is closer. Do you have a core dev who's mentoring/reviewing here? -- ___ Python tracker

[issue26219] implement per-opcode cache in ceval

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: I'm also looking for some example code that would show clearly the kind of speedup we're talking about. -- ___ Python tracker

[issue26910] dictionary literal should not allow duplicate keys

2016-05-02 Thread Luigi Semenzato
New submission from Luigi Semenzato: This was already discussed and rejected at https://bugs.python.org/issue16385. I am reopening because I am not convinced that the discussion presented all arguments properly. The original problem description: lives_in = { 'lion': ['Africa', 'America],

[issue26219] implement per-opcode cache in ceval

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: I'm confused by the relationship between this and issue 26110. That seems to be a much simpler patch (which also doesn't apply cleanly). If 26110 really increases method calls by 20%, what does this add? (By which I mean (a) what additional optimizations

[issue26110] Speedup method calls 1.2x

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: This patch doesn't apply cleanly any more. Is it easy to update? -- ___ Python tracker ___

[issue26858] setting SO_REUSEPORT fails on android

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: If there are a lot of Android issue maybe you could get a tracker manager to add a new keyword or category or whatever? -- ___ Python tracker

[issue26910] dictionary literal should not allow duplicate keys

2016-05-02 Thread R. David Murray
R. David Murray added the comment: Since this has been previously rejected, I'm closing this issue as a duplicate. If you want to reopen the discussion of the merits, the python-ideas mailing list is the appropriate forum. I encourage you to raise it there. -- nosy: +r.david.murray

[issue26219] implement per-opcode cache in ceval

2016-05-02 Thread Yury Selivanov
Yury Selivanov added the comment: > I'm confused by the relationship between this and issue 26110. This patch embeds the implementation of 26110. I'm no longer sure it was a good idea to have two issues instead of one, everybody seems to be confused about that ;) > That seems to be a much

[issue26911] lib2to3/tests/pytree_idempotency.py has a broken import

2016-05-02 Thread Ivan Zakhryaschev
New submission from Ivan Zakhryaschev: Line 21 of lib2to3/tests/pytree_idempotency.py: import pgen2 This seems to be broken, because it should be: import lib2to3.pgen2 (This makes the auto-requirements generator in ALT Sisyphus to generate a broken/unsatisfiable dependency on pgen2 when

[issue26858] setting SO_REUSEPORT fails on android

2016-05-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue26858] setting SO_REUSEPORT fails on android

2016-05-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: Stefan has already commited and closed some of the issues listed at issue #26865. Martin has closed issue #22359, a blocker for the cross-compilation of python. I will enter an issue for all the failures listed at

[issue26911] lib2to3/tests/pytree_idempotency.py has a broken import

2016-05-02 Thread Ivan Zakhryaschev
Ivan Zakhryaschev added the comment: BTW, this source file seems to be not used anywhere. -- ___ Python tracker ___

[issue26911] lib2to3/tests/pytree_idempotency.py has a broken import

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

[issue13610] On Python parsing numbers.

2016-05-02 Thread Vladimir Rutsky
Changes by Vladimir Rutsky : -- nosy: +rutsky ___ Python tracker ___ ___ Python-bugs-list

[issue23903] Generate PC/python3.def by scraping headers

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also closely related issue26900. -- ___ Python tracker ___ ___

[issue24225] Idlelib: changing file names

2016-05-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: For back compatibility reasons, I rejected a 'simple renaming', much as I would like to do it for reasons already given, and closed *this* issue in msg250451. As I said then here and elsewhere, I instead propose to add new files with new names. As I said

[issue26902] Argument Clinic incorrectly works with custom converter and renamed parameter

2016-05-02 Thread Larry Hastings
Larry Hastings added the comment: This is caused by your "meth_o inline" code, which isn't checked in yet. A clean checkout of CPython trunk generates this correct code: if (!PyArg_Parse(arg, "O&:test", PyUnicode_FSConverter, )) Maybe you don't need to use bugs.python.org as your

[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for 3.5 that allows to not repeat braces too much. This will help to backport new fixes to 3.5. -- Added file: http://bugs.python.org/file42679/clinic_escape_braces.patch ___ Python tracker

[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2016-05-02 Thread Larry Hastings
Larry Hastings added the comment: Why is this dependent on #26305? -- ___ Python tracker ___ ___

[issue26305] Make Argument Clinic to generate PEP 7 conforming code

2016-05-02 Thread Larry Hastings
Larry Hastings added the comment: I'm not excited by this new addition to PEP 7, so I'm excusing myself from this issue. -- ___ Python tracker ___

[issue26902] Argument Clinic incorrectly works with custom converter and renamed parameter

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You are right. Sorry for the noise. -- ___ Python tracker ___ ___

[issue23867] Argument Clinic: inline parsing code for 1-argument functions

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because new generated code contains "if" statements and braces (and PEP 7 requires even more braces than current patch adds). The patch for issue26305 allows to repeat braces only twice instead of 4 times. -- ___

[issue26914] Fix formatting of lists in PEP 420

2016-05-02 Thread Ned Batchelder
New submission from Ned Batchelder: The numbered and bulletted lists are indented from the body text, which looks good in the .rst, but causes the lists themselves to be blockquotes. This leads to confusing formatting on python.org: https://www.python.org/dev/peps/pep-0420/ BTW: this

[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2016-05-02 Thread Łukasz Langa
Łukasz Langa added the comment: At this point I agree with Robert. It's public API that predates my changes which was inadequately mocked. I've seen similar problems in the past when we've changed reading file objects to use plain iteration instead of the .readlines() method. I've had people

[issue26812] ExtendedInterpolation drops user-defined 'vars' during _interpolate_some() recursion

2016-05-02 Thread Łukasz Langa
Łukasz Langa added the comment: This is true. Care to author a patch? -- assignee: -> lukasz.langa ___ Python tracker ___

[issue26710] ConfigParser: Values in DEFAULT section override defaults passed to constructor

2016-05-02 Thread Łukasz Langa
Łukasz Langa added the comment: Having both `defaults` and `overrides` would confuse the API, especially given that we already have `fallback` arguments to `get*` methods. What's the point of having overrides *over* a file? Defaults were thought of as a way to say: "unless the user bothered

[issue26913] statistics.mean of bools

2016-05-02 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +steven.daprano ___ Python tracker ___ ___

[issue26219] implement per-opcode cache in ceval

2016-05-02 Thread Yury Selivanov
Yury Selivanov added the comment: > OK, I get it. I think it would be really helpful if issue 26110 was updated, > reviewed and committed -- it sound like a good idea on its own, and it needs > some burn-in time due to the introduction of two new opcodes. (That's > especially important since

[issue26537] ConfigParser has optionxform, but not sectionxform

2016-05-02 Thread Łukasz Langa
Changes by Łukasz Langa : -- assignee: -> lukasz.langa ___ Python tracker ___ ___

[issue26537] ConfigParser has optionxform, but not sectionxform

2016-05-02 Thread Łukasz Langa
Łukasz Langa added the comment: I agree sectionxform would be nice. Care to author a patch? The current workaround is modifying the SECTCRE regular expression. -- ___ Python tracker

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

2016-05-02 Thread Łukasz Langa
Łukasz Langa added the comment: Closing this as setuptools switched to RawConfigParser. -- resolution: -> not a bug status: open -> closed ___ Python tracker

[issue26913] statistics.mean of bools

2016-05-02 Thread Zachary Ware
Changes by Zachary Ware : -- versions: -Python 3.4 ___ Python tracker ___ ___

[issue26912] test/test_email/torture_test.py (and test_asian_codecs.py) has a broken import

2016-05-02 Thread R. David Murray
R. David Murray added the comment: torture_test is not currently run, and this is intentional (it uses a large external resource). It is kept for reference and in case anyone wants to run it by hand[*]. The import should be fixed. test_asian_codecs is run automatically by the unittest load

[issue26912] test/test_email/torture_test.py (and test_asian_codecs.py) has a broken import

2016-05-02 Thread Ivan Zakharyaschev
New submission from Ivan Zakharyaschev: (An issue similar to http://bugs.python.org/issue26911 , but with a different source file from the tests) Lib/test/test_email/torture_test.py:15:from email.test.test_email import TestEmailBase should be: from test.test_email import TestEmailBase

[issue26913] statistics.mean of bools

2016-05-02 Thread Peter Norvig
New submission from Peter Norvig: mean([True, True, True, False]) should be 0.75, but it returns 0.25. The fix is to change _sum so that when the type is bool, the result should be coerced to int, not bool. Why it is important for statistics.mean to work with bools: It is natural to say

[issue26912] test/test_email/torture_test.py (and test_asian_codecs.py) has a broken import

2016-05-02 Thread Zachary Ware
Changes by Zachary Ware : -- components: +email nosy: +barry, r.david.murray versions: +Python 3.6 ___ Python tracker ___

[issue26876] Extend MSVCCompiler class to respect environment variables

2016-05-02 Thread Rohit Jamuar
Rohit Jamuar added the comment: Just so that I understand it clearly - Inside MSVCCompiler class (in _msvccompiler.py / msvccompiler.py / msvc9compiler.py ), current implementation of find_exe() finds compiler / linker / ... after parsing PATH. Should the changes be so, that if

[issue26913] statistics.mean of bools

2016-05-02 Thread R. David Murray
R. David Murray added the comment: Already fixed: #24068. -- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> statistics module - incorrect results with boolean input ___ Python tracker

[issue26219] implement per-opcode cache in ceval

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: All sounds good. Glad the issue of long-running loops is at least on your radar. -- ___ Python tracker ___

[issue26905] from multiprocessing.pool import Pool bug on linux

2016-05-02 Thread Josh Rosenberg
Josh Rosenberg added the comment: The Queue module (queue on Py3) is for communication between threads, not processes; what you've written wouldn't behave correctly on any version of Python. You want to use multiprocessing's Queue class, not Queue.Queue, and to avoid possible deadlocks, you

[issue26896] mix-up with the terms 'importer', 'finder', 'loader' in the import system and related code

2016-05-02 Thread Oren Milman
Oren Milman added the comment: thanks for the review! I replied to both of your comments, though I am not sure what is expected of me in the rest of the process. Whatever it is, I would be happy to help as much as I can. -- ___ Python tracker

[issue26219] implement per-opcode cache in ceval

2016-05-02 Thread Guido van Rossum
Guido van Rossum added the comment: OK, I get it. I think it would be really helpful if issue 26110 was updated, reviewed and committed -- it sound like a good idea on its own, and it needs some burn-in time due to the introduction of two new opcodes. (That's especially important since

[issue26282] Add support for partial keyword arguments in extension functions

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Removed development code from tests (thanks Martin for catching this) and adds support in Argument Clinic. Now the patch is complete and ready for final review. -- components: +Argument Clinic, Interpreter Core stage: -> patch review Added file:

[issue26282] Add support for partial keyword arguments in extension functions

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For example here is a patch that partially reverts issue26243 by making "data" positional parameter, but keeping "level" positional-or-keyword parameter. -- Added file: http://bugs.python.org/file42682/zlib_compress_positional_only_data.patch

[issue18916] Various out-of-date Lock text in 3.2+

2016-05-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the path, Christopher. -- assignee: -> docs@python components: +Documentation -Interpreter Core nosy: +berker.peksag, docs@python resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.5, Python 3.6

[issue26858] setting SO_REUSEPORT fails on android

2016-05-02 Thread Xavier de Gaye
Xavier de Gaye added the comment: The patch was not intended to be proposed as a way to fix this problem, but as an indication of what the problem is. This issue is a dependency of issue #26865: Meta-issue: support of the android platform. I should have posted instead the result of running

[issue26904] Difflib quick_ratio() could use Counter()

2016-05-02 Thread Wolfgang Maier
Wolfgang Maier added the comment: Given your comment about sum((fullacount & fullbcount).values()), why not use its in-place version: fullacount &= fullbcount matches = sum(fullacount.values()) ? -- nosy: +wolma ___ Python tracker

[issue26906] format(object.__reduce__) fails intermittently

2016-05-02 Thread Antti Haapala
Antti Haapala added the comment: s/explicitly do/explicitly access/ -- ___ Python tracker ___ ___

[issue25392] setup.py --quiet doesn't silence "no previously-included directories" warnings from MANIFEST.in

2016-05-02 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Distutils nosy: +berker.peksag, dstufft, eric.araujo stage: -> needs patch type: -> behavior versions: +Python 3.6 -Python 3.3, Python 3.4 ___ Python tracker

[issue26905] from multiprocessing.pool import Pool bug on linux

2016-05-02 Thread Larry Hastings
Larry Hastings added the comment: This has nothing to do with Argument Clinic, which is an internal tool used in the Python 3.x series. -- components: -Argument Clinic nosy: -859911096 ___ Python tracker

[issue23903] Generate PC/python3.def by scraping headers

2016-05-02 Thread Steve Dower
Steve Dower added the comment: As I recall, the tool is ready to go. The problem is the argument over what to do with all the APIs that currently are incorrect. Zach had a list at PyCon last year, and the consensus seemed to be that "someone" should figure out whether each API should be

[issue26914] Fix formatting of lists in PEP 420

2016-05-02 Thread Ned Batchelder
Ned Batchelder added the comment: OK, "rampant" was overly dramatic... :) These PEPs seem to have the same issue: pep-0302.html pep-0327.html pep-0339.html pep-0362.html pep-0364.html pep-0372.html pep-0380.html pep-0382.html pep-0393.html pep-0400.html pep-0403.html pep-0404.html

[issue16385] evaluating literal dict with repeated keys gives no warnings/errors

2016-05-02 Thread Gregory P. Smith
Gregory P. Smith added the comment: Raising an error on duplicates also has precedent: >>> dict(a=3, b=4, a=5) File "", line 1 SyntaxError: keyword argument repeated -- nosy: +gregory.p.smith ___ Python tracker

[issue26710] ConfigParser: Values in DEFAULT section override defaults passed to constructor

2016-05-02 Thread Marc Abramowitz
Marc Abramowitz added the comment: Well my thought is that the configuration file has defaults that a user may want to override at runtime using an environment variable or command-line switch. I guess as SilentGhost pointed out, maybe this is not the responsibility of the ConfigParser as

[issue26888] Multiple memory leaks after raw Py_Initialize and Py_Finalize.

2016-05-02 Thread SilentGhost
Changes by SilentGhost : -- components: +Interpreter Core -Library (Lib) nosy: +haypo, serhiy.storchaka ___ Python tracker ___

[issue26890] inspect.getsource gets source copy on disk even when module has not been reloaded

2016-05-02 Thread SilentGhost
Changes by SilentGhost : -- nosy: +yselivanov ___ Python tracker ___ ___

[issue18916] Various out-of-date Lock text in 3.2+

2016-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 203c9c4ccb2a by Berker Peksag in branch '3.5': Issue #18916: Update thread module docstrings https://hg.python.org/cpython/rev/203c9c4ccb2a New changeset 57a475e0e378 by Berker Peksag in branch 'default': Issue #18916: Update thread module

[issue26893] ValueError exception raised when using IntEnum with an attribute called "name" and @unique decorator

2016-05-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> ethan.furman ___ Python tracker ___

[issue26905] from multiprocessing.pool import Pool bug on linux

2016-05-02 Thread yangming
New submission from yangming: When my code run on windows,it's right,but on linux,id(q) print same RAM address. -- components: Argument Clinic files: pool.py messages: 264637 nosy: 859911096, larry priority: normal severity: normal status: open title: from multiprocessing.pool import

[issue25757] Subclasses of property lose docstring

2016-05-02 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Torsten. This is a duplicate of issue 24766. Your patch is almost identical (except the behavior change) to the patch in issue 24766. I will adapt your test and attribute your name in commit message. -- resolution: -> duplicate

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2016-05-02 Thread Berker Peksag
Berker Peksag added the comment: test_property_decorator_doc_writable fix has already been committed in cc1aa0e88626. Here's an updated patch: * Synced with the default branch * Adapted the test from duplicate issue 25757 (written by Torsten Landschoff) -- nosy: +berker.peksag,

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I should mention a change in dis which hasn't come up for the sake of > explicit discussion: I modified dis to not print EXTENDED_ARG. This may be a problem since jumps can now point on address not output in disassemble. May be this is good idea (I'm

[issue22656] `help` ignores `__doc__` of descriptors

2016-05-02 Thread Berker Peksag
Berker Peksag added the comment: The attached patch should solve this. We probably need to add more tests. test_property_subclass depends on issue 24766. -- keywords: +patch nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.4

[issue26881] modulefinder should reuse the dis module

2016-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is pretty simple patch and I'm going to push it in short time if there are no objections. This can make the patch for issue26647 simpler since handling extended args is isolated in one function. Alternative names for _unpack_args() are welcome. An

[issue24766] Subclass of property doesn't preserve instance __doc__ when using doc= argument

2016-05-02 Thread Erik Bray
Erik Bray added the comment: Thanks for the updated patch. LGTM. -- ___ Python tracker ___ ___

[issue18766] IDLE: Autocomplete in editor doesn't work for un-imported modules

2016-05-02 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26906] __reduce__ format

2016-05-02 Thread Antti Haapala
Changes by Antti Haapala : -- nosy: ztane priority: normal severity: normal status: open title: __reduce__ format versions: Python 2.7 ___ Python tracker

[issue26906] format(object.__reduce__) fails intermittently

2016-05-02 Thread Antti Haapala
New submission from Antti Haapala: This is an annoying heisenbug; it seems that some objects cannot be formatted until you explicitly do obj.__format__. For example `object.__reduce__` behaves like this: Python 2.7.10 (default, Oct 14 2015, 16:09:02) [GCC 5.2.1 20151010] on linux2