[issue30163] argparse mx_group is required, when action value equal default will be ignore

2017-04-25 Thread paul j3
paul j3 added the comment: And only for integers smaller than 257! The problem is with this test in `take_action` function # error if this argument is not allowed with other previously # seen arguments, assuming that actions that use the default # value

[issue30052] URL Quoting page links to function Bytes instead of defintion

2017-04-25 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset c6db4811f9ea3aeff0e1fafe1c60a22835ef359e by Nick Coghlan (csabella) in branch 'master': bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271) https://github.com/python/cpython/commit/c6db4811f9ea3aeff0e1fafe1c60a22835ef359e

[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2017-04-25 Thread Senthil Kumaran
Senthil Kumaran added the comment: I had started taking some action on it recently: https://github.com/python/pythondotorg/issues/1069 I verified that only one test module is affected and rest of our ftp.debian.org references are examples/docstrings that will need to be updated eventually

[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2017-04-25 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil ___ Python tracker ___ ___

[issue30164] Testing FTP support in urllib shouldn't use Debian FTP server

2017-04-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: test_urllib2net.py uses ftp://ftp.debian.org/ for testing FTP support in urllib. But Debian just announced shutting down its public FTP services. https://lists.debian.org/debian-announce/2017/msg1.html -- components: Tests messages: 292299

[issue30163] argparse mx_group is required, when action value equal default will be ignore

2017-04-25 Thread Louie Lu
Louie Lu added the comment: Maybe documentation should note that: """ # error if this argument is not allowed with other previously # seen arguments, assuming that actions that use the default # value don't really count as "present" """ -- ___ Python

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2017-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch shows a nice payoff from this short-cut, so go ahead and apply it. Still, I wish there were some aversion to posting a new patch every two days that alters twenty files all over the standard library. The rate of churn is alarming. --

[issue21150] Add quick links table to argparse docs

2017-04-25 Thread Louie Lu
Louie Lu added the comment: Could Raymond, Gaurav or paul help to review the PR's summary table? Thanks! -- ___ Python tracker ___

[issue30163] argparse mx_group is required, when action value equal default will be ignore

2017-04-25 Thread Louie Lu
Louie Lu added the comment: Strange, this will only trigger when that argument type is int. -- ___ Python tracker ___

[issue30157] csv.Sniffer.sniff() regex error

2017-04-25 Thread Jake Davis
Jake Davis added the comment: Will do! I will try to get a regression proof test into test_csv.py in the next 24 hours. Essentially I will make sure that the sniffer returns a positive match for each of the patterns that the regex is intended to hit. --

[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> backport needed ___ Python tracker ___

[issue29887] test_normalization doesn't work

2017-04-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: -> backport needed ___ Python tracker ___

[issue29960] _random.Random state corrupted on exception

2017-04-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1396 ___ Python tracker ___ ___

[issue29960] _random.Random state corrupted on exception

2017-04-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1395 ___ Python tracker ___ ___

[issue29960] _random.Random state corrupted on exception

2017-04-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1397 ___ Python tracker ___ ___

[issue30163] argparse mx_group is required, when action value equal default will be ignore

2017-04-25 Thread Louie Lu
New submission from Louie Lu: When adding mutually exclusive group and required is True, and the group argument has default value. If we type its default value, argparse will ignore the input and return `argument is required` --- PoC import argparse parser =

[issue30163] argparse mx_group is required, when action value equal default will be ignore

2017-04-25 Thread Louie Lu
Changes by Louie Lu : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue28851] namedtuples field_names sequence preferred

2017-04-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Backported to 3.6. Thanks, everyone :) -- resolution: later -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker

[issue28851] namedtuples field_names sequence preferred

2017-04-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 16b6f971bd8afc72b439b83324eba744460adb67 by Mariatta in branch '3.6': [3.6] bpo-28851: Improve namedtuple documentation (GH-1274) (GH-1286) https://github.com/python/cpython/commit/16b6f971bd8afc72b439b83324eba744460adb67 --

[issue28851] namedtuples field_names sequence preferred

2017-04-25 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +1394 ___ Python tracker ___ ___

[issue30157] csv.Sniffer.sniff() regex error

2017-04-25 Thread R. David Murray
R. David Murray added the comment: If it is a bug that indicates there is at least one missing unit test :) Maybe the OP will contribute a test. -- nosy: +r.david.murray ___ Python tracker

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2017-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Also, the ifilter() suggestion is a complete non-starter. There is no way to know in advance whether filter will return all the elements of the input or none of them. In the absence of other knowledge, the best strategy is what list.append() already does

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2017-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: > But isn't that the point of the length_hint? Where it could be used reliably, it was used and used broadly. However, there are circumstances (iterator vs iterable) where it can't know how to make an estimate and is perhaps wildly off. I would like to

[issue26828] Implement __length_hint__() on map() and filter() to optimize list(map) and list(filter)

2017-04-25 Thread Michael Seifert
Michael Seifert added the comment: > I explored that notion of iterator length transparency years ago. While I > don't remember all the details, I did record some notes at the top of > Lib/test/test_iterlen.py. But isn't that the point of the length_hint? To provide an *estimate* for the

[issue29576] Improve some deprecations in the importlib

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: This issue introduced new warnings when running test_importlib: see issue #30158. -- nosy: +haypo ___ Python tracker

[issue30158] Deprecation warnings emitted in test_importlib

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: Deprecation introduced by issue #29576 according to the PR. -- ___ Python tracker ___

[issue30158] Deprecation warnings emitted in test_importlib

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: > DeprecationWarning: MetaPathFinder.find_module() is deprecated since Python > 3.4 in favor of MetaPathFinder.find_spec()(available since 3.4) Is a space missing in the error message between "MetaPathFinder.find_spec()" and "(available since 3.4)"?

[issue30107] python.core file created when running tests on AMD64 FreeBSD CURRENT Non-Debug 3.x buildbot

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset d819ad9832292d854e9710493ecdf959b69802e3 by Victor Stinner in branch 'master': bpo-30107: Make SuppressCrashReport quiet on macOS (#1279) https://github.com/python/cpython/commit/d819ad9832292d854e9710493ecdf959b69802e3 --

[issue30157] csv.Sniffer.sniff() regex error

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: Can you please try to write a unit test to check for non-regression? Or at least give an example? -- ___ Python tracker

[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It seems to me that the purpose of using unions was avoiding aliasing issues. But something went wrong. -- ___ Python tracker

[issue30124] Fix C aliasing issue in Python/dtoa.c to use strict aliasing on Clang 4.0

2017-04-25 Thread Dimitry Andric
Dimitry Andric added the comment: STINNER Victor writes: > Would it be technically possible to completely get ride of the union? Probably, it's just more work, and it has to be done pretty carefully to avoid regressions. It seems Python already does some exercising of these dtoa functions

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-25 Thread Stephan Hoyer
Stephan Hoyer added the comment: > The design pattern that has problems here is a bit unorthodox to start with. I agree. This was meant strictly as a simple example for illustrative purposes. Steven D'Aprano's example from python-ideas may be a better one:

[issue30140] Binary arithmetic does not always call subclasses first

2017-04-25 Thread Josh Rosenberg
Josh Rosenberg added the comment: I'd assume the preference for __rop__ only on subclass overload is because __rop__ method are usually fallback methods, and differ behaviorally from the __op__ methods in type strictness. In particular, the __rop__ fallbacks are often so non-strict that they

[issue30158] Deprecation warnings emitted in test_importlib

2017-04-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> patch review versions: -Python 3.5, Python 3.6 ___ Python tracker ___

[issue29576] Improve some deprecations in the importlib

2017-04-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1393 ___ Python tracker ___ ___

[issue30158] Deprecation warnings emitted in test_importlib

2017-04-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1392 ___ Python tracker ___ ___

[issue29576] Improve some deprecations in the importlib

2017-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This change made test_importlib emitting warnings. See issue30158. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-04-25 Thread Nathaniel Smith
Nathaniel Smith added the comment: Apparently this also broke pyqt for multiple users; here's the maintainers at conda-forge struggling to figure out the best workaround: https://github.com/conda-forge/pyqt-feedstock/pull/25 I really think it would be good to fix this in 3.6 sooner rather

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-25 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed ___ Python tracker ___ ___

[issue29950] Rename SlotWrapperType to WrapperDescriptorType

2017-04-25 Thread Berker Peksag
Berker Peksag added the comment: Merged in 08c16016e2a2d1368d001ddebfe9ca92465773c4. Thanks! -- nosy: +berker.peksag type: -> behavior ___ Python tracker

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2017-04-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1391 ___ Python tracker ___ ___

[issue30162] Add _PyTuple_Empty and make PyTuple_New(0) never failing

2017-04-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes the empty tuple be allocated in static memory rather than dynamic memory, expose a reference to it as _PyTuple_Empty, and makes PyTuple_New(0) never raising exceptions. This allows to simplify the code. No longer need to call

[issue30161] Using `with` statement causes dict to start papering over attribute errors

2017-04-25 Thread Tim Golden
Tim Golden added the comment: I think you're suppressing sys.stderr after the "with". Try a NameError or anything. Alternatively, try a "with" which isn't using sys.stderr Obviously, the next question is why *that's* happening. -- nosy: +tim.golden

[issue30161] Using `with` statement causes dict to start papering over attribute errors

2017-04-25 Thread Charles Cazabon
Charles Cazabon added the comment: oh ffs ;) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue30161] Using `with` statement causes dict to start papering over attribute errors

2017-04-25 Thread R. David Murray
R. David Murray added the comment: You've closed stderr. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-04-25 Thread Nate Soares
Changes by Nate Soares : -- pull_requests: +1390 ___ Python tracker ___ ___

[issue30161] Using `with` statement causes dict to start papering over attribute errors

2017-04-25 Thread Charles Cazabon
New submission from Charles Cazabon: This is a weird one. I've reproduced it with 3 versions of 2.7, including the latest 2.7.13. I didn't find an open bug about this, but I had difficulty crafting a search string for it, so I may have missed something. Basically, using a `with` statement

[issue28851] namedtuples field_names sequence preferred

2017-04-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: My pleasure :) I merged the PR, and will do the backport later today. -- stage: -> backport needed ___ Python tracker

[issue28851] namedtuples field_names sequence preferred

2017-04-25 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 97bf722fcd1de1236824377e052369dc7686b644 by Mariatta (csabella) in branch 'master': bpo-28851: Improve namedtuple documentation (GH-1274) https://github.com/python/cpython/commit/97bf722fcd1de1236824377e052369dc7686b644 --

[issue30157] csv.Sniffer.sniff() regex error

2017-04-25 Thread Matthew Barnett
Matthew Barnett added the comment: There are 4 patterns. They try to determine the delimiter and quote by looking for matches. Each pattern supposedly covers one of 4 cases: 1. Delimiter, quote, value, quote, delimiter. 2. Start of line/text, quote, value, quote, delimiter. 3. Delimiter,

[issue30160] BaseHTTPRequestHandler.wfile: supported usage unclear

2017-04-25 Thread Mike
Mike added the comment: That would certainly satisfy me! -- ___ Python tracker ___ ___ Python-bugs-list

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-04-25 Thread Guido van Rossum
Guido van Rossum added the comment: I'm with Raymond. I propose to register array.array() in all the appropriate places and then close this bug as a won't fix. The typing issue might eventually be resolved via PEP 544 (if accepted), or not -- the"fallback protocols" based on __getitem__ and

[issue30160] BaseHTTPRequestHandler.wfile: supported usage unclear

2017-04-25 Thread R. David Murray
R. David Murray added the comment: I would like to say that the latter interpretation is "obviously" correct, except that it clearly wasn't obvious to you. The fact that it "contains the output stream" I would have thought was pretty clear: if you are writing to it, you are responsible for

[issue30160] BaseHTTPRequestHandler.wfile: supported usage unclear

2017-04-25 Thread Mike
New submission from Mike: The documentation for BaseHTTPRequestHandler explicitly prohibits protocol violations when writing to the `wfile` stream: > BaseHTTPRequestHandler has the following instance variables: > > [...] > > **`wfile`** > > > Contains the output stream for writing a response

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-04-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ___ Python tracker ___

[issue28851] namedtuples field_names sequence preferred

2017-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mariatta, I've approved Cheryl's PR. Would like to do the honors and apply it. -- assignee: rhettinger -> Mariatta nosy: +Mariatta ___ Python tracker

[issue26082] functools.lru_cache user specified cachedict support

2017-04-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking as closed/rejected for the reasons lists by Josh. The functools.lru_cache() decorator is somewhat tightly focused and is trying to do one thing well. Another reason is that at some point, we want to be able to change the internals (perhaps using

[issue30159] gdb autoloading python-gdb.py

2017-04-25 Thread Дилян Палаузов
New submission from Дилян Палаузов: Please install python-gdb.py in $(datarootdir)/gdb/auto-load/$(libdir)/libpython3.5m.so.1.0-gdb.py during "make install", so that programs linked towards libpython3.5m.so.1.0 will auto-load the -gdb.py script, when debugged. Likewise for the other gdb

[issue30158] Deprecation warnings emitted in test_importlib

2017-04-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: $ ./python -We -m test.regrtest -v test_importlib ... == ERROR: test_find_module (test.test_importlib.test_abc.Frozen_MetaPathFinderDefaultsTests)

[issue30150] raw debug allocators to not return malloc alignment

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: Is this issue related to this numpy issue: "ENH: add support for python3.6 memory tracing"? https://github.com/numpy/numpy/pull/8885 -- ___ Python tracker

[issue30150] raw debug allocators to not return malloc alignment

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: > On for example x32 malloc returns 16 byte aligned memory but size_t is 4 > bytes. x32 is a strange platform :-( Does numpy support it? I'm not sure that Python works on such platform. I suggest to hardcode 16 or 32 bytes in _PyMem_DebugRawAlloc instead of

[issue30150] raw debug allocators to not return malloc alignment

2017-04-25 Thread INADA Naoki
INADA Naoki added the comment: How it cause problem? I think you should use `malloc()` instead of `PyMem_Malloc()` or other Python memory allocator when you need strict `malloc()` alignment. -- nosy: +inada.naoki ___ Python tracker

[issue30132] [Windows] test_distutils leaks a vc140.pdb file

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: Reopen, while the warning was fixed on AppVeyor and my Windows VM, I still see the warning on Windows buildbots. http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/578/steps/test/logs/stdio Warning -- files was modified by test_distutils

[issue30157] csv.Sniffer.sniff() regex error

2017-04-25 Thread STINNER Victor
STINNER Victor added the comment: What is the consequence of this change? Does it change the syntax of the parser? Which kind of format wasn't parsed correctly? -- nosy: +haypo ___ Python tracker

[issue30156] PYTHONDUMPREFS segfaults on exit

2017-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The previous result was got when use _PyObject_FastCallDict(). Using PyObject_Call() is slightly faster: Mean +- std dev: [python.default] 127 ns +- 4 ns -> [python] 185 ns +- 9 ns: 1.45x slower (+45%) -- ___

[issue30156] PYTHONDUMPREFS segfaults on exit

2017-04-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Removing this micro-optimization makes attribute access in namedtuple more than 1.5 times slower: Mean +- std dev: [python.default] 126 ns +- 4 ns -> [python] 200 ns +- 7 ns: 1.58x slower (+58%) This would be a significant regression. -- nosy:

[issue26082] functools.lru_cache user specified cachedict support

2017-04-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger ___ Python tracker ___