[issue25963] strptime not parsing some timezones

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

The code is shared by the two modules (it's in _strptime.py).  So, yes.

There is clearly a doc bug here (%Z needs a footnote in the table in the 
datetime docs), but there is no practical way to implement the parsing of 
arbitrary (non-locale) timezone strings, since it is not a one-to-one mapping.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python, r.david.murray
versions: +Python 2.7, Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

The reported problem is when no timeout is given. Perhaps it would be 
sufficient to:

1. Kill the child if any exception happens when a timeout is enforced
2. Never kill the child when there is no timeout

If a timeout is specified, the current code is good enough, but if no timeout 
is specified, maybe we should just do the equivalent of:

with Popen(...) as p:
return p.wait()
# If interrupted, the context manager will wait again. If the interruption 
is due to a terminal-wide SIGINT, the child may also have been interrupted.

For comparison, the Posix system() function is supposed to ignore SIGINT and 
SIGQUIT (i.e. signals from the terminal). See the Gnu implementation: 
.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-01 Thread Andrew Barnert

Andrew Barnert added the comment:

> I don’t think you need to define __len__() to get an iterable, only 
> __getitem__().

The "old-style sequence protocol" means having a __getitem__ that works for 
values from 0 to __len__() and raises IndexError at __len__(). You don't need 
to be a complete old-style sequence to be iterable; just having __getitem__ 
makes you iterable (without being a collections.abc.Iterable or a 
typing.Iterable), and having __getitem__ and __len__ makes you reversible 
(without being a typing.Reversible). At any rate, this bug isn't about avoiding 
false negatives for the implicit ABCs, but false positives: defining __iter__ = 
None blocks the old-style sequence protocol, but makes isinstance(Iterable) 
true.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2016-01-01 Thread Ezio Melotti

Ezio Melotti added the comment:

> It would help if there were some official guidance on what these things
> mean -- I can't find anything written down anywhere that even documents
> what you just said about how CPython proper uses them, so I imagine
> people have come up with all kinds of interpretations.

A while ago I proposed to document our deprecation process and the use of 
PDW/DW in a PEP:
https://mail.python.org/pipermail/python-dev/2011-October/114199.html

There I suggest that we (CPython) stop using PDW but leave it around for other 
projects to use as they see fit.  I'm not sure CPython should do anything 
special to distinguish PDW from DW.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16379] SQLite error code not exposed to python

2016-01-01 Thread Ezio Melotti

Ezio Melotti added the comment:

I think the error message should display both the numeric code and also the 
error name if available.
Instead of using a mapping, perhaps an Enum could be used instead.

--
stage: needs patch -> patch review
versions: +Python 3.6 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25987] collections.abc.Reversible

2016-01-01 Thread Andrew Barnert

New submission from Andrew Barnert:

This came up as a side issue in the -ideas discussion on deprecating the 
old-style sequence protocol that came out of Guido's suggestion on 
https://github.com/ambv/typehinting/issues/170 
(http://article.gmane.org/gmane.comp.python.ideas/37599):

> I also think it's fine to introduce Reversible as another ABC and carefully 
> fit it into the existing hierarchy. It should be a one-trick pony and be 
> another base class for Sequence; it should not have a default implementation. 
> (But this has been beaten to death in other threads -- it's time to just file 
> an issue with a patch.)

I'll file a patch this weekend. But in case there's anything to bikeshed, here 
are the details:

* Reversible is a subclass of Iterable.
 * It has a single abstract method, __reversed__, with no default 
implementation.
 * Its subclass hook that checks for __reversed__ existing and not being None.
* Sequence is a subclass of Reversible, Sized, and Container rather than 
directly of Iterable, Sized, and Container.

Builtins tuple and list, and any subclasses of them, will be Reversible because 
they register with Sequence or MutableSequence. Subclasses of 
collections.abc.Sequence will be Reversible (and should be, as they inherit 
Sequence.__reversed__). Custom old-style sequences will not be Reversible, even 
though reversed works on them.

Builtins dict, set, and frozenset, and any subclasses of them, will not be 
Reversible (unless they add a __reversed__ method, as OrderedDict does). 
Subclasses of collections.abc.Mapping will not be Reversible (and should not 
be, as, assuming #25864 goes through, they inherit Mapping.__reversed__=None) 
(unless they add a __reversed__ method, as most third-party sorted-dict types 
do).

I'll include tests for all of those things.

I believe this is all exactly parallel with collections.abc.Iterable, and will 
make collections.abc.Reversible compatible with typing.Reversible[...] in 
exactly the same way collections.abc.Iterable is compatible with 
typing.Iterable[...].

Alternatives: We could make Reversible independent of Iterable. Alternatively, 
we could make it subclass both Iterable and Sized instead of just Iterable. But 
I think this is the simplest place to slot it in.

--
components: Library (Lib)
messages: 257310
nosy: abarnert
priority: normal
severity: normal
status: open
title: collections.abc.Reversible
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If you have installed Python 3, perhaps you have the /usr/bin/pydoc3 symlink. 
Just use the pydoc3 command.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25917] Fixing howto links in docs

2016-01-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 521a402ae177 by Senthil Kumaran in branch '3.4':
Issue25917 : Fix howto links in docs. Point the reference documentation instead 
of wiki.
https://hg.python.org/cpython/rev/521a402ae177

New changeset 6b9d8957aeef by Senthil Kumaran in branch '3.5':
merge from 3.4
https://hg.python.org/cpython/rev/6b9d8957aeef

New changeset 3a6b1186745f by Senthil Kumaran in branch 'default':
merge from 3.5
https://hg.python.org/cpython/rev/3a6b1186745f

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25917] Fixing howto links in docs

2016-01-01 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Thanks for the helpful, patch. I modified it to include only the faq.rst and 
functions.rst and applied it.

--
assignee: docs@python -> orsenthil
nosy: +orsenthil
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-01 Thread Richard PALO

Richard PALO added the comment:

I notice similar problems, as found when running the test suite for lxml 3.5.0 
on python2.7

==
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase)
--
Traceback (most recent call last):
  File "/opt/local/lib/python2.7/unittest/case.py", line 329, in run
testMethod()
  File 
"/tmp/pkgsrc/textproc/py-lxml/work/lxml-3.5.0/src/lxml/tests/test_io.py", line 
276, in test_etree_parse_io_error
dn = tempfile.mkdtemp(prefix=dirnameRU)
  File "/opt/local/lib/python2.7/tempfile.py", line 339, in mkdtemp
_os.mkdir(file, 0700)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-53: 
ordinal not in range(128)

==
ERROR: test_etree_parse_io_error (lxml.tests.test_io.ElementTreeIOTestCase)
--
Traceback (most recent call last):
  File "/opt/local/lib/python2.7/unittest/case.py", line 329, in run
testMethod()
  File 
"/tmp/pkgsrc/textproc/py-lxml/work/lxml-3.5.0/src/lxml/tests/test_io.py", line 
276, in test_etree_parse_io_error
dn = tempfile.mkdtemp(prefix=dirnameRU)
  File "/opt/local/lib/python2.7/tempfile.py", line 339, in mkdtemp
_os.mkdir(file, 0700)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 40-53: 
ordinal not in range(128)


the code snippet is in test_io.py", line 276

   266  def test_etree_parse_io_error(self):
   267  # this is a directory name that contains characters beyond 
latin-1
   268  dirnameEN = _str('Directory')
   269  dirnameRU = _str('КÐ\260Ñ\032Ð\260Ð\273Ð\276Ð\263')
   270  filename = _str('nosuchfile.xml')
   271  dn = tempfile.mkdtemp(prefix=dirnameEN)
   272  try:
   273  self.assertRaises(IOError, self.etree.parse, 
os.path.join(dn, filename))
   274  finally:
   275  os.rmdir(dn)
   276  dn = tempfile.mkdtemp(prefix=dirnameRU)
   277  try:
   278  self.assertRaises(IOError, self.etree.parse, 
os.path.join(dn, filename))
   279  finally:
   280  os.rmdir(dn)

even if I change dirnameRU to a simple French 'Répertoire' I still get errors...

It is not an option to upgrade to 3.0, sorry.

BTW, I tried passing dirnameRU.encode('utf-8') but that just generates
a different error:

ERROR: test_etree_parse_io_error (lxml.tests.test_io.ETreeIOTestCase)
--
Traceback (most recent call last):
  File "/opt/local/lib/python2.7/unittest/case.py", line 329, in run
testMethod()
  File 
"/tmp/pkgsrc/textproc/py-lxml/work/lxml-3.5.0/src/lxml/tests/test_io.py", line 
278, in test_etree_parse_io_error
self.assertRaises(IOError, self.etree.parse, os.path.join(dn, filename))
  File "/opt/local/lib/python2.7/posixpath.py", line 73, in join
path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 40: 
ordinal not in range(128)

--
nosy: +risto3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23315] tempfile.mkdtemp fails with non-ascii paths on Python 2

2016-01-01 Thread Richard PALO

Richard PALO added the comment:

If I also add .encode('utf-8') to filename on line 278, that seems gets over 
the pathname problem.

I guess it comes down to the fact that if sys.filesystemencoding() is utf-8, 
which in my case it is (on SunOS), I believe these conversion should be 
automatic.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25992] test_gdb fails

2016-01-01 Thread Martin Panter

Changes by Martin Panter :


--
components: +Macintosh
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25909] Incorrect documentation for PyMapping_Items and like

2016-01-01 Thread Sonali Gupta

Sonali Gupta added the comment:

The documentation in mapping.rst and the comments in abstract.h have been 
changed for PyMapping_Items, PyMapping_Keys and PyMapping_Values.

--
Added file: http://bugs.python.org/file41472/bug.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25986] Collections.deque maxlen: added in 2.6 or 2.7?

2016-01-01 Thread Terry J. Reedy

New submission from Terry J. Reedy:

https://docs.python.org/2.6/library/collections.html#collections.deque has this 
line "Changed in version 2.6: Added maxlen parameter."

https://docs.python.org/2.7/library/collections.html#collections.deque kept the 
sentence above and added this entry after the list of methods.

Deque objects also provide one read-only attribute:
maxlen
Maximum size of a deque or None if unbounded.
New in version 2.7.

Which is it?

--
messages: 257299
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Collections.deque maxlen: added in 2.6 or 2.7?
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25991] readline example eventually consumes all memory

2016-01-01 Thread Bruce Frederiksen

New submission from Bruce Frederiksen:

The Example in the readline documentation (section 6.7 of the Library 
Reference) shows how to save your readline history in a file, and restore it 
each time you start Python.

The problem with the Example is that it does not include a call to 
readline.set_history_length and the default is -1 (infinite).

As a Python developer, I start Python quite a lot and had a .python_history 
file that was 850M bytes.  Just starting Python was causing my system to thrash 
before the first prompt (>>>) even appeared.

I suggest adding the following line to the example to avoid this:

readline.set_history_length(1000)

I'm not sure how far back this goes in terms of earlier versions of Python, but 
probably quite far.

--
assignee: docs@python
components: Documentation
messages: 257325
nosy: dangyogi, docs@python
priority: normal
severity: normal
status: open
title: readline example eventually consumes all memory
type: resource usage
versions: Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2016-01-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee: docs@python -> ezio.melotti
stage: needs patch -> patch review
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16731] xxlimited/xxmodule docstrings ambiguous

2016-01-01 Thread Camilla Montonen

Camilla Montonen added the comment:

Changed xxlimited.c to xxmodule.c in the xxlimited.c docstring.

--
versions: +Python 3.5, Python 3.6 -Python 3.4
Added file: http://bugs.python.org/file41467/issue16731.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2016-01-01 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun

Eryk Sun added the comment:

The current test works for 3.x because we keep the full string length via 
PyUnicode_AsWideCharString(value, ) when creating a REG_SZ value. OTOH, 2.x 
Py2Reg gets the length via strlen. I'd prefer to make this consistent with 3.x 
by using the full string length from PyString_AsStringAndSize. Expanding the 
range of supported values is less disruptive to existing code.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20008] Clean up/refactor/make discoverable test_decimal

2016-01-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25054] Capturing start of line '^'

2016-01-01 Thread Ezio Melotti

Ezio Melotti added the comment:

AFAIU the problem is at Modules/_sre.c:852: after matching, if the ptr is still 
at the start position, the start position gets incremented to avoid an endless 
loop.
Ideally the problem could be avoided by marking and skipping the part(s) of the 
pattern that have already been tested and produced a zero-length match, however 
I don't see any easy way to do it.
Unless someone can come up with a reasonable solution, I would suggest to close 
this as wontfix, and possibly add a note to the docs about this corner case.

--
versions: +Python 3.5, Python 3.6 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

Patch 4 looks fine to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-01 Thread Andrew Barnert

Andrew Barnert added the comment:

> Also, if I understand your problem, Container would also be susceptible in 
> theory

You're right, but not in the details.

Being iterable (whether via __iter__ or via the old-style sequence protocol) 
makes you a container. But, again, false negatives for Container aren't a 
problem.

But blocking that by setting __contains__ = None makes you a Container but not 
a container, the same kind of false positive as #25864. That's exactly why I 
split off this bug from that one--that one only fixes __iter__ and 
__reversed__, but it's possible that a more general solution is needed. (Or, of 
course, maybe we don't need anything more general, we just need to expand it to 
__iter__, __reversed__, and __contains__.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-01 Thread Andrew Barnert

Andrew Barnert added the comment:

> If this patch goes ahead, I think the ABC documentation should clarify which 
> methods are checked for None and which aren’t. 

That seems fair. 

Also, as you pointed out on #25958, at least one other ABC has the same problem 
as Iterable: you can block the "in" operator by setting __contains__=None, but 
you'll still be a Container. So, do we want to go through all of the existing 
ABCs and make sure they all do this negative check, instead of just Iterable?

> Also, what is the point of the odd __getitem__() method in test_enumerate.py? 
> Maybe you should use assertRaisesRegex() to check that the intended TypeError 
> is actually raised.

If an implementation doesn't raise a TypeError there, that's a failure. If it 
raises one with a different (possibly less helpful) message, I think that's 
just a quality-of-implementation issue, isn't it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24033] Update _test_multiprocessing.py to use script helpers

2016-01-01 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks for the patch.  I left a review on Rietveld.

--
nosy: +ezio.melotti, haypo, serhiy.storchaka
versions: +Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread Steve Litt

Steve Litt added the comment:

On Sat, 02 Jan 2016 02:23:27 +
"R. David Murray"  wrote:

> R. David Murray added the comment:
> 
> Are you sure you are running pydoc using python3?  That error looks
> like you are running it using python2, as does the command line you
> show (since on most systems the pydoc command comes from python2).
> (I don't know what you mean by "source file can be..."; nonlocal is
> python3 only.)
> 
> --
> nosy: +r.david.murray

Thanks R. David,

You indeed got to the crux of the problem. I performed the following
command and everything worked perfectly:

python3 /usr/bin/pydoc pydoc_fail.py

I tried to note on the bug tracker that the problem is solved by using
Python3 to run pydoc and this wasn't a bug, but was unable to add
anything to issue 25990. I saw no "reply" button, and "Edit" was a
label, not a button.

How do I reply on the bug tracker?

Thanks,

Steve

Steve Litt 
November 2015 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun

Changes by Eryk Sun :


Added file: http://bugs.python.org/file41470/issue25778_py36_2.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun

Changes by Eryk Sun :


Added file: http://bugs.python.org/file41469/issue25778_py27_1.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

In those contexts, bytes should not be linked to the bytes object.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

IMO allowing any special method to be set to None seems to make more trouble 
than it is worth. Are there practical problems to address, or are they all 
theoretical?

Ideally I think it would be better to require __reversed__() for reverse() to 
work, but such a change would break compatibility.

Regarding test_enumerate.py, your class looks like this:

class Blocked(object):
def __getitem__(self): return 1
def __len__(self): return 2
__reversed__ = None

The signature of __getitem__() is wrong, and causes a TypeError during 
iteration, although your particular test does not go that far. When I see 
someone using assertRaises() with a common exception like TypeError, I 
instinctively suggest checking the message to avoid these kind of test case 
bugs.

I suggest either remove __getitem__() if it serves no purpose, or change it to 
something like this if you really want an unreversible sequence:

def __getitem__(self, index):
return (1, 1)[index]

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

Issue 10289 proposes to link from len() to __len__() in the documentation. I 
think the limitation only needs to be documented for __len__(); there are other 
ways to invoke it as well.

--
nosy: +martin.panter

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25989] documentation version switcher is broken fro 2.6, 3.2, 3.3

2016-01-01 Thread Vincent Davis

New submission from Vincent Davis:

>From the documentation pages for python 2.7 and 3.4, 3.5, 3.6 it is possible 
>to select another python version in the breadcrumb at the top left of the 
>page. This is not available for python 2.6, 3.2 and  3.3.

See related issue which is closed.
https://bugs.python.org/issue25113

I posted this on pythondotorg but I guess this is a cpython issue not a website 
issue. https://github.com/python/pythondotorg/issues/868

Berker Peksag response to the report
"The version switcher is activated via a versionswitcher option in Doc/Makefile 
in CPython codebase. Docs are generated daily by using that Makefile, but 2.6, 
3.2 and 3.3 are in security-fix-only mode (which means they won't even get 
documentation fixes) so the daily build script skips generating docs for those 
versions."

--
assignee: docs@python
components: Documentation
messages: 257317
nosy: Vincentdavis, docs@python
priority: normal
severity: normal
status: open
title: documentation version switcher is broken fro 2.6, 3.2, 3.3
type: behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25984] Expose a simple "is IEEE 754" flag in sys.float_info

2016-01-01 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +eric.smith, lemburg, mark.dickinson, stutzbach

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

Are you sure you are running pydoc using python3?  That error looks like you 
are running it using python2, as does the command line you show (since on most 
systems the pydoc command comes from python2).  (I don't know what you mean by 
"source file can be..."; nonlocal is python3 only.)

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Eryk Sun

Eryk Sun added the comment:

I've added a patch for 2.7 that updates Py2Reg to use PyString_GET_SIZE instead 
of strlen and updates Reg2Py to use strnlen instead of returning strings with 
embedded NULs.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25992] test_gdb fails

2016-01-01 Thread Bryce Miller

Bryce Miller added the comment:

Github repo version was 4935c6c381b196334b97aac4e9e4e8fee35b0947

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20008] Clean up/refactor/make discoverable test_decimal

2016-01-01 Thread Stefan Krah

Stefan Krah added the comment:

Is this a political nosying?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

Agree with Martin.  Only the two audio module changes are correct.  However, I 
think we can reduce ambiguity without compromising the meaning by changing 
"string of bytes" to "sequence of bytes" in both of those other cases.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Another uses of this idiom:

"string of 16 bytes" in uuid.rst and uuid.py
"string of *n* random bytes" in os.rst
"string of bytes" in bytesio.c

And a number of uses "bytestring", "byte string" and "bytes string". I think 
that either all occurrences should be changed consistently, or nothing. 
Personally I'm good with all these "string of bytes", "bytestring", etc, it is 
clear to me that that mean bytes or bytes-like objects. What is a bug, it's 
using the term "string" without "bytes" for bytes strings (there are a lot of 
such Python 2 remnants in the documentation and comments).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6500] urllib2 maximum recursion depth exceeded

2016-01-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25992] test_gdb fails

2016-01-01 Thread Bryce Miller

New submission from Bryce Miller:

test_gdb fails for me on OSX

Steps I did to duplicate: 
Checked out fresh '2.7' branch from https://github.com/python/cpython.git
>From the new cypthon dir ran: 
./configure
make
make test
./Lib/test/regrtest.py -v test_gdb

Attached the full verbose output. 

I am looking at Issue23137 and the output messages look different than mine, so 
I'm posting this as a separate issue. Perhaps it is duplicate. 

34 tracebacks included in attachment, but below is a sample for reference: 

==
FAIL: test_NULL_instance_dict (test.test_gdb.PrettyPrintTests)
Ensure that a PyInstanceObject with with a NULL in_dict is handled
--
Traceback (most recent call last):
  File 
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py",
 line 521, in test_NULL_instance_dict
exptype='Foo')
  File 
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py",
 line 459, in assertSane
cmds_after_breakpoint=cmds_after_breakpoint)
  File 
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py",
 line 239, in get_gdb_repr
import_site=import_site)
  File 
"/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/test_gdb.py",
 line 224, in get_stack_trace
self.assertEqual(unexpected_errlines, [])
AssertionError: Lists differ: ['Unable to find Mach task por... != []

First list contains 4 additional elements.
First extra element 0:
Unable to find Mach task port for process-id 53220: (os/kern) failure (0x5).

--
components: Tests
files: regrtest_test_gdb.log
hgrepos: 329
messages: 257326
nosy: Bryce Miller
priority: normal
severity: normal
status: open
title: test_gdb fails
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file41471/regrtest_test_gdb.log

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25992] test_gdb fails

2016-01-01 Thread Bryce Miller

Changes by Bryce Miller :


--
hgrepos:  -329

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

Absolutely you do not need to define __len__ to get an iterable.  Length is not 
a property of an iterable (iterables can be indefinite in length or infinite in 
length).

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25983] Add tests for multi-argument type()

2016-01-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I presume that there are existing tests that class statements work.  Is so, 
these implicitly test type(name, bases, namespace).  But I can see value to 
test testing the two phases of class creation separately. Test 'class' with a 
mock type that records the arguments passed, and separately test type 
explicitly.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread R. David Murray

Changes by R. David Murray :


--
hgrepos:  -328

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25990] Pydoc fails on Python file with nonlocal

2016-01-01 Thread Steve Litt

New submission from Steve Litt:

Latest pydoc on Void linux 64 bit, I have no idea how to capture the version. 
Source file can be either Python 3.4 or 2.7, same result.

ERROR MESSAGE:

[slitt@mydesk ~]$ pydoc pydoc_fail
problem in ./pydoc_fail.py - : invalid syntax 
(pydoc_fail.py, line 6)

[slitt@mydesk ~]$

--
files: pydoc_fail.py
hgrepos: 328
messages: 257321
nosy: stevelitt
priority: normal
severity: normal
status: open
title: Pydoc fails on Python file with nonlocal
type: crash
Added file: http://bugs.python.org/file41468/pydoc_fail.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread SilentGhost

Changes by SilentGhost :


Added file: http://bugs.python.org/file41466/issue25916_4.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25986] Collections.deque maxlen: added in 2.6 or 2.7?

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

'parameter' and 'attribute' are two different things.  I presume the 
documentation is accurate, but haven't checked :)

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24899] Add an os.path <=> pathlib equivalence table in pathlib docs

2016-01-01 Thread Camilla Montonen

Camilla Montonen added the comment:

This is a good one for beginner patch reviewers, so submitted this to the 
core-mentorship mailing list.

--
nosy: +Winterflower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread SilentGhost

SilentGhost added the comment:

Here is the updated patch.

--
Added file: http://bugs.python.org/file41465/issue25916_3.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25916] wave module readframes now returns bytes not str

2016-01-01 Thread R. David Murray

R. David Murray added the comment:

As I said, I think it's like fixing style issues in code: only do it if you 
touch the docs for some other reason.  But this patch is fine.  Although we 
should fix the 'string' when it is really 'bytes' issues, if we can find them.  
Those are real bugs, not style issues.  But that should be a different issue or 
issues from this one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24263] unittest cannot load module whose name starts with Unicode

2016-01-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
components: +Library (Lib)
keywords: +easy
stage: patch review -> test needed
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25988] collections.abc.Indexable

2016-01-01 Thread Andrew Barnert

New submission from Andrew Barnert:

In an -ideas thread, Guido suggested 
(http://article.gmane.org/gmane.comp.python.ideas/37599):

> If we want some way to turn something that just defines __getitem__ and 
> __len__ into a proper sequence, it should just be made to inherit from 
> Sequence, which supplies the default __iter__ and __reversed__. (Registration 
> is *not* good enough here.) If we really want a way to turn something that 
> just supports __getitem__ into an Iterable maybe we can provide an additional 
> ABC for that purpose; let's call it a HalfSequence until we've come up with a 
> better name. (We can't use Iterable for this because Iterable should not 
> reference __getitem__.)

Later in the thread, Nick Coghlan suggested 
(http://article.gmane.org/gmane.comp.python.ideas/37614):

> Perhaps collections.abc.Indexable would work? Invariant:

> for idx, val in enumerate(container):
> assert container[idx] is val

> That is, while enumerate() accepts any iterable, Indexable containers
have the additional property that the contained values can be looked
up by their enumeration index. Mappings (even ordered ones) don't
qualify, since they offer a key:value lookup, but enumerating them
produces an index:key relationship.

So, in particular:

* Indexable is a subclass of Iterable.
* Sequence is a subclass of Indexable, Sized, and Container instead of 
Iterable, Sized, and Container. (Or, if #25987 also goes through, of 
Reversible, Indexable, Sized, and Container.)
* The abstract method __getitem__ and the concrete __iter__ implementation get 
moved up from Sequence to Indexable.
* Indexable does _not_ have a subclass hook (to avoid making every Mapping, 
generic type, etc. accidentally Indexable).

This means that you can write this (borrowing an example from Steven D'Aprano 
in http://article.gmane.org/gmane.comp.python.ideas/23369/):

class Squares(collections.abc.Indexable):
def __getitem__(self, index):
return index**2

Because this no longer depends on the old-style sequence protocol, testing it 
with ABCs will work as expected.

For related issues, see #25987, #25864, #25958, and 
https://github.com/ambv/typehinting/issues/170

--
components: Library (Lib)
messages: 257311
nosy: abarnert
priority: normal
severity: normal
status: open
title: collections.abc.Indexable
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function)

2016-01-01 Thread Camilla Montonen

Camilla Montonen added the comment:

The deficiency noticed by Terry has been at least partially corrected in the 
len() docs
https://docs.python.org/2/library/functions.html#len
Return the length (the number of items) of an object. The argument may be a 
sequence (such as a string, bytes, tuple, list, or range) or a collection (such 
as a dictionary, set, or frozen set).

It doesn't mention the fact that the collection has to implement __len__, but I 
suppose that might be obvious to experienced Python users (isn't obvious to a 
beginner like me, though). So perhaps this might be a welcome clarification. 

The issue regarding OverflowError raised by Rostyslav still remains unresolved.

--
nosy: +Winterflower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25959] tkinter - PhotoImage.zoom() causes segfault

2016-01-01 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Tk ticket update: '''aspect added on 2015-12-28 00:30:33:

I can reproduce this crash on 8.5.18 and 8.6.4, but it appears to be fixed in 
trunk:  "not enough free memory for image buffer".'''

We should see fix in 3.6.

Doc addition is not exactly trivial, as there is only the barest mention of 
images in https://docs.python.org/3/library/tkinter.html#images.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23404] 'make touch' does not work with git clones of the source repository

2016-01-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-01-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Implementing sys.abiflags on Windows looks more general solution, and it 
doesn't increase the complexity of the stdlib.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18543] urllib.parse.urlopen shouldn't ignore installed opener when called with any SSL argument

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

I closed Issue 18543 as a duplicate, which points out this also affects Python 
2.7.9+, and can also be triggered by setting the “context” parameter.

Overall, I am not comfortable with the complication and hacks in the current 
patch. Maybe it would be simpler to not fix the bug, and just document that you 
cannot use the SSL context parameters with a custom opener. If necessary, we 
could add a new API to pass the context to the handler properly, as suggested 
by Benjamin in , but that might 
have to be in 3.6+ only.

Some specific comments on the patch:

The url[:5] check should probably check for a colon as well.

What’s the problem with multiple HTTPS handlers? Is it a side effect of your 
patch, or did it already exist? Is it only a problem for urlopen(), or also for 
calling open() directly?

You can use any() instead of building a list and testing if it is empty.

I think you can handle https: URLs without defining https_open(), for instance 
I have a handler that defines default_open() and checks the request manually. 
Does your patch account for that?

The patch seems to modify the default installed opener with the supplied SSL 
parameters. Also I wonder if it would break any multithreaded usage that 
currently works.

It would be good to have test cases integrated into the existing suite.

--
nosy: +martin.panter
stage:  -> patch review
title: urllib.parse.urlopen shouldn't ignore installed opener when called with 
any ca* argument -> urllib.parse.urlopen shouldn't ignore installed opener when 
called with any SSL argument
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25981] Intern namedtuple field names

2016-01-01 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The benefits are tiny, but if the one line patch looks good, we might as well 
intern the _fields and save a few bytes.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

Doesn’t this scenario apply equally to run(), or check_output() in 3.4?

I suspect the explicit p.wait() call is not needed either. The context manager 
should already be calling wait().

One possible problem that I can think of: if you set a timeout, then interrupt 
the call with KeyboardInterrupt or similar, the context manager will now wait 
without without a timeout. Demo:

# Hit Ctrl+C before the 3 s timeout, and it will delay 10 s
call('trap "" INT && sleep 10', shell=True, timeout=3)

--
nosy: +martin.panter
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-01 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: rhettinger -> 

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

I think there is a memory leak in the C code. I left some other minor 
suggestions as well, but it almost looks ready.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23166] urllib2 ignores opener configuration under certain circumstances

2016-01-01 Thread Martin Panter

Martin Panter added the comment:

I think these are essentially the same problem. It defeats any custom installed 
opener, not just custom HTTPS handlers.

--
nosy: +martin.panter
resolution:  -> duplicate
status: open -> closed
superseder:  -> urllib.parse.urlopen shouldn't ignore installed opener when 
called with any ca* argument

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25942] subprocess.call SIGKILLs too liberally

2016-01-01 Thread STINNER Victor

STINNER Victor added the comment:

The issue explained in 12494 is that the caller doesn't have access to the
subprocess.Popen object. I disagree to not kill the process when an
exception is raised, even KeyboardInterrupt.

I also disagree to say that we kill an "arbitrary" process. IMHO it's part
of the API that the process is killed with SIGKILL on error.

Maybe we need to flag to send SIGTERM on exception and then wait N wait
until the child exited, or send SIGKILL after the timeout. Maybe it's
overkill and such API should be developed in third party modules.

Anyway, not sending any signal on exction is not a good idea. We must read
the exit status to avoid zombi process. It's not a matter of sending a
signal but of reading the exit status.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25256] Add sys.debug_build public variable to check if Python was compiled in debug mode

2016-01-01 Thread STINNER Victor

STINNER Victor added the comment:

The consensus was to add a new flag to sys.implementation.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-01 Thread Alessandro Cucci

Alessandro Cucci added the comment:

Thanks @martin.panter, here is another patch made after your comments.

--
Added file: http://bugs.python.org/file41464/issue19475_v12.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2943] Distutils should generate a better error message when the SDK is not installed

2016-01-01 Thread Ilya Kamenshchikov

Ilya Kamenshchikov added the comment:

please fix spent half a day to understand I need C compiler

--
nosy: +Ilya Kamenshchikov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25981] Intern namedtuple field names

2016-01-01 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Interesting, short string literals usually are interned, but they are not 
interned in tuple literal.

>>> namespace = {}
>>> exec('a = ["abc123"]\ndef abc123(): pass', namespace)
>>> namespace['abc123'].__name__ is namespace['a'][0]
True
>>> exec('a = ("abc123",)\ndef abc123(): pass', namespace)
>>> namespace['abc123'].__name__ is namespace['a'][0]
False
>>> namespace['abc123'].__name__ == namespace['a'][0]
True

I think it would be better to change the compiler to always intern short string 
literals. And patching namedtuple will be not needed.

--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, yselivanov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25778] winreg.EnumValue does not truncate strings correctly

2016-01-01 Thread Zachary Ware

Zachary Ware added the comment:

Missed the boat on 3.4.

I tried out the new test on 2.7, and it does not fail with no change to 
_winreg.c.  Eryk, do you want to provide a patch for 2.7?  I'm not interested 
enough to figure out what's going on there, but if you provide a patch I'll 
commit it.

--
versions:  -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com