[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

It can be closed now.
Thanks for the reminder.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue17930] Search not needed in combinations_with_replacement

2013-05-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thanks Tim :-)

--

___
Python tracker 

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



[issue17908] Unittest runner needs an option to call gc.collect() after each test

2013-05-10 Thread Phil Connell

Changes by Phil Connell :


--
nosy: +pconnell

___
Python tracker 

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



[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-05-10 Thread Ben Hoyt

Ben Hoyt added the comment:

> Please bring this up on python-dev.

Good idea. Thread started: 
http://mail.python.org/pipermail/python-dev/2013-May/126119.html

--

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

> 2. Mike Bayer (SQL Alchemy author) has requested the ability to derive a
> custom metaclass that turns off the Enums-with-members-are-final
> subclassing restriction (relaxing the rule that members of an enum are
> instances of that enum to "members of an enum are instances of that enum,
> or one of its parent enums", but otherwise keeping the same behaviour as
> the standard enums).
>

Nick, after you read the whole code, please consider whether it's not
already complex enough even without catering to every other need out there.

--

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

On Fri, May 10, 2013 at 8:09 PM, Nick Coghlan wrote:

>
> Nick Coghlan added the comment:
>
> Two requests:
>
> 1. Lose the frame hack. With the explicit "module=__name__" API available,
> the implicit fragile magic isn't necessary and leads to Enum instances that
> may or may not support pickling depending on the implementation. Better to
> say "if you use the functional API without passing the module name, your
> Enum instances won't support pickling".
>
>
Strong -1 from me on this. The PEP has been accepted. Feel free to raise
this for discussion if you want to change the decision. With all due
respect to IronPython, most users can write simpler code and have pickling
work just fine.
___

--

___
Python tracker 

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



[issue12535] Chained tracebacks are confusing because the first traceback is minimal

2013-05-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Nick Coghlan

Nick Coghlan added the comment:

Two requests:

1. Lose the frame hack. With the explicit "module=__name__" API available, the 
implicit fragile magic isn't necessary and leads to Enum instances that may or 
may not support pickling depending on the implementation. Better to say "if you 
use the functional API without passing the module name, your Enum instances 
won't support pickling".

2. Mike Bayer (SQL Alchemy author) has requested the ability to derive a custom 
metaclass that turns off the Enums-with-members-are-final subclassing 
restriction (relaxing the rule that members of an enum are instances of that 
enum to "members of an enum are instances of that enum, or one of its parent 
enums", but otherwise keeping the same behaviour as the standard enums).

Barry would probably appreciate this capability, too ;)

We don't need to explicitly support this for the initial patch (besides, as I 
read the current code, you can get something like this already just by 
overriding EnumMeta._get_mixins), but we may want to revisit it as a supported 
subclassing API at some point in the future.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue1551113] random.choice(setinstance) fails

2013-05-10 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry, this is still rejected for the reasons that Tim mentioned.

--

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

By the way, if anyone is willing to take on the documentation, that could be of 
great help. It shouldn't be very hard since PEP 435 is extremely detailed. The 
stdlib .rst doc would be the descriptions from PEP 435 plus a reference of the 
exposed classes which is pretty minimal.

We'll need the documentation patch available by the time the code is done 
reviewing.

--

___
Python tracker 

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



[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue16694] Add pure Python operator module

2013-05-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4b3238923b01 by Raymond Hettinger in branch 'default':
Issue #16694:  Add source code link for operator.py
http://hg.python.org/cpython/rev/4b3238923b01

--

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-10 Thread Stefan Mihaila

Stefan Mihaila added the comment:

On 5/10/2013 11:46 PM, Stefan Mihaila wrote:
> Changes by Stefan Mihaila :
>
>
> --
> nosy: +mstefanro
>
> ___
> Python tracker 
> 
> ___
>
Hello. I've worked on implementing PEP3154 as part of GSoC2012.
My work is available in a repo at [1].
The blog I've used to report my work is at [2] and contains some useful 
information.

Here is a list of features that were implemented as part of GSoC:

* Pickling of very large bytes and strings
* Better pickling of small string and bytes (+ tests)
* Native pickling of sets and frozensets (+ tests)
* Self-referential sets and frozensets (+ tests)
* Implicit memoization (BINPUT is implicit for certain opcodes)
   - The argument against this was that pickletools.optimize would
 not be able to prevent memoization of objects that are not
 referred later. For such situations, a special flag at beginning
 could be added, which indicates whether implicit BINPUT is enabled.
 This flag could be added as one of the higher-order bits of the 
protocol
 version. For instance:
 PROTO \x04 + BINUNICODE ".."
 and
 PROTO \x84 + BINUNICODE ".." + BINPUT 1
 would be equivalent. Then pickletools.optimize could choose whether
 it wants implicit BINPUT or not. Sure, this would complicate 
matters and it's
 not for me to decide whether it's worth it.
 In my midterm report at [3] there are some examples of what a 
pickled string
 looks in v4 without implicit memoization, and some size comparisons
 to v3.
* Pickling of nested globals, methods etc. (+ tests)
* Pickling calls to __new__ with keyword args (+ tests)
* A BAIL_OUT opcode was always outputted when pickling failed, so that
   the Pickler and Unpickler can be both run at once on different ends
   of a stream. The Pickler could guarantee to always send a
   correct pickle on the stream. The Unpickler would never end up hanging
   when Pickling failed mid-work.
   -  At the time, Alexandre suggested this would probably not be a great
  idea because it should be the responsibility of the protocol used
  to assure some consistency. However, this does not appear to be
  a trivial task to achieve. The size of the pickle is not known in
  advance, and waiting for the Pickler to complete before sending
  the data via stream is not as efficient, because the Unpickler
  would not be able to run at the same time.
  write and read methods of the stream would have to be wrapped and
  some escape sequence used. This would
  increase the size of the pickled string for some sort of worst-case
  of the escape sequence, probably. My thought was that it would be
  beneficial for the average user to have the guarantee that the Pickler
  always outputs a correct pickle to a stream, even if it raises an 
exception.
* Other minor changes that I can't really remember.

Although I'm sure Alexandre had his good reasons to start the work from
scratch, it would be a shame to waste all this work. The features mentioned
above are working and although the implementation may not be ideal (I don't
have the cpython experience of a regular dev), I'm sure useful bits can be
extracted from it.
Alexandre suggested that I extract bits and post patches, so I have 
attached,
for now, support for pickling methods and nested globals (+tests).
I'm willing to do so for some or the rest of the features, should this 
be requested
and should I have the necessary time to do so.

[1] https://bitbucket.org/mstefanro/pickle4/
[2] https://pypickle4.wordpress.com/
[3] https://gist.github.com/mstefanro/3086647

--
Added file: http://bugs.python.org/file30213/methods.patch

___
Python tracker 

___diff -r 780722877a3e Lib/pickle.py
--- a/Lib/pickle.py Wed May 01 13:16:11 2013 -0700
+++ b/Lib/pickle.py Sat May 11 03:06:28 2013 +0300
@@ -23,7 +23,7 @@
 
 """
 
-from types import FunctionType, BuiltinFunctionType
+from types import FunctionType, BuiltinFunctionType, MethodType, ModuleType
 from copyreg import dispatch_table
 from copyreg import _extension_registry, _inverted_registry, _extension_cache
 from itertools import islice
@@ -34,10 +34,44 @@
 import io
 import codecs
 import _compat_pickle
+import builtins
+from inspect import ismodule, isclass
 
 __all__ = ["PickleError", "PicklingError", "UnpicklingError", "Pickler",
"Unpickler", "dump", "dumps", "load", "loads"]
 
+# Issue 15397: Unbinding of methods
+# Adds the possibility to unbind methods as well as a few definitions missing
+# from the types module.
+
+_MethodDescriptorType = type(list.append)
+_WrapperDescriptorType = type(list.__add__)
+_MethodWrapperType = type([].__add__)
+
+def _unbind(f):
+"""Unbinds a bound method."""
+

[issue17951] TypeError during gdb backtracing

2013-05-10 Thread Catalin Patulea

New submission from Catalin Patulea:

With libpython.py loaded in gdb, when backtracing and trying to pretty-print 
frame objects along the way, this error is sometimes raised:

Python Exception  object of type 'FakeRepr' has no 
len()

See attached patch against tip.

--
components: Demos and Tools
files: libpython-typeerror-str.patch
keywords: patch
messages: 18
nosy: Catalin.Patulea, dmalcolm
priority: normal
severity: normal
status: open
title: TypeError during gdb backtracing
type: behavior
Added file: http://bugs.python.org/file30212/libpython-typeerror-str.patch

___
Python tracker 

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



[issue14191] argparse doesn't allow optionals within positionals

2013-05-10 Thread paul j3

paul j3 added the comment:

I should note one caveat:

As a consequence of setting nargs to 0 for the first 'parse_know_args' step, 
all positional entries in the namespace get an empty list value ([]).  This is 
produced by 'ArgumentParser._get_values'.  With the builtin action classes this 
does not cause any problems.

However a custom action class might have problems with this [] value.
For example in 'test_argparse.py', TestActionUserDefined the PositionalAction 
class does check the values and throws an error with this [] value.

The positional arguments are removed from the namespace before it is passed on 
to the 2nd 'parse_known_args', so these [] in the first don't affect the final 
namespace.

I don't think anything about this should be added to main documentation, since 
it could confuse most readers.  I might add a note of warning to the code 
itself.

--

___
Python tracker 

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



[issue17950] Dynamic classes contain non-breakable reference cycles

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

Kristján Valur Jónsson added the comment:

Hello Antoine.
1) Yes, I am not completely happy with the approach myself, but I'd like to get 
the ball rolling.  One particular nuance is that there appears to be a way to 
provide a custom MRO, one which does not enforce the rule that the self type 
come first.
(although, in the code there is a place that iterates over the mro tuple 
starting from index 1... the code isn't completely consistent.)

An alternative approach, that would replace 'self' in the mro with Py_None, and 
then special casing this when doing lookup, might that be ok?

2) I was a bit worried about it, but running the test suite showed no problems. 
 The only time this weak reference gets dropped is when the class is garbage 
collected, hence the need to add special code to repr the descriptor.  The 
descriptors are normally part of the class, and then de-referenced at runtime 
into concrete things, such as bound methods, and the like.  I suppose we could 
float this on python-dev, to see what people think.

3) thanks for the heads up.  it looked a bit weird to me.  But python 3 code is 
still getting the shakedown, and touching these parts of the code can 
illustrate unknown bugs.  There are some other assumptions I came across in the 
code that are weird, but don't appear to be relevant. In one place, it is 
presumed that tp_mro could be NULL, but later, it is INCREFd.  And in another 
place, (descriptors) the type is XINCREFd, but then in other places, assumed to 
be true

Anyway, I'd like us to find a way to do this in a clean way.  I'll revisit the 
macro scheme, and see if I can do it more nicely and explicitly.

--

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-10 Thread Stefan Mihaila

Changes by Stefan Mihaila :


Removed file: http://bugs.python.org/file30211/780722877a3e.diff

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-10 Thread Stefan Mihaila

Changes by Stefan Mihaila :


Added file: http://bugs.python.org/file30211/780722877a3e.diff

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread mirabilos

mirabilos added the comment:

+   dest is always aligned on common platforms  
 
+   (if sizeof(PyASCIIObject) is divisible by SIZEOF_LONG). 
 

Actually, that’s the part that is not true. On m68k, and perfectly
permitted by the C standard, even a 24-byte object has only a
guaranteed alignment of 2 bytes (or one, if it’s a char array)
in the normal case (contains integers and pointers, nothing special).

We patched out this bogus assumption from things like glib already ;)

--

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread mirabilos

mirabilos added the comment:

I’m currently thinking this patch.
(Will need another day or so for compiles to finish, though.)

--
Added file: http://bugs.python.org/file30210/python3.3_3.3.1-1+m68k.1.debdiff

___
Python tracker 

___diff -u python3.3-3.3.1/debian/changelog python3.3-3.3.1/debian/changelog
--- python3.3-3.3.1/debian/changelog
+++ python3.3-3.3.1/debian/changelog
@@ -1,3 +1,9 @@
+python3.3 (3.3.1-1+m68k.1) unreleased; urgency=low
+
+  * Employ m68k build fix (see issue17237)
+
+ -- Thorsten Glaser   Fri, 10 May 2013 23:39:11 +0200
+
 python3.3 (3.3.1-1) unstable; urgency=low
 
   * Python 3.3.1 release.
diff -u python3.3-3.3.1/debian/patches/series.in 
python3.3-3.3.1/debian/patches/series.in
--- python3.3-3.3.1/debian/patches/series.in
+++ python3.3-3.3.1/debian/patches/series.in
@@ -55,0 +56 @@
+m68k-buildfix.diff
only in patch2:
unchanged:
--- python3.3-3.3.1.orig/debian/patches/m68k-buildfix.diff
+++ python3.3-3.3.1/debian/patches/m68k-buildfix.diff
@@ -0,0 +1,18 @@
+--- a/Objects/unicodeobject.c
 b/Objects/unicodeobject.c
+@@ -4661,6 +4661,7 @@ ascii_decode(const char *start, const ch
+ const char *p = start;
+ const char *aligned_end = (const char *) _Py_ALIGN_DOWN(end, SIZEOF_LONG);
+ 
++#if !defined(__m68k__)
+ #if SIZEOF_LONG <= SIZEOF_VOID_P
+ assert(_Py_IS_ALIGNED(dest, SIZEOF_LONG));
+ if (_Py_IS_ALIGNED(p, SIZEOF_LONG)) {
+@@ -4686,6 +4687,7 @@ ascii_decode(const char *start, const ch
+ return p - start;
+ }
+ #endif
++#endif
+ while (p < end) {
+ /* Fast path, see in STRINGLIB(utf8_decode) in stringlib/codecs.h
+for an explanation. */
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17944] Refactor test_zipfile

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, the first patch includes only this change (plus some needed regrouping and 
renaming). The second patch in additional wraps long lines, uses asserts with 
better error reporting, has better resource management ("with" operator and 
addCleanup), and contains other minor changes (see a difference between two 
patches).

--

___
Python tracker 

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



[issue17950] Dynamic classes contain non-breakable reference cycles

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> 1) the mro tuple in the type object is "nerfed" to contain a
> Py_None reference in its first place

I like the idea, but I find the implementation (the new macros) quite 
convoluted. I think special-casing the first tuple element where necessary 
would be cleaner.

> 2) the descriptors are modified to hold a weak-reference to the target 
> type, rather than a strong reference.

What would happen if someone keeps a reference to the descriptor and not to the 
class object? Is it a possible use case?

> 3) Fix process cleanup.

This was already done in changeset 6f4627a65c0a. You might want to update your 
working copy.

Does your patch cater to all possible implicit cycles, or only a subset of them?

--
nosy: +amaury.forgeotdarc, pitrou

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Ethan Furman

Ethan Furman added the comment:

Round 4.  I wonder if I should have used two digits to number the patches.  ;)

--
Added file: http://bugs.python.org/file30209/pep-0435_4.patch

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread mirabilos

mirabilos added the comment:

Currently 22; it will increase to 24 if a few more bits are added. That’s why I 
said it’s “fragile” magic.

--

___
Python tracker 

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-05-10 Thread Stefan Mihaila

Changes by Stefan Mihaila :


--
nosy: +mstefanro

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What is sizeof(PyASCIIObject) on m68k?

--

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I think we can be bold and put #if !defined(__m68k__) and #endif
> around the entire block and, should there ever be another architecture
> with similar issues, whitelist them there.

Agreed.

--

___
Python tracker 

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



[issue1545463] New-style classes fail to cleanup attributes

2013-05-10 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee: belopolsky -> 
status: open -> closed

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread mirabilos

mirabilos added the comment:

file30203/ascii_decode_nonaligned.patch is potentially a nop (the struct being 
a multiple of, in the m68k case 4, bytes is not an indicator of whether to skip 
it).

I think we can be bold and put #if !defined(__m68k__) and #endif around the 
entire block and, should there ever be another architecture with similar 
issues, whitelist them there.

--

___
Python tracker 

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



[issue17950] Dynamic classes contain non-breakable reference cycles

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

Kristján Valur Jónsson added the comment:

Adding file demonstraing the problem.

--
Added file: http://bugs.python.org/file30208/classleak.py

___
Python tracker 

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



[issue17950] Dynamic classes contain non-breakable reference cycles

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

New submission from Kristján Valur Jónsson:

Classes contain two kinds of cycles back to themselves:
1) in their __mro_  list, the class itself is typically the first member.
2) in the descriptors for various fields such as __dict__.

The problem here is that there is no way to break the cycle.  A class that is 
dynamically created (e.g. in a function) and then not needed, will stick around 
until garbage collection is performed.

This happens in spite of attempts within the core to avoid such cycles.  For 
instance, the type's tp_subclasses list contains to avoid a cycle between a 
baseclass and its parent.

A .py file demonstrating the problem is attached.

A patch is attached that resolves the issue:
1) the mro tuple in the type object is "nerfed" to contain a Py_None reference 
in its first place, where it previously held the cyclic reference to the type 
object itself.  This is then "fixed" in place where required.  the __mro__ 
attribute becomes a getter that duplicates the tuple.

2) the descriptors are modified to hold a weak-reference to the target type, 
rather than a strong reference.

3) Fix process cleanup.  The thread state cannot be released until after the 
cleanup of e.g. PySet_Fini() because the freeing of objects in there requires 
the DUSTBIN_SAFE macros that require the thread state.  Cleanup behaviour 
probably changed since objects go away on their own now.

4) changes to test_gc.py in the testsuite reflecting the changed behaviour

The patched code passes all the testsuite.

--
components: Interpreter Core
files: classleak.patch
keywords: patch
messages: 188875
nosy: kristjan.jonsson
priority: normal
severity: normal
status: open
title: Dynamic classes contain non-breakable reference cycles
type: resource usage
versions: Python 3.4
Added file: http://bugs.python.org/file30207/classleak.patch

___
Python tracker 

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



[issue17944] Refactor test_zipfile

2013-05-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

As I understand this, the main refactoring is to put the tests duplicated for 
zlib, bz2, and lzma into a master class that is then subclasses=d for each of 
the compressors. This looks like a great idea.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17898] gettext bug while parsing plural-forms metadata

2013-05-10 Thread Steve Strassmann

Steve Strassmann added the comment:

Sorry, I haven't installed python 3.*, I just have default Mac OS python 2.7.

Here's a minimal test case. Tar expands to
 file structure:
 
  ./test.py 
 
  ./en/LC_MESSAGES/messages.po   

$ ./test.py 

Traceback (most recent call last):
  File "./test.py", line 28, in 
test()
  File "./test.py", line 23, in test
gettext.install('messages', localedir=LOCALEDIR)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
 line 494, in install
t = translation(domain, localedir, fallback=True, codeset=codeset)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
 line 479, in translat\
ion
t = _translations.setdefault(key, class_(fp))
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
 line 180, in __init__
self._parse(fp)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/gettext.py",
 line 314, in _parse
v = v.split(';')
AttributeError: 'list' object has no attribute 'split'

--
Added file: http://bugs.python.org/file30206/pybug.tar.gz

___
Python tracker 

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



[issue17945] tkinter/Python 3.3.0: peer_create doesn't instantiate Text

2013-05-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(This issue only applies to 3.3+ because the method is new in 3.3.)

Gregory: 'works for me' means that the issue can be closed without a patch 
because Python actually 'works' for the example presented. I presume you mean 
that the tkinter works *after* you apply the patch and therefore consider it a 
possible fix to be applied. On that assumption, I downloaded it and will upload 
it here.

Also, if you specifically write issue2843 or #2843, the tracker makes a link to 
the issue.

--
keywords: +patch
nosy: +terry.reedy
resolution: works for me -> 
stage:  -> patch review
versions: +Python 3.4
Added file: http://bugs.python.org/file30205/issue17945.diff

___
Python tracker 

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



[issue14191] argparse doesn't allow optionals within positionals

2013-05-10 Thread Glenn Linderman

Glenn Linderman added the comment:

paul j3: Regarding earlier versions of these files - I do not see a way of 
deleting them. 

Click on edit, then there is an option to unlink. I don't know if they ever 
actually get deleted, but it clears out the clutter when looking for the latest 
version.

Will check out the newest code shortly.

--

___
Python tracker 

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



[issue17939] Misleading information about slice assignment in docs

2013-05-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since range objects have a known length, that example is not enough to show 
'any iterable'. However, generators do not even have a __length_hint__ and they 
work too.

a = [1,2,3]
a[0:1] = (i for i in range(4))
print(a)
>>> 
[0, 1, 2, 3, 2, 3]

--
nosy: +terry.reedy

___
Python tracker 

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



[issue14191] argparse doesn't allow optionals within positionals

2013-05-10 Thread paul j3

paul j3 added the comment:

'parse_fallback_args()' function is only in the 'test_intermixed.py' file, not 
the patch.  It should be in the 'if __name__' section of that file, along with 
the modified 'exit()' method, since it is part of these testing suit, not meant 
to be imported.  'test_intermixed.py' is more of an example and discussion 
tool, not a formal test.

I added the '_fallback' optional argument because the normal exit from 
'parse_args' using SystemExit is remarkably uninformative.  It's hard to 
distinguish between the 'fallback' errors, and the ones generated by 
'parse_known_args' (that have more to do with the argument strings).  One is a 
programming error, the other a user generated error.

It is possible to redefine ArgumentParser.error() so it gives more information, 
for example by raising an Exception(message).  I have added to 
test_intermixed.py an alternative 'parse_fallback_args' that uses such a 
modified error rather than the _fallback option.  But that ends up modifying 
the normal parsing error generation as well.

I used the 'fallback' idea to test 'parse_intermixed_args' against the whole 
set 'test_argparse.py' tests.  It would nice to have a way of doing that 
automatically anytime other features are added to 'parse_args'.  But I can't 
think of a clean way of doing that.

Regarding earlier versions of these files - I do not see a way of deleting 
them.  

I have attached a modified test_intermixed.py that has these changes.  I also 
modified how 'parse_known_intermixed_args' restores the original value of 
self.usage, using an outer 'try:finally:' block.  I need to make a note to 
myself to put that in the patch.

--
Added file: http://bugs.python.org/file30204/test_intermixed.py

___
Python tracker 

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



[issue17930] Search not needed in combinations_with_replacement

2013-05-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +terry.reedy

___
Python tracker 

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



[issue17906] JSON should accept lone surrogates

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I forgot about issue11489. After reclassification this issue is it's duplicate.

--
resolution:  -> duplicate
superseder:  -> json.dumps not parsable by json.loads (on Linux only)

___
Python tracker 

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



[issue11489] json.dumps not parsable by json.loads (on Linux only)

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I forgot about this issue and open a new issue17906. There is a patch for it. 
Simplejson has accepted it in 
https://github.com/simplejson/simplejson/issues/62.

RFC 4627 does not make exceptions for the range 0xD800-0xDFFF (unescaped = 
%x20-21 / %x23-5B / %x5D-10), and the decoder must accept lone surrogates, 
both escaped and unescaped. Non-BMP characters may be represented as escaped 
surrogate pair, so escaped surrogate pair may be decoded as non-BMP character, 
while unescaped surrogate pair shouldn't.

--
nosy: +bob.ippolito
versions: +Python 3.3, Python 3.4

___
Python tracker 

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



[issue17905] Add check for locale.h

2013-05-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 3.5

___
Python tracker 

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



[issue17898] gettext bug while parsing plural-forms metadata

2013-05-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Since the other two listed inner-loop issues apply to 3.x, I would guess that 
this does also. Steve, can you test with 3.3? And provide a *minimal*  test 
case?

--
nosy: +terry.reedy
stage:  -> test needed

___
Python tracker 

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



[issue12425] gettext breaks on empty plural-forms value

2013-05-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue1475523] gettext breaks on plural-forms header

2013-05-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue17895] TemporaryFile name returns an integer in python3

2013-05-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Given that the changed behavior is documented and pretty obviously intentional, 
it is not a bug. The proposal would have to be that we 'enhance' 3.4 *or later* 
by reverting back to the 2.x -- and possibly break 3.0 to 3.3 code. We are not 
going to do that without extremely good reason.

For a nameless file, using the integer fd as a 'name' seems more truthful than 
''. I believe the latter can be a actual filename on *nix. On Windows, 
while Explorer rejects it, there may be ways to bypass the check. The integer 
fd is also more useful than None and 'isintance(x.name, int)' is as easy to 
check as 'x.name is None'.

--
nosy: +terry.reedy
status: open -> closed
type: behavior -> enhancement

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Well, it will be safer to skip this block on such platforms.

--
keywords: +patch
Added file: http://bugs.python.org/file30203/ascii_decode_nonaligned.patch

___
Python tracker 

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



[issue17948] HTTPS and sending a big file size hangs.

2013-05-10 Thread Jesús Vidal Panalés

Jesús Vidal Panalés added the comment:

Thank you. I will modify IIS security to disable SSL older verions.

--

___
Python tracker 

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



[issue17948] HTTPS and sending a big file size hangs.

2013-05-10 Thread James O'Cull

James O'Cull added the comment:

I appreciate the response all the same. Thanks for taking the time to look at 
it, Antoine.

--

___
Python tracker 

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



[issue17948] HTTPS and sending a big file size hangs.

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Closing as won't fix. I hope you'll find a reasonable to deal with this, sorry 
:-/

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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




[issue17948] HTTPS and sending a big file size hangs.

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you for pointing this out. I am frankly shocked that IIS would defaut to 
SSLv2 (an obsolete and insecure version of the protocol), while Python's (and 
certainly Mercurial's) default settings allow for higher protocol versions.

> If you are interested in why Python 2.7.3 broke this, look at
> http://bugs.python.org/issue13885 for the explanation (it is
> security-related).

Indeed, it is a security fix. I have no desire to undo this change, which means 
things may get a bit painful with IIS apparently.

One way to deal with it may be to detect IIS after the first wrap_socket() 
(through an HTTP header in the response?) and then re-issue a wrap_socket() 
with IIS-specific parameters.

(forcing SSLv3 as the client protocol isn't terrific, since TLSv1 is AFAIR 
supposed to have improved security)

--

___
Python tracker 

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



[issue17940] extra code in argparse.py

2013-05-10 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Martin Morrison, can you check if my fix (cellfree4.diff) applies cleanly to 
3.3?  Or if nearly so, could you upload a fixed version here?  (Or create a new 
issue and assign it to me if you can't upload to this issue.)

--

___
Python tracker 

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



[issue17948] HTTPS and sending a big file size hangs.

2013-05-10 Thread James O'Cull

James O'Cull added the comment:

We have more information on this bug here. It's SSL v2 related when pushing to 
IIS.

http://stackoverflow.com/a/16486104/97964

Here's a paste from the StackOverflow answer:

I found a few ways of dealing with this issue:

To fix this server-side in IIS, download and install 
https://www.nartac.com/Products/IISCrypto/Default.aspx and click the BEAST 
button, or force SSL3.0 by disabling other protocols.

If you don't have access to the IIS server, you can fix it by rolling 
back Python to version 2.7.2 or earlier.

If you are adventurous, you can modify the mercurial source in 
sslutil.py, near the top, change the line

sslsocket = ssl.wrap_socket(sock, keyfile, certfile,
cert_reqs=cert_reqs, ca_certs=ca_certs)

to

from _ssl import PROTOCOL_SSLv3
sslsocket = ssl.wrap_socket(sock, keyfile, certfile,
cert_reqs=cert_reqs, ca_certs=ca_certs, 
ssl_version=PROTOCOL_SSLv3)

This will work around the problem and fix the push limit to mercurial 
behind IIS.

If you are interested in why Python 2.7.3 broke this, look at 
http://bugs.python.org/issue13885 for the explanation (it is security-related). 
If you want to modify Python itself, in Modules/_ssl.c change the line

SSL_CTX_set_options(self->ctx,
SSL_OP_ALL & 
~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS);

back to how it was prior to 2.7.3:

SSL_CTX_set_options(self->ctx, SSL_OP_ALL);

Compile and reinstall python, etc. This adds more SSL compatibility at 
the expense of potential security risks, if I understand the OpenSSL docs 
correctly.

--
nosy: +James.O'Cull

___
Python tracker 

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



[issue17906] JSON should accept lone surrogates

2013-05-10 Thread Bob Ippolito

Bob Ippolito added the comment:

The patch that I wrote for simplejson is here (it differs a bit from serhiy's 
patch): 
https://github.com/simplejson/simplejson/commit/35816bfe2d0ddeb5ddcc68239683cbb35b7e3ff2

I discovered another bug along the way in the pure-Python scanstring, int(s, 
16) will parse '0xNN' when json expects only strings of the form '' to 
work. I fixed that along with this issue by explicitly checking for x or X.

--

___
Python tracker 

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



[issue17940] extra code in argparse.py

2013-05-10 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +bethard
stage:  -> needs patch

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Ethan Furman

Ethan Furman added the comment:

More adjustments due to review.

--
Added file: http://bugs.python.org/file30202/pep-0435_3.patch

___
Python tracker 

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



[issue17923] test glob with trailing slash fail

2013-05-10 Thread Ezio Melotti

Changes by Ezio Melotti :


--
components: +Library (Lib)
nosy: +ezio.melotti
stage:  -> patch review

___
Python tracker 

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



[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-10 Thread Ezio Melotti

Ezio Melotti added the comment:

Raymond, since this has been merged to default too in e163c13b941c, can the 
issue be closed or is there something else left to do?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue17907] Deprecate imp.new_module() in favour of types.ModuleType

2013-05-10 Thread Ezio Melotti

Changes by Ezio Melotti :


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

___
Python tracker 

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



[issue17468] Generator memory leak

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The issue17807 patch has now been committed and should solve this issue. I 
would like to encourage anyone to test this change, as it is quite a 
significant departure from the previous semantics:
http://mail.python.org/pipermail/python-dev/2013-May/126102.html

--
assignee: docs@python -> 
components: +Interpreter Core -Documentation
resolution:  -> duplicate
status: open -> closed
superseder:  -> Generator cleanup without tp_del

___
Python tracker 

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



[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Martin Morrison

Martin Morrison added the comment:

Our usage of Python would certainly benefit from the backport.

We are embedding Python 3.3 in a system with requirements that lead us to 
disable the gc in most cases, so cycles are an obvious problem for us. Cycles 
created inadvertently, such as this, are the biggest problem. We would probably 
backport the fix anyway, but would prefer not to carry patches and instead pick 
up fixes via 3.3.x releases.

--

___
Python tracker 

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



[issue17904] bytes should be listed as built-in function for 2.7

2013-05-10 Thread Ezio Melotti

Ezio Melotti added the comment:

Here's a patch.  Do you think it should be added under the string signature 
too?  It will make linking easier, but it might be more confusing for users.

--
keywords: +patch
nosy: +chris.jerdonek, ezio.melotti
stage: needs patch -> patch review
type: behavior -> enhancement
Added file: http://bugs.python.org/file30201/issue17904.diff

___
Python tracker 

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



[issue995907] memory leak with threads and enhancement of the timer class

2013-05-10 Thread Charles-François Natali

Charles-François Natali added the comment:

I'm attaching a proof of concept code for a ScheduledExecutor
interface, and a ScheduledThreadPoolExecutor implementation
(unfortunately I can't upload it as a mercurial diff for now).

Here's what the API looks like:

"""
from concurrent.futures import ScheduledThreadPoolExecutor
import time

def say(text):
print("{}: {}".format(time.ctime(), text))

with ScheduledThreadPoolExecutor(5) as p:
p.schedule(1, say, 'hello 1')
f = p.schedule_fixed_rate(0, 2, say, 'hello 2')
p.schedule_fixed_delay(0, 3, say, 'hello 3')
time.sleep(6)
say("cancelling: %s" % f)
f.cancel()
time.sleep(10)
say("shutting down")
"""

schedule() is for one-shot, schedule_fixed_rate() for fixed rate
scheduling (i.e. there will be no drift due to the task execution
time), and schedule_fixed_delay() is for fixed delay (i.e. there will
always be a fixed amount of time between two invokations).

Random notes:
- the scheduling is handled by a new SchedQueue in the queue module:
sched would have been useful, but actually it can't be used here: it
stops as soon as the queue is empty, when it calls the wait function
it won't wake up if a new task is enqueued, etc. Also, I guess such a
queue could be useful in general.
- I had to create a DelayedFuture subclass, which is returned by
schedule_XXX methods. The main differences with raw Future are that it
has a scheduled time and period attributes, and supports
reinitialization (a future can only be run once). It can be cancelled,
and also supports result/exception retrieval.
- I don't know if a process-based counterpart
(ScheduledProcessPoolExecutor) is really useful. I didn't look at it
for now.

--
Added file: http://bugs.python.org/file30199/scheduled.diff
Added file: http://bugs.python.org/file30200/test.py

___
Python tracker 

___diff -ur cpython.orig/Lib/concurrent/futures/_base.py 
cpython-b3e1be1493a5/Lib/concurrent/futures/_base.py
--- cpython.orig/Lib/concurrent/futures/_base.py2013-05-07 
08:21:21.0 +
+++ cpython-b3e1be1493a5/Lib/concurrent/futures/_base.py2013-05-10 
16:35:16.0 +
@@ -6,7 +6,10 @@
 import collections
 import logging
 import threading
-import time
+try:
+from time import monotonic as time
+except ImportError:
+from time import time
 
 FIRST_COMPLETED = 'FIRST_COMPLETED'
 FIRST_EXCEPTION = 'FIRST_EXCEPTION'
@@ -188,7 +191,7 @@
 before the given timeout.
 """
 if timeout is not None:
-end_time = timeout + time.time()
+end_time = timeout + time()
 
 with _AcquireFutures(fs):
 finished = set(
@@ -204,7 +207,7 @@
 if timeout is None:
 wait_timeout = None
 else:
-wait_timeout = end_time - time.time()
+wait_timeout = end_time - time()
 if wait_timeout < 0:
 raise TimeoutError(
 '%d (of %d) futures unfinished' % (
@@ -390,11 +393,11 @@
 elif self._state == FINISHED:
 return self.__get_result()
 
-self._condition.wait(timeout)
+gotit = self._condition.wait(timeout)
 
 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
 raise CancelledError()
-elif self._state == FINISHED:
+elif gotit:
 return self.__get_result()
 else:
 raise TimeoutError()
@@ -423,11 +426,11 @@
 elif self._state == FINISHED:
 return self._exception
 
-self._condition.wait(timeout)
+gotit = self._condition.wait(timeout)
 
 if self._state in [CANCELLED, CANCELLED_AND_NOTIFIED]:
 raise CancelledError()
-elif self._state == FINISHED:
+elif gotit:
 return self._exception
 else:
 raise TimeoutError()
@@ -499,6 +502,39 @@
 self._condition.notify_all()
 self._invoke_callbacks()
 
+
+class DelayedFuture(Future):
+"""A future whose execution can be delayed, and periodic."""
+
+def __init__(self, sched_time, period=0, delay=0):
+super().__init__()
+self._sched_time = sched_time
+if period > 0:
+# step > 0 => fixed rate
+self._step = period
+elif delay > 0:
+# step < 0 => fixed delay
+self._step = -delay
+else:
+# step == 0 => one-shot
+self._step = 0
+
+def is_periodic(self):
+return self._step != 0
+
+def get_sched_time(self):
+return self._sched_time
+
+def rearm(self):
+"""Re-arm the future, and update its scheduled execution time."""
+with self._condition:
+if self._step > 0:
+self._sched_time += 

[issue17949] operator documentation mixup

2013-05-10 Thread Ezio Melotti

Ezio Melotti added the comment:

Fixed, thanks for the report and the patch!

--
assignee: docs@python -> ezio.melotti
nosy: +ezio.melotti
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue17949] operator documentation mixup

2013-05-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9c93a631e95a by Ezio Melotti in branch '2.7':
#17949: fix merge glitch in itemgetter signature.  Patch by Martijn Pieters.
http://hg.python.org/cpython/rev/9c93a631e95a

--
nosy: +python-dev

___
Python tracker 

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



[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2013-05-10 Thread Martijn Pieters

Martijn Pieters added the comment:

The 2.7 patch shifted the `itemgetter()` signature to above the `attrgetter()` 
change and new notes.

New patch to fix that in issue #17949: http://bugs.python.org/issue17949

--
nosy: +mjpieters

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread mirabilos

mirabilos added the comment:

Antoine: precisely.

Serhiy: sure. The times are now in msec per loop.
I did three subsequent runs, so the second and
third tuple are cache-warm.

Without assert: (89,88), (87,87), (89,86)
Without block : (79,78), (78,78), (79,78)

And in a second run:

Without assert: (87,88), (87,88), (92,87)
Without block : (111,91), (78,85), (79,79)

This means that, again, removing the “optimised”
code speeds up operations (on this particular
slow architecture.

--

___
Python tracker 

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



[issue17949] operator documentation mixup

2013-05-10 Thread Martijn Pieters

New submission from Martijn Pieters:

Rev 83684 (http://hg.python.org/cpython/rev/5885c02120f0) managed to move the 
`attrgetter()` `versionadded` and `versionchanged` notes down to the 
`itemgetter()` documentation instead, by moving the `itemgetter()` signature 
*up* above these lines.

Now the docs claim `itemgetter()` gained support for dotted attributes in 
version 2.6, which makes no sense, and there is another set of added and 
changed notes lower down in the same section.

This patch puts the `itemgetter()` signature back in the correct location.

--
assignee: docs@python
components: Documentation
files: operator_documentation_fix.patch
keywords: patch
messages: 188846
nosy: docs@python, mjpieters
priority: normal
severity: normal
status: open
title: operator documentation mixup
versions: Python 2.7
Added file: http://bugs.python.org/file30198/operator_documentation_fix.patch

___
Python tracker 

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



[issue17944] Refactor test_zipfile

2013-05-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file30197/test_zipfile_2.patch

___
Python tracker 

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



[issue17883] Fix buildbot testing of Tkinter

2013-05-10 Thread Zachary Ware

Zachary Ware added the comment:

Thanks for your response, Martin.

Martin v. Löwis wrote:
> Zach: Temporarily committing changes to test specific buildbot issues
> is fine

I suppose it would also be beneficial to get some output from the other bots 
which are *not* failing, to have something to compare with.  In that case, 
here's a (very) temporary patch we can try for a round of builds.

> asking the slave operator for direct access to the machine 
> may also work.

Trent, what's your policy on letting non-committers play around in your 
machines? :)  Alternately, do you know of anything about that machine that 
could be causing the failures?

--
nosy: +trent
Added file: http://bugs.python.org/file30196/issue17883-tmp-test.diff

___
Python tracker 

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



[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Ok, the deed is done.  Thanks for your review, Benjamin!  I've reassigned it to 
you so you can fix up the test if you want to.

What would you think of a backport to 3.3?

--
assignee: gvanrossum -> benjamin.peterson
resolution:  -> fixed

___
Python tracker 

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



[issue17927] Argument copied into cell still referenced by frame

2013-05-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d331e14cae42 by Guido van Rossum in branch 'default':
#17927: Keep frame from referencing cell-ified arguments.
http://hg.python.org/cpython/rev/d331e14cae42

--
nosy: +python-dev

___
Python tracker 

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



[issue1045893] warning '"_POSIX_C_SOURCE" redefined' when include Python.h

2013-05-10 Thread Jonathan Wakely

Jonathan Wakely added the comment:

Insisting on including Python.h first is just broken.

GNU libc's /usr/include/features.h will override it anyway when _GNU_SOURCE is 
defined:

# undef  _POSIX_C_SOURCE
# define _POSIX_C_SOURCE200809L
# undef  _XOPEN_SOURCE
# define _XOPEN_SOURCE  700

So if you define _GNU_SOURCE ( which happens automatically when using G++) the 
annoying defines in pyconfig.h are overridden anyway, so why not just only 
define them if not already defined?

Either you include Python.h first and its settings get ignored by glibc, or you 
don't include it first and you get annoying warnings.

--
nosy: +Jonathan.Wakely

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Ethan Furman

Changes by Ethan Furman :


--
hgrepos:  -189

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Ethan Furman

Ethan Furman added the comment:

Incorporated comments.

--
Added file: http://bugs.python.org/file30195/pep-0435_2.patch

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Alex Gaynor

Changes by Alex Gaynor :


--
nosy: +alex

___
Python tracker 

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



[issue14596] struct.unpack memory leak

2013-05-10 Thread Meador Inge

Meador Inge added the comment:

>
> Serhiy Storchaka added the comment:
>
> So what about more compact Struct object?

I already implemented the count optimization as a part of my patch for
implementing
PEP 3188 in issue3132.  I need to rebaseline the patch.  It has gotten
stale.  Hopefully
there is still interest in the PEP 3188 work and I can get that patch
pushed through.

--

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

Regarding module vs. module_name for the extra param in the functional API, 
Guido rightly points out in issue 17941 that __module__ is the class attribute, 
so "module" is a consistent choice.

--

___
Python tracker 

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



[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

On Fri, May 10, 2013 at 7:02 AM, Guido van Rossum wrote:

>
> Guido van Rossum added the comment:
>
> Module, please. The class attribute is also called __module__ after all.
>

Makes sense. Thanks.

--

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

OK, I sent another batch of reviews through the code review system - Ethan you 
should've gotten an email about it.

--

___
Python tracker 

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



[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-10 Thread Guido van Rossum

Guido van Rossum added the comment:

Module, please. The class attribute is also called __module__ after all.

On Friday, May 10, 2013, Eli Bendersky wrote:

>
> Eli Bendersky added the comment:
>
> A question that came up while reviewing the new enum code: "module" or
> "module_name" for this extra argument? The former is shorter, but the
> latter is more correct in a way.
>
> --
>
> ___
> Python tracker >
> 
> ___
>

--

___
Python tracker 

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



[issue17941] namedtuple should support fully qualified name for more portable pickling

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

A question that came up while reviewing the new enum code: "module" or 
"module_name" for this extra argument? The former is shorter, but the latter is 
more correct in a way.

--

___
Python tracker 

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



[issue5901] missing meta-info in documentation pdf

2013-05-10 Thread A.M. Kuchling

A.M. Kuchling added the comment:

This seems to be fixed now.  I downloaded python-3.3.1-docs-pdf-letter.tar.bz2 
and ran pdfinfo on using.pdf:

Title:  Python Setup and Usage
Subject:
Keywords:   
Author: Guido van Rossum, Fred L. Drake, Jr., editor
Creator:LaTeX with hyperref package
Producer:   pdfTeX-1.40.10
CreationDate:   Fri May 10 09:42:17 2013
ModDate:Fri May 10 09:42:17 2013
Tagged: no
Pages:  65
Encrypted:  no
Page size:  612 x 792 pts (letter)
File size:  432316 bytes
Optimized:  no
PDF version:1.4

We could fill in Subject and Keywords, but the basic fields of Title and Author 
seem to be present.  (Do we need to change author to 'Python Development Group' 
or 'PSF'?)

--
nosy: +akuchling

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Eli Bendersky added the comment:

I don't see docs in the patch, but perhaps that should be a separate patch to 
keep reviewing easier.

Also, Ethan, number the patch files in some way (like pep-435.1.patch, 
pep-435.N.patch) as they go through rounds of reviews.

--
assignee: docs@python -> 

___
Python tracker 

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



[issue11016] stat module in C

2013-05-10 Thread Christian Heimes

Christian Heimes added the comment:

AP has started to review my patch. I'm not yet sure how we should handle 
constants and functions when the platform doesn't provide them. For example 
Windows doesn't have any S_IS*() function like macros and doesn't provide a 
S_IFBLK constant.

We have three possibilities here:

1) omit the constant / function (breaks b/w compatibility)
2) add constant with a value of 0 / function that returns false (may break b/w 
compatibility)
3) default to current value from Lib/stat.py

I'm against 1) because it breaks backwards compatibility and makes the module 
harder to use. I like to follow 3) for all S_I*, SF_* and UF_* macros and 
functions that are currently provided by the stat module and 2) for new 
constants and functions such as S_ISDOOR().

--
title: Add S_ISDOOR to the stat module -> stat module in C

___
Python tracker 

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



[issue17947] Code, test, and doc review for PEP-0435 Enum

2013-05-10 Thread Eli Bendersky

Changes by Eli Bendersky :


Removed file: http://bugs.python.org/file30191/ref435.py

___
Python tracker 

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



[issue14596] struct.unpack memory leak

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

So what about more compact Struct object? This is not only memory issue (a 
Struct object can require several times larger memory than size of processed 
data), but performance issue (time of creating such object is proportional to 
it's size).

Here is a patch with updated __sizeof__ method and tests.

--
Added file: http://bugs.python.org/file30194/struct_repeat_2.patch

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please repeat the tests with a larger data (1MB or more)?

--

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Which supports your suspicion that the optimised case may not be needed 
> at all.

So we can just skip the assert when __m68k__ is defined?

--

___
Python tracker 

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



[issue5773] Crash on shutdown after os.fdopen(2) in debug builds

2013-05-10 Thread Anselm Kruis

Anselm Kruis added the comment:

Hi,

I was faced with a very similar problem also caused by an invalid file 
descriptor.

My solution is to set an invalid parameter handler, that does nothing. This 
effectively disables Dr. Watson. Perhaps this is a suitable solution for other 
users too. And it does not require a patch.

def set_invalid_parameter_handler(flag):
"""
Set the MSVCRT invalid parameter handler.

If flag is True, this function sets an invalid parameter handler,
that does nothing. This effectively disables Dr. Watson.
If flag is an integer number, it must be the address of an 
invalid parameter handler function. 
If flag is None, this function removes the invalid parameter
handler. This effectively enables Dr. Watson.

The return value is the address of the current handler or None,
if no handler is installed.

Example::

old = set_invalid_parameter_handler(True)
try:
do_something_nasty
finally:
set_invalid_parameter_handler(old)
 
"""
try:
# get the msvcrt library
import ctypes.util
libc = ctypes.util.find_msvcrt()
if not libc:
# probably not windows
return None
libc = getattr(ctypes.cdll, libc)
siph = libc._set_invalid_parameter_handler
siph.restype = ctypes.c_void_p
siph.argtypes = [ ctypes.c_void_p ]
# now we need a suitable handler. 
# The handler must simply return without performing any actions.
# Of course there is none.
# But if we look at the calling convention (cdecl), and 
# at the fact, that we don't need the argument values
# we find, that we can call any function, as long as the function 
# does not harm. A suitable function is "int abs(abs)".
null_handler = libc.abs
except Exception:
# probably not the correct windows version 
return None
if flag is True:
flag = null_handler
return siph(flag)

--
nosy: +anselm.kruis

___
Python tracker 

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



[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Right, I misread the code.
> Since the remove_subclass() function is called when a subclass dies,
> I don't think it is necessary to clear out weak references in
> add_subclass().  They are there merely to break the reference cycle.

Agreed.

--

___
Python tracker 

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



[issue9687] dbmmodule.c:dbm_contains fails on 64bit big-endian (test_dbm.py fails) when built against gdbm (int vs Py_ssize_t)

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Should be fixed in issue17926. AFAICT the issue doesn't exist on 3.x.

--
resolution:  -> duplicate
stage: patch review -> committed/rejected
status: open -> closed
superseder:  -> PowerLinux dbm failure in 2.7
versions:  -Python 3.1, Python 3.2

___
Python tracker 

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



[issue17936] O(n**2) behaviour when adding/removing classes

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

Kristján Valur Jónsson added the comment:

Right, I misread the code.
Since the remove_subclass() function is called when a subclass dies, I don't 
think it is necessary to clear out weak references in add_subclass().  They are 
there merely to break the reference cycle.

Btw, the 'patch diff' stuff seems to be broken in the tracker 

--

___
Python tracker 

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



[issue17926] PowerLinux dbm failure in 2.7

2013-05-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

See also issue9687.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue9687] dbmmodule.c:dbm_contains fails on 64bit big-endian (test_dbm.py fails) when built against gdbm (int vs Py_ssize_t)

2013-05-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +pitrou

___
Python tracker 

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



[issue17936] O(n**2) behaviour when adding/removing classes

2013-05-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Py_None is what PyWeakref_GET_OBJECT() returns when the object is dead.
(same as calling () on a weakref, really)

The patch looks straightforward to me. 2.7 doesn't receive performance fixes, 
though, except for large regressions. Also, we've had enough regressions in the 
last 2.7 bugfix release, IMHO.

(I had worked on a patch which replaced the list with a dict, but I had 
refcounting issues with it, and I'm not interested enough in the issue to push 
any further)

--

___
Python tracker 

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



[issue17237] m68k aligns on 16bit boundaries.

2013-05-10 Thread mirabilos

mirabilos added the comment:

Hi again,

sorry for being a bit late in following up to this.

Here are the results for the two runs you requested; these were done on the 
same machine, intermixed (the first one cache-clean, the second and third run 
subsequently (so that the third run is cache-filled)). I used static builds.

For the “without assert”, I get approximately 570 usec per loop consistently:
(590,580), (570,570), (560,580), (570,560)
Interestingly enough, there seems to be no preference either way (ASCII or 
UTF-8).

For the “without the whole if‥endif block”, I get mixed results:
(650,540), (690,530), (520,530), (650,540)
Interesting here is that the third run of them both has a lower ASCII than 
UTF-8 time, the others don’t – but the UTF-8 run is the second in a row, so 
cache might be of an issue.

Repeating the runs, I get (560,590), (540,530) for the second case,
and (760,570), (590,660) for the first case breaking its “consistently
570 usec” streak. Error of measurement may be large, thus.

Which supports your suspicion that the optimised case may not be needed at all.


Matthias asked me to provide links how to set up an Atari VM with Debian 
unstable and a clean/minimal unstable chroot, since there’s much use of Ubuntu 
here who ship ARAnyM (I even filed a Sync Request so that the latest release 
got a fixed version ☺).

https://wiki.debian.org/Aranym/Quick#download has got pointers for the first 
part (setting up an ARAnyM VM), and https://wiki.debian.org/M68k/Installing 
contains the whole documentation (we cannot currently use d-i but people are 
working on it). http://people.debian.org/~tg/f/20121227/m68k-buildd.tgz is the 
output of “debootstrap --variant=buildd” and as such should be usable in either 
cowbuilder or sbuild. Considering that we *only* have unstable available, you 
may want to be careful when upgrading ;) but an apt-get update should work out 
of the box (takes a few minutes).

The VMs have 768+14 MiB RAM each in the sample configuration (maxed out), which 
makes them use a bit less than 1 GiB on the host side. A 3 GHz host CPU is of 
benefit.

--

___
Python tracker 

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



[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

2013-05-10 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> Deciding what's best to do at this point without breaking existent
> code is not easy, that is why I think that on python <= 3.3 we
> should fix *asynchat* in order to take EAGAIN/EWOULDBLOCK into
> account and leave asyncore's recv() alone.

IMHO for all python versions, asynchat should be fixed and recv() left
unchanged raising OSError with EAGAIN/EWOULDBLOCK. With the proposed
change on recv(), asyncore users would need to handle this new
None returned value anyway, instead of handling the exception which is
much more explicit.

The attached patch does this on the default branch.

--
Added file: http://bugs.python.org/file30193/EWOULDBLOCK.patch

___
Python tracker 

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



[issue17936] O(n**2) behaviour when adding/removing classes

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

Kristján Valur Jónsson added the comment:

So, any objections?  It is pretty straighforward.  Btw, the searching for 
Py_NONE seems to be a rudiment of some older version, there is no place where a 
Py_NONE is put in there.

Also, what is the policy for 2.7?  Are performance bugs proper bugs?

--

___
Python tracker 

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



  1   2   >