[issue18521] [cppcheck] Full report

2013-10-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Shouldn't converttuple() in getargs.c set "levels[1] = 0;" after second 
"levels[0] = i+1;"?

--

___
Python tracker 

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



[issue18606] Add statistics module to standard library

2013-10-13 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I think this should get checked in so that people can start interacting with 
it.  The docstrings and whatnot can get tweaked later.

--
nosy: +rhettinger

___
Python tracker 

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



[issue18521] [cppcheck] Full report

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

I fixed some items from Ezio's list that I think were legitimate; the rest is 
mostly invalid.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue18521] [cppcheck] Full report

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 63bc2fe28a6e by Georg Brandl in branch 'default':
Re #18521: move array bounds check before array access.
http://hg.python.org/cpython/rev/63bc2fe28a6e

--

___
Python tracker 

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



[issue18521] [cppcheck] Full report

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7396d10405db by Georg Brandl in branch 'default':
Re #18521: remove assignments of variables that are immediately reassigned.
http://hg.python.org/cpython/rev/7396d10405db

--

___
Python tracker 

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



[issue18521] [cppcheck] Full report

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eaeaed43ff1c by Georg Brandl in branch 'default':
Re #18521: fix not-quite-C syntax that works only because the PyXXX_Check are 
macros defined with () around them.
http://hg.python.org/cpython/rev/eaeaed43ff1c

--
nosy: +python-dev

___
Python tracker 

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



[issue14112] tutorial intro talks of "shallow copy" concept without explanation

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

The text talks about containers which, although often the case, is not general 
enough; copy() and deepcopy() can work with any object.

--

___
Python tracker 

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



[issue18521] [cppcheck] Full report

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

I grouped the errors by message and checked of there were any actual errors.  
Most of the reports seemed wrong or false positive, but a few looked fixable.  
I haven't checked the "Unusued variable" ones, because they are harmless (even 
thought we could clean them up), and the "value assigned to a var that is never 
used" (I suspect most of these are to silence compiler warnings about unused 
return values).  These two categories cover more than half of the errors.

I attach the file with the grouped content and some notes I took about the 
errors I looked at in case someone wants to check the remaining issues.

--
nosy: +ezio.melotti, haypo, serhiy.storchaka
versions: +Python 3.4 -Python 3.5
Added file: 
http://bugs.python.org/file32108/cppcheck_reports_filtered_grouped.txt

___
Python tracker 

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



[issue4965] Can doc index of html version be separately scrollable?

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

You'll have to put a copy in sphinxext/static.

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Ramchandra Apte

Ramchandra Apte added the comment:

+1

--
nosy: +Ramchandra Apte

___
Python tracker 

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



[issue4888] misplaced (or misleading) assert in ceval.c

2013-10-13 Thread Guido van Rossum

Changes by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue14112] tutorial intro talks of "shallow copy" concept without explanation

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Here is a patch that adds glossary entries for deep and shallow copy.  I tried 
to keep them simple and clear enough.

FWIW http://docs.python.org/3.4/library/copy.html also has a definition of the 
terms.

If my definitions are OK I will add links to the terms were appropriate.

--
keywords: +patch
nosy: +georg.brandl
stage:  -> patch review
type:  -> enhancement
versions: +Python 3.4 -Python 3.2
Added file: http://bugs.python.org/file32107/issue14112.diff

___
Python tracker 

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



[issue4888] misplaced (or misleading) assert in ceval.c

2013-10-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> patch review
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue887237] Machine integers

2013-10-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue15826] Increased test coverage of test_glob.py

2013-10-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage: patch review -> commit review
versions:  -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file32106/issue15826.diff

___
Python tracker 

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



[issue17029] h2py.py: search the multiarch include dir if it does exist

2013-10-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11928] fail on filename with space at the end

2013-10-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
type:  -> behavior
versions: +Python 3.4 -Python 3.1

___
Python tracker 

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



[issue19217] Calling assertEquals for moderately long list takes too long

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Here's a proof of concept to fix the issue (still lacks tests and breaks one 
existing test).

The problem is that assertSequenceEqual computes the diff regardless of the 
size of the sequences, and then truncates it if it's too long.  Producing the 
diff takes time, so checking the size of the sequences and skip the diff if 
they are too long solves the problem.

In the patch I used an hardcoded and arbitrary value of 30 elements -- the 
other attributes like maxDiff and _diffThreshold can't be used here.
The value is so low because if the sequence doesn't fit in one line, the output 
will list one element per line, resulting in 30+ lines of output which is not 
very readable IMHO.  Also note that regardless of the this diff, the error 
message indicates what is the position of the first element that differs.
The threshold value I picked could be moved to a _seqDiffThreshold (and 
possibly _diffThreshold can be renamed to _strDiffThreshold).

This issue is related to #11763.  All other methods should be checked for 
similar issues.

--
assignee: michael.foord -> ezio.melotti
keywords: +patch
stage: needs patch -> patch review
versions: +Python 2.7
Added file: http://bugs.python.org/file32105/issue19217.diff

___
Python tracker 

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



[issue18606] Add statistics module to standard library

2013-10-13 Thread Tim Peters

Tim Peters added the comment:

Do what's best for the future of the module.  A PEP is more of a starting point 
than a constraint, especially for implementation details.  And making a private 
thing public later is one ginormous whale of a lot easier than trying to remove 
a public thing later.  "Practicality beats purity" once again ;-)

--
nosy: +tim.peters

___
Python tracker 

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



[issue18606] Add statistics module to standard library

2013-10-13 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Oscar Benjamin has just made a proposal to me off-list that has *almost* 
convinced me to make statistics.sum a private implementation detail, at 
least for the 3.4 release. I won't go into detail about Oscar's 
proposal, but it has caused me to rethink all the arguments for making 
sum public.

Given that the PEP concludes that sum ought to be public, is it 
appropriate to defer that part of it until 3.5 without updating the PEP? 
I'd like to shift sum -> _sum for 3.4, then if Oscar's ideas don't pan 
out, in 3.5 make sum public.

(None of this will effect the public interface for mean, variance, etc.)

--

___
Python tracker 

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



[issue11763] assertEqual memory issues with large text inputs

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Attached an updated patch that addresses Serhiy comments.  The tests in the 
previous patch have been committed already, so this might need new tests.

The first problem I mentioned in msg134530 has been reported in #19217.

--
Added file: http://bugs.python.org/file32104/issue11763-3.diff

___
Python tracker 

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



[issue19249] Enumeration.__eq__

2013-10-13 Thread Ethan Furman

Ethan Furman added the comment:

Here's the current __eq__ method:

def __eq__(self, other):
if type(other) is self.__class__:
return self is other
return NotImplemented

It is, in fact, using identity and not value equality.

I'm thinking we should either remove and go with the default __eq__, or change 
it to value equality.  One possible reason to use value equality is that pickle 
protocols below 2 will actually create duplicate Enum members, breaking 
identity tests; if someone is stuck using pickle that way, they could still use 
Enum with `==` and not `is`.

Identity tests are already incorporated in many of the existing tests.

Gentlemen, what do you think?

--
assignee:  -> ethan.furman
nosy: +barry, eli.bendersky, ethan.furman
type:  -> behavior

___
Python tracker 

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



[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2013-10-13 Thread Senthil Kumaran

Senthil Kumaran added the comment:

The patch is good. I think, it is better to include this information in 
documentation too. Please let me know if this suitable, I shall go ahead 
committing this. (With credits to Vajrasky Kok)

--
assignee:  -> orsenthil
nosy: +orsenthil
versions: +Python 3.3
Added file: http://bugs.python.org/file32103/issue19082-patch3.diff

___
Python tracker 

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2013-10-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue19252] Enum.py : Enum.__new__() : Test Coverage

2013-10-13 Thread Ethan Furman

Ethan Furman added the comment:

I'm not sure what you are talking about.  Here's the code:

try:
if value in cls._value2member_map_:
return cls._value2member_map_[value]
except TypeError:
# not there, now do long search -- O(n) behavior
for member in cls._member_map_.values():
if member.value == value:
return member

Here's the test:

self.assertEqual(ColorInAList([1]), ColorInAList.red)

In order for that test to work, the first if (in the try) raises a TypeError, 
then execution falls into the except block and each member is tested for 
equality until one matches (via the if) -- so what is your added test doing 
that isn't already being done?

--
assignee:  -> ethan.furman
nosy: +ethan.furman

___
Python tracker 

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



[issue4965] Can doc index of html version be separately scrollable?

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

I committed the patch on 3.3/3.x.  I'm willing to port the patch on 2.7 too, 
however sidebar.js is not in Doc/tools/sphinxext/static/ but in 
Doc/tools/sphinx/themes/default/static/, which is not under version control.  
How do you suggest to proceed?

--
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



[issue4965] Can doc index of html version be separately scrollable?

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3bb34d370871 by Ezio Melotti in branch '3.3':
#4965: Implement intelligent scrolling of the sidebar in the docs.
http://hg.python.org/cpython/rev/3bb34d370871

New changeset 8d916ea12efb by Ezio Melotti in branch 'default':
#4965: merge with 3.3.
http://hg.python.org/cpython/rev/8d916ea12efb

--
nosy: +python-dev

___
Python tracker 

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



[issue19027] undefined symbol: _PyParser_Grammar

2013-10-13 Thread Ned Deily

Ned Deily added the comment:

BTW, this can be worked around (for non cross-builds at least) by running "make 
touch" on the source directory, e.g.:

make -C python/src -f python/build/Makefile touch

But it should be fixed.  Doko?

--

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> "I actually agree with Kristjan that an opcode is the least disruptive
> choice here."
> 
> Does you mean that data serialized with python 3.3 can be read with
> python 3.4? But not the opposite (version token unknown in Python
> 3.3)?

Yes, indeed. I'm not sure it's very important but it's safer in case
people have old "frozen" modules around.

--

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread STINNER Victor

STINNER Victor added the comment:

"I actually agree with Kristjan that an opcode is the least disruptive
choice here."

Does you mean that data serialized with python 3.3 can be read with
python 3.4? But not the opposite (version token unknown in Python
3.3)?

--

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I actually agree with Kristjan that an opcode is the least disruptive
choice here. I also agree it's useful if we want to be able to evolve
the protocol without being tied by backwards compatibility constraints.

--

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread STINNER Victor

STINNER Victor added the comment:

Good idea to add a version. But it should not be a token, but a mandatory 
header at the beginning. For example, 16 unsigned bits at the beginning.

Many file formats use a "magic" key, like "MZ" for Windows executable or "GIF" 
for GIF pictures. What do you think of adding such magic string (if it does not 
exist yet, I don't know the marshal format... is it documented somewhere?).

--

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Let defer version token until it be needed.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +skrah

___
Python tracker 

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



[issue19256] Optimize marshal format and add version token.

2013-10-13 Thread Kristján Valur Jónsson

New submission from Kristján Valur Jónsson:

Issue $19219 added new tokens making marshal format smaller and faster.
This patch adds two new tokens:
TYPE_SHORT_REF for which the ref index is a byte and
TYPE_VERSION for which the operand is the protocol version.

The former helps because it catches common singletons such as 0, 1, () and so 
on which typically show up early in a pickle.  they then need only two bytes to 
encoded.
This shrinks the code for the decimal.py module from 172K to 162K.


The second can help break backwards compatibility requirements in the future.  
The format (if 4 or larger) is now put into the stream, so that future new 
formats can re-assign opcodes if needed.

I don't reassign the version number, leaving it at the new value of 4.  This 
change is still backwards compatible with the previous '4' so there should be 
no problem.

For size / performance comparison, try:
python.exe -m timeit -s "import decimal; 
c=compile(open(decimal.__file__).read(), decimal.__file__, 'exec'); import 
marshal; d=marshal.dumps(c); print(len(d))" "marshal.loads(d)"

--
files: marshal.patch
keywords: patch
messages: 199818
nosy: haypo, kristjan.jonsson, pitrou
priority: normal
severity: normal
status: open
title: Optimize marshal format and add version token.
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32102/marshal.patch

___
Python tracker 

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



[issue19246] GC does not really free up memory in console

2013-10-13 Thread Tim Peters

Tim Peters added the comment:

haypo, there would only be a million ints here even if the loop had completed.  
That's trivial in context (maybe 14 MB for the free list in Python 2?).  And 
note that I did my example run under Python 3.

Besides, the OP and I both reported that Task Manager showed that Python did 
release "almost all" of the memory back to the OS.  While the first MemoryError 
occurs when available memory has been truly exhausted, the second MemoryError 
occurs with way over a gigabyte of memory still "free" (according to Task 
Manager).  Best guess is that it is indeed free, but so fragmented that MS C's 
allocator can't deal with it.  That would not be unprecedented on Windows ;-)

--

___
Python tracker 

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



[issue19255] Don't "wipe" builtins at shutdown

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Perhaps we should special case shutdown of the builtins module. E.g.
> reset it to initial value (all initial members of the builtins module
> are immutable and can't create resource loops) instead wiping.

This sounds like a reasonable approach.

--

___
Python tracker 

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



[issue1539925] warnings in interactive sessions

2013-10-13 Thread Alan Cristhian

Changes by Alan Cristhian :


--
nosy: +Alan.Cristhian

___
Python tracker 

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



[issue19246] GC does not really free up memory in console

2013-10-13 Thread STINNER Victor

STINNER Victor added the comment:

int type of Python 2 uses an internal "free list" which has an unlimited size. 
If once you have 1 million different integers are the same time, the memory 
will never be released, even if the container storing all these integers is 
removed, because a reference is kept in the free list.

This is a known issue of Python 2, solved "indirectly" in Python 3, because 
"int" type of Python 3 does not use a free list. The long type of Python 2 does 
not use a free list neither.

--
nosy: +haypo

___
Python tracker 

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



[issue19246] GC does not really free up memory in console

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Works fine on a 32-bit Linux build (64-bit machine, though):

>>> import sys
>>> sys.maxsize
2147483647
>>> a = {}
>>> for k in range(100): a['a' * k] = k
... 
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> del a
>>> a = {}
>>> for k in range(100): a[k] = k
... 
>>> 


Note that Linux says the process eats 4GB RAM.

--
nosy: +pitrou

___
Python tracker 

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



[issue19246] GC does not really free up memory in console

2013-10-13 Thread Tim Peters

Tim Peters added the comment:

Here on 32-bit Windows Vista, with Python 3:

C:\Python33>python.exe
Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a = {}
>>> for k in range(100): a['a' * k] = k
...
Traceback (most recent call last):
  File "", line 1, in 
MemoryError
>>> del a

And here too Task Manager shows that Python has given back close to 2GB of 
memory.

>>> a = {}
>>> for k in range(10): a['a' * k] = k
...
Traceback (most recent call last):
  File "", line 1, in 
MemoryError

And here Task Manager shows that there's tons of memory still available.  
sys._debugmallocstats() shows nothing odd after another "a = {}" - only 7 
arenas are allocated, less than 2 MB.

Of course this has nothing to do with running in interactive mode.  Same thing 
happens in a program (catching MemoryError, etc).

So best guess is that Microsoft's allocators have gotten fatally fragmented, 
but I don't know how to confirm/refute that.

It would be good to get some reports from non-Windows 32-bit boxes.  If those 
are fine, then we can be "almost sure" it's a Microsoft problem.

--
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



[issue17084] nntplib.NNTP.xover does not always return results as documented

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

The NNTP server seems to be violating the protocol; it is supposed to convert 
tab characters in the fields to spaces.  It appears that in your example the 
list of references was separated by a tab character, which Python then 
(correctly) interprets as separator.

--
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue16732] setup.py support for xxmodule without tkinker

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c167ab1c49c9 by Georg Brandl in branch '2.7':
Closes #16732: move "xxmodule" comment block to detect_modules().  (Already 
done in 3.x)
http://hg.python.org/cpython/rev/c167ab1c49c9

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19255] Don't "wipe" builtins at shutdown

2013-10-13 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Many __del__ methods expect that builtins are existing at the time of 
executing. But when the object survives until the builtins module is wiped, 
__del__ will fail with unexpected AttributeError (see issue19021 for example). 
We can change __del__'s in the stdlib to not use non-cached builtins, but third 
party code will be broken.

Perhaps we should special case shutdown of the builtins module. E.g. reset it 
to initial value (all initial members of the builtins module are immutable and 
can't create resource loops) instead wiping.

--
components: Interpreter Core
messages: 199810
nosy: pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: Don't "wipe" builtins at shutdown
type: behavior
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



[issue16657] traceback.format_tb incorrect docsting

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dcded8c7af89 by Georg Brandl in branch '3.3':
Closes #16657: fix docstring of traceback.format_tb().
http://hg.python.org/cpython/rev/dcded8c7af89

--

___
Python tracker 

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



[issue19254] Python implementation of PBKDF2_HMAC

2013-10-13 Thread Christian Heimes

New submission from Christian Heimes:

The patch provides a Python implementation of pbkdf2_hmac with Python's hmac 
module. Although I'm using some tricks it's more than six times slower than 
OpenSSL's implementation.

--
files: pbkdf2_py.patch
keywords: patch
messages: 199808
nosy: christian.heimes
priority: normal
severity: normal
stage: patch review
status: open
title: Python implementation of PBKDF2_HMAC
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32101/pbkdf2_py.patch

___
Python tracker 

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



[issue16657] traceback.format_tb incorrect docsting

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e6ab0cd959a0 by Georg Brandl in branch '2.7':
Closes #16657: fix docstring of traceback.format_tb().
http://hg.python.org/cpython/rev/e6ab0cd959a0

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue12348] case sensitivity in packaging.pypi.simple.Crawler

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Closing as a packaging-related bug.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2013-10-13 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Christian Heimes

Christian Heimes added the comment:

You got me, Antoine! I'm working on a Python-only implementation of 
PBKDF2_HMAC. It involves XOR of two bytes in one place.

Serhiy, I'm not going to turn Python into Perl. I merely like to provide a 
simple and well defined feature with existing syntax. I propose bitwise ops 
only between bytes and bytearrays of equal size. Everything else like unequal 
size, bitwise ops between integers and bytes etc. are out of the question.

--

___
Python tracker 

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



[issue19253] PyArg_ParseTuple: wrong use of seterror() clips helpful type error annotation

2013-10-13 Thread Georg Brandl

New submission from Georg Brandl:

Follow-up to #6624. This issue changed a call to seterror() whose last argument 
is supposed to be NULL or a "custom error message" given by the ";message" 
format character.  This had two effects:

* the custom message (if present) is never printed
* the helpful "function() argument X " is omitted and only "must be str, not 
int" remains

>>> format(None, 1) # current behavior
TypeError: must be str, not int
>>> format(None, 1) # with #6624 reverted (= patch to this issue applied)
TypeError: format() argument 2 must be str, not int



Almost all uses of the ";" format code are currently broken: the strings must 
give a complete message, but only give a description of the expected arguments. 
 Most of them should probably just be removed.

--
components: Interpreter Core
files: seterror_fix.patch
keywords: patch
messages: 199804
nosy: benjamin.peterson, georg.brandl, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: PyArg_ParseTuple: wrong use of seterror() clips helpful type error 
annotation
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file32100/seterror_fix.patch

___
Python tracker 

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



[issue19027] undefined symbol: _PyParser_Grammar

2013-10-13 Thread Ned Deily

Ned Deily added the comment:

It looks like this was caused by the changes for Issue14321 to not run pgen for 
cross builds.

--
nosy: +doko

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Sets are sequences.

>>> from collections import abc
>>> issubclass(abc.Set, abc.Sequence)
False
>>> issubclass(abc.Sequence, abc.Set)
False

> Perhaps separated mutable bitset (or bitlist?) type will be more useful.

Then I would prefer a view, using e.g. the buffer API, but without any copies.

--

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

When you work with int's instead of bytes it is spelled pretty enough.

Sets are sequences. So having for example iteration and | operation in one 
function we can't be sure what it means.

Please don't turn Python to APL or Perl.

Perhaps separated mutable bitset (or bitlist?) type will be more useful.

--

___
Python tracker 

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



[issue19252] Enum.py : Enum.__new__() : Test Coverage

2013-10-13 Thread CliffM

New submission from CliffM:

test_nonhash_value tests the lookup of an Enum Member from a value.

The current test does not exercise the iteration over values completely -- the 
if-clause being redundant wrt the existing test.

My patch adds an additional test which requires the if-clause.

--
components: Extension Modules, Tests
files: enum.patch
keywords: patch
messages: 199800
nosy: CliffM
priority: normal
severity: normal
status: open
title: Enum.py : Enum.__new__() : Test Coverage
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32099/enum.patch

___
Python tracker 

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



[issue19027] undefined symbol: _PyParser_Grammar

2013-10-13 Thread Ned Deily

Changes by Ned Deily :


--
components: +Build
nosy: +ned.deily
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Georg for all your reviews.

Only patch for pickle left, and this is not trivial one.

--
resolution:  -> fixed
stage: patch review -> committed/rejected

___
Python tracker 

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



[issue14999] ctypes ArgumentError lists arguments from 1, not 0

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

IMO we always use 1-based numbering when counting things.

Try e.g.

>>> format('a', None)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: format expects arg 2 to be string or unicode, not NoneType

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue19248] sphinx is not py3k compatible

2013-10-13 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

> Is the assumption that python2 is still supposed to be the default python 
> everywhere?
> Is python 3 not able to build itself yet?

You can manually install Sphinx >=1.1 (preferably >=1.2.*) (and its 
dependencies) using Python 3, and directly call `sphinx-build` from so 
installed Sphinx, instead of using `make`.

--
nosy: +Arfrever

___
Python tracker 

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



[issue18758] Fix internal references in the documentation

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fa7cfbec0d32 by Serhiy Storchaka in branch '2.7':
Issue #18758: Fixed and improved cross-references.
http://hg.python.org/cpython/rev/fa7cfbec0d32

New changeset 907da535ed9d by Serhiy Storchaka in branch '3.3':
Issue #18758: Fixed and improved cross-references.
http://hg.python.org/cpython/rev/907da535ed9d

New changeset 261d9bf0cc2b by Serhiy Storchaka in branch 'default':
Issue #18758: Fixed and improved cross-references.
http://hg.python.org/cpython/rev/261d9bf0cc2b

--
nosy: +python-dev

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The int-based spelling isn't very pretty though.
And sequences are not sets :-)
I suppose the use case has something to do with cryptography?

--

___
Python tracker 

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



[issue1539925] warnings in interactive sessions

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Is there still any interest in this?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Use int's.

(int.from_bytes(a, 'big') ^ int.from_bytes(b, 'big')).to_bytes(len(a), 'big')

Adding & and | operations to bytes will be confused because bytes is a sequence 
and this will conflict with set operations.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue19248] sphinx is not py3k compatible

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6e65ee2a0073 by Georg Brandl in branch '3.3':
Closes #19248: actually check for Python 3.x in tools/sphinx-build.py.
http://hg.python.org/cpython/rev/6e65ee2a0073

--
nosy: +python-dev
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17335] FieldStorageClass is messed up

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9d3e99ea516 by Georg Brandl in branch 'default':
Closes #17335: remove no-op assignment.
http://hg.python.org/cpython/rev/b9d3e99ea516

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue17352] Be clear that __prepare__ must be declared as a class method

2013-10-13 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker 

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



[issue17335] FieldStorageClass is messed up

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

I'll keep the class attribute for compatibility, but will remove the local 
assignment.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue17756] test_syntax_error fails when run in the installed location

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Can't reproduce with current 3.3 tip.

--
nosy: +georg.brandl
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

I assume you have a use case?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

bytearray should certainly get the same functionality as bytes.

--
nosy: +pitrou

___
Python tracker 

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



[issue19251] bitwise ops for bytes of equal length

2013-10-13 Thread Christian Heimes

New submission from Christian Heimes:

I like to propose a new feature for bytes and perhaps bytearray. None of the 
bytes types support bitwise operations like &, | and ^. I like to add the 
bitwise protocol between byte objects of equal length:

>>> a, b = b"123", b"abc"
>>> bytes(x ^ y for x, y in zip(a, b)) 
b'PPP'
>>> a ^ b
b'PPP'

--
components: Interpreter Core
messages: 199785
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: bitwise ops for bytes of equal length
type: enhancement
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



[issue19250] Duplicate import documentation in py3k

2013-10-13 Thread Nick Guenther

Nick Guenther added the comment:

Thank you. Sorry for the duplicates. I tried to search the bug tracker but 
nothing stood out to me.

--

___
Python tracker 

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



[issue19250] Duplicate import documentation in py3k

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

This is already fixed in the 3.3 branch (see #17938); it will be updated for 
pydoc "automatically" before the next bugfix release (the actual content comes 
from Lib/pydoc_data/topics.py).

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Since it's a regression from 2.7, I chose to commit it as a bugfix (to 3.3 and 
3.4).

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
type: enhancement -> behavior

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 19ce90930e8b by Antoine Pitrou in branch '3.3':
Issue #18776: atexit callbacks now display their full traceback when they raise 
an exception.
http://hg.python.org/cpython/rev/19ce90930e8b

New changeset c13ef65f3dcf by Antoine Pitrou in branch 'default':
Issue #18776: atexit callbacks now display their full traceback when they raise 
an exception.
http://hg.python.org/cpython/rev/c13ef65f3dcf

--
nosy: +python-dev

___
Python tracker 

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



[issue4965] Can doc index of html version be separately scrollable?

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

LGTM.

--

___
Python tracker 

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



[issue4965] Can doc index of html version be separately scrollable?

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

Updated patch should fix the nit and factors out $(document) from the scrolling 
function.  Tested on Firefox and Chromium.

--
Added file: http://bugs.python.org/file32098/issue4965-3.diff

___
Python tracker 

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



[issue17730] code.interact() doesn't support no banner

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2933598a7802 by Georg Brandl in branch 'default':
Closes #17730: in code.interact(), when banner="", do not print anything.
http://hg.python.org/cpython/rev/2933598a7802

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19250] Duplicate import documentation in py3k

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

I can reproduce on 3.3; looks OK on 3.4.

--
nosy: +ezio.melotti
type:  -> behavior

___
Python tracker 

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



[issue18527] Upgrade Modules/zlib to 1.2.8

2013-10-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Updated patch.

--
stage: needs patch -> patch review
versions: +Python 3.3
Added file: http://bugs.python.org/file32097/atexit_tracebacks2.patch

___
Python tracker 

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



[issue19250] Duplicate import documentation in py3k

2013-10-13 Thread Nick Guenther

New submission from Nick Guenther:

Python3's docs given by
>> help("import")

duplicate these two paragraphs:
"The *public names* defined by a module are determined by checking the
module's namespace for a variable named ``__all__``; if defined, it
must be a sequence of strings which are names defined or imported by
that module.  The names given in ``__all__`` are all considered public
and are required to exist.  If ``__all__`` is not defined, the set of
public names includes all names found in the module's namespace which
do not begin with an underscore character (``'_'``).  ``__all__``
should contain the entire public API. It is intended to avoid
accidentally exporting items that are not part of the API (such as
library modules which were imported and used within the module).

The ``from`` form with ``*`` may only occur in a module scope.
Attempting to use it in class or function definitions will raise a
``SyntaxError``."

(full output attached for proof)

Digging through the sources, I can't find where this is defined. The python2 on 
my system has the same two paragraphs but they are *not* duplicated there, and 
in the sources, which admittedly I don't know my way around, 
Doc/reference/simple_stmts.rst contains these paragraphs but only once each, 
and grep seems to imply this is the source of them.

Did sphinx screw up somewhere between your hg and my distro mirror?

Here's my version info (arch linux, 64 bit)
[kousu@galleon ~]$ pacman -Qi python
Name   : python
Version: 3.3.2-2
Description: Next generation of the python high-level scripting language
Architecture   : x86_64
URL: http://www.python.org/
Licenses   : custom
Groups : None
Provides   : python3
Depends On : expat  bzip2  gdbm  openssl  libffi  zlib
Optional Deps  : tk: for tkinter [installed]
 sqlite [installed]
Required By: cython  ipython  ktoblzcheck  libreoffice-common  python-cairo 
 python-dateutil  python-dbus  python-markupsafe
 python-numpy  python-pyparsing  python-pytz  python-pyzmq  
python-setuptools  python-sip  python-six  python-sympy
 python-tornado  python-xdg  ranger  youtube-dl
Optional For   : systemd
Conflicts With : None
Replaces   : python3
Installed Size : 86980.00 KiB
Packager   : Bart
Build Date : Fri Sep 6 03:31:57 2013
Install Date   : Tue Sep 17 10:29:36 2013
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By   : Signature

--
assignee: docs@python
components: Documentation
files: The ``import`` statement - (2013-10-13 15:36:07)
messages: 199775
nosy: docs@python, kousu
priority: normal
severity: normal
status: open
title: Duplicate import documentation in py3k
versions: Python 3.3
Added file: http://bugs.python.org/file32096/The ``import`` statement - 
(2013-10-13 15:36:07)

___
Python tracker 

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



[issue19249] Enumeration.__eq__

2013-10-13 Thread CliffM

New submission from CliffM:

Given that enumeration members are Singletons, can we not rely on the default
__eq__() method ?  (FWIW the existing tests all pass if you delete it)

This might be confusing for a reader later, so needs documenting.  Although I 
think it should be documented (in enum.py) either way.

Maybe also add a singletoness test ?

def test_singleton(self):
class A(Enum):
X=1
Y=2

self.assertTrue(id(A.X)==id(A.X))


Of course there is good chance that there is a test-case I have not thought of 
that will defeat this.  I am thinking about :

a) weak-ref handling of Enums 

b) unpickling, say by a user of the ZODB

Which might break the singletonicity. ??  Any offers ??

--
components: Tests
messages: 199774
nosy: CliffM
priority: normal
severity: normal
status: open
title: Enumeration.__eq__
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



[issue17631] inspect getsource does not display full text of lambda

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Unfortunately, this is impossible to fix with the current implementation, which 
only tokenizes the source.  A full parse would be necessary.

Since this is just a minor inconvenience (and there are many situations where 
the source cannot be found at all), I'm closing this as won't fix.

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> With your patch, can the SetTraceback in PyErr_Print be removed?

I don't think so. PyErr_Print() calls sys.excepthook, which can be
overriden with custom code.

> Or should PyErr_Display only set the tb if there is none on the
> object already?

Well, why not!

--

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

With your patch, can the SetTraceback in PyErr_Print be removed?
Or should PyErr_Display only set the tb if there is none on the object already?

--

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Attached patch does the setting in PyErr_Display (which is an undocumented API, 
thus presumably private), and adds a test for atexit.

--
Added file: http://bugs.python.org/file32095/atexit_tracebacks.patch

___
Python tracker 

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



[issue18527] Upgrade Modules/zlib to 1.2.8

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Sounds reasonable at least for 3.4.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue18776] atexit error display behavior changed in python 3

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

The attached patch fixes two instances of PyErr_Display being called without 
the traceback properly set on the exception object.

--
keywords: +patch
nosy: +georg.brandl, pitrou
Added file: http://bugs.python.org/file32094/set_traceback.patch

___
Python tracker 

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



[issue19248] sphinx is not py3k compatible

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Looks ok for now.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue19248] sphinx is not py3k compatible

2013-10-13 Thread Nick Guenther

Nick Guenther added the comment:

I see that in Doc/tools/sphinx-build.py there is this check:

if sys.version_info[:3] < (2, 4, 0):
sys.stderr.write("""\
Error: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though).
(If you run this from the Makefile, you can set the PYTHON variable
to the path of an alternative interpreter executable, e.g.,
``make html PYTHON=python2.5``).
""")

But I never saw this and had to debug it myself. I submit the attached patch as 
a solution.

--
keywords: +patch
resolution: duplicate -> 
status: closed -> open
type: enhancement -> 
Added file: http://bugs.python.org/file32093/sphinx_version_check.patch

___
Python tracker 

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



[issue19248] sphinx is not py3k compatible

2013-10-13 Thread Ezio Melotti

Ezio Melotti added the comment:

This is a duplicate of #10224.

--
nosy: +ezio.melotti
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Build 3.x documentation using python3.x
type:  -> enhancement

___
Python tracker 

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



[issue19248] sphinx is not py3k compatible

2013-10-13 Thread Nick Guenther

New submission from Nick Guenther:

I'm running Arch. I just checked out python's hg and tried to build the docs, 
and found that I couldn't:

$ cd cpython/doc
$ make update
[lots of output stripped]
$ make pydoc-topics
mkdir -p build/pydoc-topics build/doctrees
python tools/sphinx-build.py -b pydoc-topics -d build/doctrees -D 
latex_paper_size=  . build/pydoc-topics 
Traceback (most recent call last):
  File "tools/sphinx-build.py", line 27, in 
from sphinx import main
  File "/home/kousu/pro/cpython/Doc/tools/sphinx/__init__.py", line 44
except ImportError, err:
  ^
SyntaxError: invalid syntax
make: *** [build] Error 1

I edited the Makefile to say PYTHON   = python2
and then it worked. Is the assumption that python2 is still supposed to be the 
default python everywhere? Is python 3 not able to build itself yet?



[kousu@galleon Doc]$ pacman -Qi python
Name   : python
Version: 3.3.2-2
Description: Next generation of the python high-level scripting language
Architecture   : x86_64
URL: http://www.python.org/
Licenses   : custom
Groups : None
Provides   : python3
Depends On : expat  bzip2  gdbm  openssl  libffi  zlib
Optional Deps  : tk: for tkinter [installed]
 sqlite [installed]
Required By: cython  ipython  ktoblzcheck  libreoffice-common  python-cairo 
 python-dateutil  python-dbus  python-markupsafe
 python-numpy  python-pyparsing  python-pytz  python-pyzmq  
python-setuptools  python-sip  python-six  python-sympy
 python-tornado  python-xdg  ranger  youtube-dl
Optional For   : systemd
Conflicts With : None
Replaces   : python3
Installed Size : 86980.00 KiB
Packager   : Bart
Build Date : Fri Sep 6 03:31:57 2013
Install Date   : Tue Sep 17 10:29:36 2013
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By   : Signature

--
assignee: docs@python
components: Documentation
messages: 199764
nosy: docs@python, kousu
priority: normal
severity: normal
status: open
title: sphinx is not py3k compatible
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue18714] Add tests for pdb.find_function

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 86af5991c809 by Georg Brandl in branch 'default':
#18714: add attribution.
http://hg.python.org/cpython/rev/86af5991c809

--

___
Python tracker 

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



[issue18714] Add tests for pdb.find_function

2013-10-13 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9c65877b3e34 by Georg Brandl in branch 'default':
pdb: modernize find_function() and add tests for it.
http://hg.python.org/cpython/rev/9c65877b3e34

--
nosy: +python-dev
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue18714] Add tests for pdb.find_function

2013-10-13 Thread Georg Brandl

Georg Brandl added the comment:

Thanks for the patch!

--
nosy: +georg.brandl

___
Python tracker 

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



[issue19245] mingw-meta: installation

2013-10-13 Thread Georg Brandl

Changes by Georg Brandl :


--
dependencies: +MINGW: generalization of posix installation in distutils, MINGW: 
install import library, MINGW: support stdcall without underscore, MINGW: use 
replace instead rename to avoid failure on windows

___
Python tracker 

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



[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg

2013-10-13 Thread Georg Brandl

Changes by Georg Brandl :


--
versions: +Python 3.4 -Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue9613] Python considers pid longs under 64-bit Windows

2013-10-13 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Amaury is right, it seems a Windows pid is an int after all. I don't know where 
I got the other impression :-)

--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue10196] distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10

2013-10-13 Thread Georg Brandl

Changes by Georg Brandl :


--
status: pending -> closed

___
Python tracker 

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



  1   2   3   >