[issue9086] Wrong linking terminology in windows FAQ

2010-07-04 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I agree with John: this paragraph is technically incorrect. See

http://msdn.microsoft.com/en-us/library/ms681914%28v=VS.85%29.aspx

for an official definition of the relevant terms.

I vaguely recall objecting to that text when it got added, but in the 
discussion, it would have meant that I would have to rewrite the text myself, 
which I didn't want to (maybe I'm confusing this with something else, though).

In any case, it would be possible to actually use static linking as well for 
Python. There are currently no VS projects defined to create a static library, 
and such a thing couldn't dynamically load modules (which might not be 
necessary for embedding).

I agree with Terry that it would be best if John would produce some text he's 
happy with.

--

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



[issue7673] audioop: check that length is a multiple of the size

2010-07-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It seems you introduced a reference leak, Victor.
http://mail.python.org/pipermail/python-checkins/2010-July/094756.html

--
priority: release blocker - high
resolution: fixed - accepted
status: closed - open

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



[issue7673] audioop: check that length is a multiple of the size

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Fixed in r82527 (py3k), r82528 (release31-maint).

--
status: open - closed

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



[issue4640] optparse doesn’t disallow adding one-da sh long options (“-option”)

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

David committed a unit test in r82233. Who wants to propose a patch now?

--
resolution:  - accepted
stage: unit test needed - needs patch

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



[issue9145] test_coercion fails in refleak runs

2010-07-04 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
assignee:  - flox
components:  -Library (Lib)
resolution:  - accepted
stage:  - needs patch

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



[issue5672] Implement a way to change the python process name

2010-07-04 Thread Daniele Varrazzo

Daniele Varrazzo p...@develer.com added the comment:

Hello everybody,

I've finished porting the module to Python 3, so I think it's a good starting 
point for considering its inclusion into the stdlib. The source is already out; 
tomorrow I'll test for regressions on mac osx and release the package.

I'm not going to champion a PEP for its inclusion though, as I'm not the right 
person to do what described in the pep approval process. I have no objection if 
somebody wanted to push for it anyway and to fulfill the requirements outlined 
by Martin.

Marcelo, I think it's up to you :)

--

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

this breaks the build if the time and datetime extensions are built statically 
into the python interpreter.

The build fails with a link error; adding the _time extension to 
Modules/Setup.dist

@@ -160,6 +160,7 @@
 #cmath cmathmodule.c _math.c # -lm # complex math library functions
 #math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
 #_struct _struct.c # binary structure packing/unpacking
+#_time _time.c # # segregated code shared between time and datetime modules
 #time timemodule.c # -lm # time operations and variables
 #operator operator.c   # operator.add() and similar goodies
 #_weakref _weakref.c   # basic weak reference support

you get another link error:

libpython3.2.a(config.o):(.data+0x58): undefined reference to `PyInit__time'
collect2: ld returned 1 exit status

because _time isn't a proper extension.

raising the severity as this is a regression

--
nosy: +doko
priority: normal - high
status: closed - open

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Matthias Klose

Changes by Matthias Klose d...@debian.org:


--
resolution: fixed - 

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

please find attached a patch to build as a statically linked extension, 
registering the empty _time module.

--
Added file: http://bugs.python.org/file17853/time.diff

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



[issue4640] optparse doesn’t disallow adding one-da sh long options (“-option”)

2010-07-04 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I didn't commit a unit test for the revised subject, my unit test was for the 
previous misunderstood diagnosis.  So a unit test for disallowing single dash 
long options in add_option is still needed.

Note that this appears (at least on a quick test) to apply to argparse as well. 
 I've left 2.7 and 3.1 in versions, but I'm not 100% sure this should be 
backported since it is a behavior change.  But it's hard to imagine working 
code using this (does it even do anything, or is the single dash option just 
silently ignored?)

--
nosy: +bethard
versions: +Python 3.1, Python 3.2 -Python 2.6

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



[issue8910] Write a text file explaining why Lib/test/data exists

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Benjamin, is it too late?

--
nosy: +benjamin.peterson
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue7829] dis module documentation gives no indication of the dangers of bytecode inspection

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
status: open - closed

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

_time.c is not supposed to be compiled into an extension.  It is similar to 
_math.c - if you add a line

_math _math.c

to Setup, you get a similar compile error. What needs to be done, however, is 
to add _time.c to time and datetime lines.  See issue9012a.diff.

--
Added file: http://bugs.python.org/file17854/issue9012a.diff

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



[issue9145] test_coercion fails in refleak runs

2010-07-04 Thread Florent Xicluna

Florent Xicluna florent.xicl...@gmail.com added the comment:

Fixed with r82529

--
resolution: accepted - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

doesn't work:

ranlib libpython3.2.a
Modules/_time.o: In function `_PyTime_DoubleToTimet':
/scratch/packages/python/3.2/python3.2-3.2~~20100704/build-shared/../Modules/_time.c:11:
 multiple definition of `_PyTime_DoubleToTimet'
Modules/_time.o:/scratch/packages/python/3.2/python3.2-3.2~~20100704/build-shared/../Modules/_time.c:11:
 first defined here
collect2: ld returned 1 exit status
ln: accessing `libpython3.2.so.1.0': No such file or directory
make[1]: *** [libpython3.2.so] Error 1

--

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Matthias, does building both the math and cmath modules statically into the 
interpreter fail in a similar manner?

--

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



[issue8892] 2to3 fails with assertion failure on from itertools import *

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee:  - benjamin.peterson
nosy: +benjamin.peterson
stage:  - unit test needed

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



[issue1506122] Add compose function to the functools

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Gregory, any update on this? Maybe you can poll python-ideas.

Collin, any download stats and feedback on your package?

--
nosy: +merwok

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Matthias Klose

Matthias Klose d...@debian.org added the comment:

yes, same issue with math/cmath.

--

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



[issue9012] Separate compilation of time and datetime modules

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Thanks.  Looks like we need a general solution to the problem of shared 
(non-module) dependencies in modules.

So all that's needed is a way to stop _time.o showing up twice in MODOBJS in 
the Makefile, right?

(For some reason, ranlib on OS X doesn't seem to have any problem with 
multiply-defined symbols;  obviously Linux is different.)

--

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



[issue8472] itertools.filterfalse() function missing

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +d...@python

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



[issue9141] Allow objects to decide if they can be collected by GC

2010-07-04 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

I don't understand the tp_del / tp_dealloc argument here.  This is really not 
the concern of gc.  Gc only goes and finds unreachable objects, and if they are 
deemend collectable, makes them go away by clearing their references.
GC only cares that during the final release of any objects in a reference 
cycle, no non-trivial code may run (for various technical reasons).  So, 
objects deemed sensitive in this way, are left alone (and put in gc.garbage 
instead).
GC has no other knowledge of how objects behave, if or when any finalizers are 
called.  The only thing gc does is calling Py_DECREF (through the tp_clear 
slot).  Everything else is up to the objects.

The intent of this patch is for objects themselves to be able to provide better 
information to GC as to whether they are too sensitive to be cleared by GC, 
rather than GC relying solely on the presence of a __del__ method, or using the 
builtin special case knowledbe for PyGen objects.

Whether finalizers are called from tp_del or tp_dealloc is beyond the scope of 
the gc module or, indeed, this patch.

--

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



[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

I propose than tests and demos be run during the test suite, as a sanity check 
to prevent them getting badly out of sync (see “Signs of neglect thread?” 
starting at http://mail.python.org/pipermail/python-dev/2010-June/101092.html)

Is this a good idea?

--
components: Demos and Tools, Tests
messages: 109227
nosy: merwok
priority: low
severity: normal
status: open
title: Run tests and demos as part of the test suite
versions: Python 3.2

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



[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I propose that tests and demos be run during the test suite, as a sanity check 
to prevent them from getting badly out of sync (see “Signs of neglect thread?” 
starting at http://mail.python.org/pipermail/python-dev/2010-June/101092.html)

Is this a good idea?

--

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



[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--

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



[issue9141] Allow objects to decide if they can be collected by GC

2010-07-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 GC only cares that during the final release of any objects in a
 reference cycle, no non-trivial code may run (for various technical
 reasons).  So, objects deemed sensitive in this way, are left alone
 (and put in gc.garbage instead).

Which is really the problem, and why you should prefer tp_dealloc over
tp_del.
(unless you want gc.garbage to fill up too easily)

--

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



[issue8892] 2to3 fails with assertion failure on from itertools import *

2010-07-04 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Fixed in r82530.

--
resolution:  - fixed
status: open - closed

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



[issue9149] colorsys.py function rgb_to_hls

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

I think the arguments to rgb_to_hls are supposed to be floats in the range 
[0.0, 1.0].

--
nosy: +mark.dickinson

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



[issue9128] Parser module fails to validate class decorators correctly.

2010-07-04 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
assignee:  - mark.dickinson

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



[issue9152] Dead code in datetime module

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Committed in r82533.

--
status: open - closed

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



[issue9128] Parser module fails to validate class decorators correctly.

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Fixed in r82532 (release27-maint) and r82534 (release26-maint).

--
versions:  -Python 2.6, Python 2.7

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



[issue7582] Use ISO timestamp in diff.py

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
title: [patch] diff.py to use iso timestamp - Use ISO timestamp in diff.py

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



[issue444582] Finding programs in PATH, addition to os

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Is a “which” function that useful, since we have os.exec* functions that search 
the PATH for us? It seems to me that wanting to know the exact path of an 
executable is a specialized need, and that adding this function would make 
beginners use it instead of the os.exec* family.

--
nosy: +merwok

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



[issue9152] Dead code in datetime module

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Merged in 3.1 in r82536.

--
stage: commit review - committed/rejected
versions: +Python 3.1

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



[issue9128] Parser module fails to validate class decorators correctly.

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

and in r82537 (py3k), r82539 (release31-maint).

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

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



[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +holdenweb

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I’m making this a meta-bug to record the evaluation of demos and tools, in 
followup with the thread “Signs of neglect?” started on 
http://mail.python.org/pipermail/python-dev/2010-June/101092.html.

Some of them have already been adopted or deleted. Please add yourself to 
Misc/maintainers.rst when you adopt one.

I also propose adding either a section in the README or a new README.removed 
file to list the deletions; there are probably people out there using these 
tools (maybe not demos, though), so it’s more polite to tell them “metaclasses 
is removed, see this doc for modern built-in metaclasses” than to just remove 
the file.

Regarding testing, please comment on #9153.

--
dependencies: +Demo/embed/demo.c use of PySys_SetArgv() is invalid, Use ISO 
timestamp in diff.py, replace dist/src/Tools/scripts/which.py with tmick's 
which, svnmerge errors in msgfmt.py
nosy: +holdenweb
title: Demo/ directory needs to be tested and pruned - Demo and Tools need to 
be tested and pruned

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



[issue9083] At least some Tools utilities are still Python 2

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I opened a bug about testing demos and tools: #9153.

There was already a bug about cleaning up demos, #7962, so I’ve made it into a 
meta-bug for demos and tools, superseding this one. Steve, I’m adding you to 
the nosy there, but I don’t feel confident enough to raise the severity or add 
other people to nosy.

--
nosy: +merwok
resolution:  - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder:  - Demo and Tools need to be tested and pruned
versions:  -Python 3.1

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



[issue9118] help() on a property descriptor launches interactive help

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Committed in r82547. I am leaving it open to decide whether this is a 
3.1-backport candidate.   Also I am not sure this is NEWS-worthy.


Jack,

Does this address your issue?  Note that

 help(X.foo.fset)

will still not return help on X.foo, but it will make it obvious that 
X.foo.fset is None.

--
stage: commit review - committed/rejected
versions: +Python 3.1

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



[issue9141] Allow objects to decide if they can be collected by GC

2010-07-04 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

I'm confused, Antoine. _I_ am not preferring anything.  I am not modifying the 
way finalizers are called.  I'm merely providing a way for objects to signal 
that they _have_ (or don't have) non-trivial finalizers.

A finalizer _may_ be tp_del, but it may be any code that is called as part of 
tp_dealloc().  This patch allows an object to say:  Calling tp_dealloc() is 
currently unsafe from a gc.collect() run.

--

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



[issue9141] Allow objects to decide if they can be collected by GC

2010-07-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 A finalizer _may_ be tp_del, but it may be any code that is called as
 part of tp_dealloc().  This patch allows an object to say:  Calling
 tp_dealloc() is currently unsafe from a gc.collect() run.

Well, I don't know what you mean. tp_dealloc should always be safe and
is never checked for by the GC.

By the way, tp_del isn't even documented, which reinforces my point that
it's not really for use by third-party extension types.

I think we are reaching the point where, if you want this to happen, you
should ask for opinions on python-dev, because I really don't understand
which problem you are trying to solve.

--

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



[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Many demos already include a self-test:

$ grep '^def test(' Demo/*/*.py
Demo/classes/Complex.py:def test():
Demo/classes/Dates.py:def test(firstyear, lastyear):
Demo/classes/Range.py:def test():
Demo/classes/Vec.py:def test():
Demo/parser/test_parser.py:def test():
Demo/pdist/FSProxy.py:def test():
Demo/pdist/RCSProxy.py:def test():
Demo/pdist/cmdfw.py:def test():
Demo/pdist/cvslib.py:def test():
Demo/pdist/cvslock.py:def test():
Demo/rpc/mountclient.py:def test():
Demo/rpc/nfsclient.py:def test():
Demo/rpc/rnusersclient.py:def test():
Demo/rpc/rpc.py:def test():
Demo/scripts/markov.py:def test():
Demo/sockets/gopher.py:def test():
Demo/threads/Generator.py:def test():
Demo/threads/sync.py:def test():
Demo/turtle/tdemo_penrose.py:def test(l=200, n=4, fun=sun, startpos=(0,0), 
th=2):
 
I think the first step should be to run those from regrtest.  The next step 
would be to convert adhoc test functions into doctests or unit tests as 
appropriate.

Step zero, however, should be to decide which demos are worth keeping and which 
should be removed.

--
nosy: +belopolsky

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I fixed Dates.py.  See issue9151.

I also committed a minimal fix for Complex.py in r82524.

--
dependencies: +Demo/classes/Dates.py does not work in 3.x
nosy: +belopolsky

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



[issue8472] itertools.filterfalse() function missing

2010-07-04 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, applied the suggestion in r82548.

--
status: open - closed

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I fixed Rev.py in r82550, but I don't think it is worth keeping in the current 
form.  Maybe it can be replaced with a pure python reimplementation of 
builtins.reversed.

Note that slicing does not work for Rev:


 r = Rev([1,2,3])
 r[:]
Traceback (most recent call last):
  File stdin, line 1, in module
  File Demo/classes/Rev.py, line 69, in __getitem__
return self.forw[-(j + 1)]
TypeError: unsupported operand type(s) for +: 'slice' and 'int'

--

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Fixed Range.py in r82551.

--

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



[issue9141] Allow objects to decide if they can be collected by GC

2010-07-04 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

tp_del() is generally invoked by tp_dealloc().  See for example 
typeobject.c:849.  gc.collect() never invokes tp_del() directy, that is left 
for the objects themselves (as part of tp_dealloc())

Now, gc already knows that if tp_del is present, it cannot cause break the 
cycle, (for various technical reasons, one of them being that tp_del would be 
invoked with various dependency objects already nerfed by tp_clear()).

But this is not always enough:
1) it may be too pessimistic.  Sometimes the tp_del method doesn't do anything 
significant, or isn't even called, depending on runtime state, so it is safe 
for gc to clear the object (see for example genobject.c:30).
2) Sometimes finalization behaviour is not defined by a tp_del method at all, 
but rather some custom code in tp_dealloc.

All this patch does, is to generalize the mechanism already provided for 
genobject.c (by PyGen_NeedsFinalizing()), to any object: Any object can signal 
to gc that: a) it is ok to collect a cycle with me in it, or b) no, it is 
unsafe to do so.  With this patch in place, PyGen_NeedsFinalizing() no longer 
needs to be a special case in gcmodule.c.

Yes, I'll send a message to python-dev.

--

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



[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
stage: patch review - committed/rejected

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



[issue9151] Demo/classes/Dates.py does not work in 3.x

2010-07-04 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
resolution: accepted - fixed

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



[issue9141] Allow objects to decide if they can be collected by GC

2010-07-04 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 All this patch does, is to generalize the mechanism already provided
 for genobject.c (by PyGen_NeedsFinalizing()), to any object: Any
 object can signal to gc that: a) it is ok to collect a cycle with me
 in it, or b) no, it is unsafe to do so.  With this patch in place,
 PyGen_NeedsFinalizing() no longer needs to be a special case in
 gcmodule.c.

Adding an API function and an additional traversal pass to the GC just
for the sake of removing a special case doesn't seem reasonable to me.
That's why I'm asking what specific problem you are trying to solve.
(rather than simply trying to make things nicer)

--

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



[issue7962] Demo and Tools need to be tested and pruned

2010-07-04 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

I should note here that I fixed Demo/md5test/md5driver.py in r82351 (py3k) and 
r82352 (release31-maint).

--
nosy: +brian.curtin

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



[issue9118] help() on a property descriptor launches interactive help

2010-07-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

The doc says that help takes one optional arg:
No arg: interactive help system
String: interpret as name of something
Any other object: help page for that object
[by implication, multiple args: TypeError]

Not returning help for None is a bug, so I say yes, backport, including to 
2.6/7 if they have same bug. I think the OP's example, which turns on the fact 
that None is an object that can be attached to any target, and not just a name, 
illustrates the bugginess of the current behavior.

If NEWS includes a detailed list of bugfixes, then this could be included. If 
not, no.

--

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



[issue9153] Run tests and demos as part of the test suite

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Yep, my idea was to add a really thin regrtest integration layer for these 
self-tests (which have no reason to move to Lib/tests, really), e.g. add a 
tests.test_demos_tools module that would import all these test functions and 
stuff them into a unittest test suite.

I did not detail that in my report since I wanted first an agreement on the 
idea (i.e. a core dev setting resolution to accepted :)

--
type:  - feature request

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



[issue9130] Parser module fails on short relative imports

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Fixed in revisions r82543, r82546, r82552, r82553, r82554.

Leaving open because I'm suspicious that the parser module isn't handling 
relative imports with more than three dots correctly in py3k (since ... gets 
parsed as an ellipsis token).

--

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



[issue9130] Parser module fails on short relative imports

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Ellipsis token validation fixed in r82555 (py3k), r82556 (release31-maint).

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue9095] patchcheck should handle extraneous whitespace in .rst files

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Please apply the refactor patch in #8912

--
dependencies: +`make patchcheck` should check the whitespace of .c/.h files
versions: +Python 3.2

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



[issue8999] Add Mercurial support to patchcheck

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 [...] using a simple hg status of the working copy will not do the right 
 thing

I think all of these workflows share a step where you have edits in your 
working directory that are not in the working dir’s parent changeset. Thus, I 
argue that hg status is helpful in a majority of cases.

In the long term, it may be better to make patchcheck work on diffs rather than 
$vcs status (that will be an interesting challenge for me), or something else 
depending on the future dev policy. That is explicitly what I’m not doing here: 
I’m doing a straightforward patch to add support for Mercurial in a way that 
just mimics Subversion, doesn’t mandate one workflow, and doesn’t cost anything.

Now it’s up to you to commit this or set resolution to “later”, I won’t argue 
further or complain. :)

--

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



[issue9154] Parser module doesn't understand function annotations.

2010-07-04 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

Python 3.2a0 (py3k:82529M, Jul  4 2010, 17:35:10) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type help, copyright, credits or license for more information.
 import parser
[38213 refs]
 parser.sequence2st(parser.suite(def f(a:int) - int: pass).totuple())
Traceback (most recent call last):
  File stdin, line 1, in module
parser.ParserError: VALIDATION FAILURE: report this to the maintainer!
[38264 refs]

--
assignee: mark.dickinson
components: Extension Modules
messages: 109256
nosy: mark.dickinson
priority: normal
severity: normal
stage: unit test needed
status: open
title: Parser module doesn't understand function annotations.
type: behavior
versions: Python 3.1, Python 3.2

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



[issue9132] Documentation for comparing dictionaries is out of date

2010-07-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

On the 'patch' keyword: I thought the same as you (only for diff) until 
yesterday morning when Brett Cannon specifically told me that I should also set 
it for in-message text patches. This was in the context of him having not 
noticed for months (until I pinged him) that I had included a text patch in a 
message for an issue assigned to him, because he skims messages and looks for 
the keyword and other header changes. So until a 'higher' tracker authority 
tell me differently, I am following his direction. I am also highlighting the 
actual patch in the message to make it easy to find.


The current compare equal if and only if their sorted (key, value) lists 
compare equal. [4] was written when all objects were comparable and when dict 
== dict *was* written that way (according to [5]). The footnote was added to 
assure people that the new internal implementation was faster (ie, set 
comparison via hash lookup) than it once had been.

For a long time, that definition of dict equality has been invalid because it 
cannot be implemented that way; the definition is even more meaningless in 
Python3. So is footnote [4] saying that the meaningless definition is not the 
implementation. Both [4] and [5] are ancient fossils referring back to Python1. 

Without looking, I am confident that the actual implementation is O(1) if the 
dicts are unequal in size and an O(n) (key,value) set comparison if they are 
equal in size. My proposed revision is intended to imply that. Note that Python 
did not have sets when the sorted list definition was written. Also note that 
there is no footnote attached to set comparison (which once could have also 
been defined in terms of sorted lists).

Dicts are sets (of pairs), not unsorted lists (of pairs) and the current docs 
should reflect that.

The language def makes no guarantees about implementation efficiency.  In 13 
years of watching c.l.p/python-list, I have not seen any particular concern 
about dict comparison that would warrant special notice. Rather, people worry 
about the big-O behavior of building large lists and dicts of millions of 
items. The sometimes need persuading that construction is more efficient than 
they might imagine. That is about the only thing I can think of for which an 
efficiency note might be a good idea.


'Comparisons other than equality testing' include 'is' and 'in'. They work for 
dictionaries as expected, which is to say, as identify and containment testing, 
as for everything else. They do not raise TypeError. So the statement that 
implies that they do is not correct.


PATCH REVISION: The suggested Order comparision raise TypeError. has spelling 
and agreement errors in 'comparision' and should be Order comparisons raise 
TypeError.

--

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



[issue9096] importlib doesn't handle valid marshalled data with invalid semantics

2010-07-04 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

This was fixed in r82523.

--
resolution: accepted - fixed
status: open - closed

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



[issue9155] Reserve COMPARE_OP for RichComparisons

2010-07-04 Thread Demur Rumed

New submission from Demur Rumed junkm...@hotmail.com:

Currently, COMPARE_OP is burdened by a needless, and unorthogonal, extra layer 
of indirection. I've modified it to only handle the rich comparison case, 
moving the other five cases to BINARY_IN, BINARY_NOT_IN, BINARY_IS, 
BINARY_IS_NOT, and BINARY_EXC_MATCH

To consider is inlining the POP_JUMP_IF_FALSE POP_TOP which always follow 
BINARY_EXC_MATCH

--
components: Interpreter Core
files: cmpoppatch.diff
keywords: patch
messages: 109259
nosy: serprex
priority: normal
severity: normal
status: open
title: Reserve COMPARE_OP for RichComparisons
type: performance
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file17855/cmpoppatch.diff

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Demur Rumed

Changes by Demur Rumed junkm...@hotmail.com:


--
title: Reserve COMPARE_OP for RichComparisons - Reserve COMPARE_OP for rich 
comparisons

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



[issue9132] Documentation for comparing dictionaries is out of date

2010-07-04 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for the explanation of the patch keyword. Its description (click on 
“Keywords”) is indeed generic (“contains patch”), 
http://www.python.org/dev/patches/ should probably say it too.

I don’t have enough knowledge to make a useful comment on the rest of your 
reply. Other people most certainly will.

I think two of my remarks are not addressed by your reply:
- Is the term “order comparisons” used in the doc? If not, its
meaning is non-obvious, and I’d like to find something clearer.
- Testing with “is” is called identity testing, “in” is membership or 
containement testing. Where are they called “comparisons”?

--

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Any chance you could regenerate the patch without all the unnecessary 
whitespace changes?  It's kinda hard to read right now.

--
nosy: +mark.dickinson

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
nosy: +belopolsky

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Demur Rumed

Changes by Demur Rumed junkm...@hotmail.com:


Added file: http://bugs.python.org/file17856/cmpoppatch2.diff

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



[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

I am attaching a rough patch which removes timedelta - int minutes - 
timedelta round trips from utcoffset handling code.  I think the result is an 
improvement, but needs more polishing.

Mark,

Do you think this is worth pursuing?  I am not intending to add support for 
sub-minute offsets yet, just pass offsets around as timedeltas internally 
without unnecessary conversions to int and back.

--
keywords:  -easy, patch
nosy: +mark.dickinson
Added file: http://bugs.python.org/file17857/issue5288.diff

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



[issue834840] Unhelpful error message from cgi module

2010-07-04 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Could a CGI expert pick this up, failing that why not simply close it as opened 
nearely 7 years ago.

--
nosy: +BreamoreBoy

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



[issue4727] pickle/copyreg doesn't support keyword only arguments in __new__

2010-07-04 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

http://bugs.python.org/issue1398 has already been fixed and closed.
http://bugs.python.org/issue4331 is still open and has seen activity as 
recently as 2010-02-23, so can this be closed or must it remain open?

--
nosy: +BreamoreBoy

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



[issue4727] pickle/copyreg doesn't support keyword only arguments in __new__

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

Please keep this open.  This issue is separate from pickling partial objects.

--
nosy: +belopolsky

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



[issue4727] pickle/copyreg doesn't support keyword only arguments in __new__

2010-07-04 Thread Alexander Belopolsky

Changes by Alexander Belopolsky belopol...@users.sourceforge.net:


--
stage:  - needs patch
versions: +Python 3.2 -Python 2.7, Python 3.1

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



[issue4679] Fork + shelve causes shelve corruption and backtrace

2010-07-04 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Hi Alex,

Looks like nothing will happen with this unless you do something yourself.

--
nosy: +BreamoreBoy

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



[issue2830] Copy cgi.escape() to html

2010-07-04 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

I'm guessing that this has simply slipped under the radar.

--
nosy: +BreamoreBoy

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



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-07-04 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Committed in r82567. I also cleaned up the output slightly so that N file(s) 
pluralizes file properly based on N. Also now list what files have their 
whitespace fixed.

--

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



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-07-04 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
status: open - closed

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



[issue4679] Fork + shelve causes shelve corruption and backtrace

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

The wikisource file in the report is no longer available, but with latest 
wikisource and python 2.7,


$ curl 
http://download.wikimedia.org/enwikisource/latest/enwikisource-latest-pages-articles.xml.bz2|
 bzip2 -cd | ./python.exe convert.py /tmp 8388608

went through first 50MiB without an error.   I am not sure I'll have the 
patience to run this to completion, but it looks like this is out of date.

--
nosy: +belopolsky
resolution:  - out of date
stage:  - unit test needed
status: open - pending

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



[issue3461] smtplib does not fully support IPv6 in EHLO

2010-07-04 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

I intended testing this but the patch file appears to have a dangling else at 
the bottom, or am I missing something?

--
nosy: +BreamoreBoy

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



[issue4968] Clarify inspect.iscallable method docs

2010-07-04 Thread Mark Lawrence

Mark Lawrence breamore...@yahoo.co.uk added the comment:

Has this issue simply slipped under the radar?

--
nosy: +BreamoreBoy

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



[issue2830] Copy cgi.escape() to html

2010-07-04 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Yep since it is not a critical change. If someone came up with a patch to move 
the code and docs over, make cgi.escape use the moved code, and add a 
PendingDeprecationWarning then it would get done.

--
keywords: +easy
priority: normal - low

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



[issue2830] Copy cgi.escape() to html

2010-07-04 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
versions: +Python 3.2 -Python 2.6, Python 3.0

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



[issue5023] Segfault in datetime.time.strftime(%z)

2010-07-04 Thread Eric Wald

Eric Wald pythoni...@brainshell.org added the comment:

Reproduced again in version 2.7rc2; I had thought that it went away, but it 
turns out that --with-pydebug hides the problem.

Compiling GDB now.

--
status: pending - open
versions: +Python 2.7

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



[issue9132] Documentation for comparing dictionaries is out of date

2010-07-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I intentionally began my first post with The RefMan section is 5.9. 
Comparisons. Look there, particularly the definition of comp_operator.

In this context, I think 'order comparison' is pretty clearly a comparison with 
an order operator, '' and ''. But fine with me if the editor want to list 
them explicitly.

POSSIBLE PATCH ADDITION: ('', '=', '', '=')

--

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



[issue7829] dis module documentation gives no indication of the dangers of bytecode inspection

2010-07-04 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I believe Brett meant to leave this open until he finished it by backporting to 
2.7 (which is now reopened for patches). Otherwise, it might get forgotten.

Sidenote: this is the issue I referred to in #9132 re the 'patch' keyword.

--
status: closed - open

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



[issue7829] dis module documentation gives no indication of the dangers of bytecode inspection

2010-07-04 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

On Sun, Jul 4, 2010 at 17:01, Terry J. Reedy rep...@bugs.python.org wrote:

 I believe Brett meant to leave this open until he finished it by backporting 
 to 2.7 (which is now reopened for patches). Otherwise, it might get forgotten.

Exactly right, Terry.

--

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Demur Rumed

Demur Rumed junkm...@hotmail.com added the comment:

I've attached the original patch without whitespace, and am also including 
modifications to this portion of the interpreter which remove ROT_FOUR, 
DUP_TOPX while adding ROT_THREE_TWO, DUP_TOP_TWO, DUP_ROT_THREE. I've seen a 5% 
speed increase with timeit.Timer(a[0]+=0,a=[0])

Also modified the optimizer to reject code with a size over 32767 instead of 
32760. That's most likely a useless modification which may be preferred ignored

--
Added file: http://bugs.python.org/file17858/cmpoprotdup.diff

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Demur Rumed

Demur Rumed junkm...@hotmail.com added the comment:

I've attached the original patch without whitespace, and am also including 
modifications to this portion of the interpreter which remove ROT_FOUR, 
DUP_TOPX while adding ROT_THREE_TWO, DUP_TOP_TWO, DUP_ROT_THREE. I've seen a 4% 
speed increase with timeit.Timer(a[0]+=0,a=[0])

Also modified the optimizer to reject code with a size over 32767 instead of 
32760. That's most likely a useless modification which may be preferred ignored

--
Added file: http://bugs.python.org/file17859/cmpoprotdup.diff

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Demur Rumed

Changes by Demur Rumed junkm...@hotmail.com:


Removed file: http://bugs.python.org/file17859/cmpoprotdup.diff

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



[issue9156] socket._fileobject: read raises AttributeError when closed in another thread

2010-07-04 Thread Mathias Panzenböck

New submission from Mathias Panzenböck grosser.meister.mo...@gmx.net:

When you open a socket._fileobject through sock.makefile('rb') or similar and 
you read blocking in one thread and close the file object from another thread 
the reading thread gets an AttributeError. This is because the close method 
sets the underlying fileobject._sock member to None and the read/readline/... 
methods call recv on this member without checking if its None. I think the 
_sock member should not be set to None at all but a flag should be set that 
this file object is closed.

For the time being I use the bugfix I attached and therefore do not call 
sock.makefile('rb') but FileObject(sock, 'rb'). FileObject is a subtype of 
socket._fileobject that overrides the close method and closed property.

I don't know if this bug persists in 2.7 or 3.x. I still use Fedora 12 and that 
comes with Python 2.6.2.

--
components: Library (Lib)
files: FileObject.py
messages: 109281
nosy: panzi
priority: normal
severity: normal
status: open
title: socket._fileobject: read raises AttributeError when closed in another 
thread
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file17860/FileObject.py

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Demur Rumed

Demur Rumed junkm...@hotmail.com added the comment:

Fixed regression in ROT_THREE_TWO and a missed DUP_TOP2 - DUP_TOP_TWO. Now 
there are only the odd segfaults

--
Added file: http://bugs.python.org/file17861/cmpoprotdup2.diff

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



[issue9157] Allow inspection of used decorators on a function

2010-07-04 Thread Mitar

New submission from Mitar mmi...@gmail.com:

Sometimes it is useful to be able to check which decorators are already applied 
to a function, especially when you are constructing them dynamically. I am 
proposing that for all decorators in Python would be suggested that they 
maintain a list of used decorators on a function. It is most useful when all 
decorators do this.

It is the same reasoning why `inspect` module is in Python - to be able to 
inspect Python structures, to have this possibility. If you do not want it then 
you do can use Python structures as they were given to you. But you have an 
option to inspect them.

And I would like the same to see from decorators. It is not really so important 
that all decorators update this. If they would not then they would be hidden 
from inspection. But if developer wants to use inspection then he would choose 
such decorators which use this (or change them in this way). If all default 
Python's decorators would already be such it would be much easier to use them.

This could be implement by changing `wraps` function to pass over also the (for 
example) `__DECORATORS__` attribute of a function to a wrapped function and add 
this new decorator to a list, `__DECORATORS__`.

By default in a list ids of decorators would be maintained, but this could be 
overridden by `id` attribute of `wraps` function so that decorator can 
represent itself in some special way, for example as a tuple of its id and some 
significant parameters.

--
messages: 109283
nosy: mitar
priority: normal
severity: normal
status: open
title: Allow inspection of used decorators on a function
type: feature request

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



[issue9136] RuntimeError when profiling Decimal

2010-07-04 Thread Alexander Belopolsky

Alexander Belopolsky belopol...@users.sourceforge.net added the comment:

+try:
+dc = DefaultContext
+except NameError:
+pass
+
+self.prec = dc.prec if prec is None else prec

I don't quite understand the point of catching NameError here, but it looks 
like if it is caught, it will just be raised by the next line because dc will 
not be set.

Also, I am not sure ternary expressions are a big readability win here, but if 
you want to keep them, consider 

self.prec = prec if prec is not None else dc.prec

--
nosy: +belopolsky

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



[issue9158] PyArg_ParseTuple y* documentation is incorrect

2010-07-04 Thread Terrence Cole

New submission from Terrence Cole terre...@zettabytestorage.com:

The documented C type for y* should be [Py_buffer], not [Py_buffer *], as with 
the documentation for z* and the convention followed by the other types.

I'm not sure what 'type' this issue should have.  I've set it at 'crash' 
initially, since that's how the bug manifested for me.

--
assignee: d...@python
components: Documentation
files: PyArgs_ParseTuple_ystar_doc_fix.patch
keywords: patch
messages: 109285
nosy: d...@python, terrence
priority: normal
severity: normal
status: open
title: PyArg_ParseTuple y* documentation is incorrect
type: crash
versions: Python 3.2
Added file: 
http://bugs.python.org/file17862/PyArgs_ParseTuple_ystar_doc_fix.patch

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



[issue9158] PyArg_ParseTuple y* documentation is incorrect

2010-07-04 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +haypo
stage:  - patch review
type: crash - feature request

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



[issue7989] Add pure Python implementation of datetime module to CPython

2010-07-04 Thread Tim Peters

Tim Peters tim.pet...@gmail.com added the comment:

 ...
 Another is tzinfo attribute of time. With time t,
 t.utcoffset() is kid of useless given that you
 cannot subtract it from t

Sure you can - but you have to write your code to do time arithmetic.  The time 
implementation does so under the covers when two aware time objects are 
compared:

If both [time] comparands are aware and have
different tzinfo members, the comparands are
first adjusted by subtracting their UTC
offsets (obtained from self.utcoffset()).


 and unless tzinfo is a fixed offset timezone, there
 is not enough information in t to compute the offset
 to begin with.

The docs _suggest_ that tzinfo.utcoffset(x, None) return the standard UTC 
offset, but in the end it's up to the tzinfo subclass designer to decide what 
they want an aware time object to return as an offset.

 Do you have any historical insight on this one?

History has nothing to do with it ;-)  There are several uses spelled out in 
the docs.  In addition to aware time comparison (mentioned above):

- Maintaining the datetime invariant

d == datetime.combine(d.date(), d.timetz())

requires that an aware datetime's tzinfo member be attached to at least one 
of the date and time projections, and since raw dates are always naive, that 
leaves the time projection as the only choice.

- Various string format operations use an aware time object's tzinfo member 
to incorporate time zone information - at least time.isoformat() and 
time.strftime().

That said, would have been fine by me if the naive versus aware distinction 
had been limited to datetime objects (i.e., if plain date and plain time 
objects had no notion of time zone).  If you need to know why time objects 
really support being aware, you'll have to ask Guido ;-)

--

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



[issue9155] Reserve COMPARE_OP for rich comparisons

2010-07-04 Thread Raymond Hettinger

Changes by Raymond Hettinger rhettin...@users.sourceforge.net:


--
assignee:  - rhettinger
nosy: +rhettinger

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



[issue9159] asyncore.file_wrapper does not register its fd to socket_map

2010-07-04 Thread kimhyunkang

New submission from kimhyunkang kimhyunk...@gmail.com:

In current stable python 2.6, the test code below does nothing, which is 
inconsistent with other default dispatcher's behavior.



import asyncore

class test_reader(asyncore.file_wrapper)
  def writable(self):
return False

  def handle_read(self):
print self.recv(4096)

f = open('test.dat', 'r')
reader = test_reader(f.fileno())

asyncore.loop()

--
components: Library (Lib)
messages: 109287
nosy: kimhyunkang
priority: normal
severity: normal
status: open
title: asyncore.file_wrapper does not register its fd to socket_map
type: behavior
versions: Python 2.6

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



[issue3461] smtplib does not fully support IPv6 in EHLO

2010-07-04 Thread Derek Morr

Derek Morr derekm...@psu.edu added the comment:

You're right. My mistake when I made the patch. I've attached a new one without 
the trailing else

--
Added file: http://bugs.python.org/file17863/smtplib.patch

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



[issue9160] Documentation link of 3.2 not working at docs.python.org

2010-07-04 Thread Eli Bendersky

New submission from Eli Bendersky eli...@gmail.com:

This link: http://docs.python.org/dev/py3k/

Isn't working. I have always used it to see the latest documentation from 3.2, 
and it is linked in the left-hand side of the screen on docs.python.org as 
Python 3.2 (in development) under Docs for other versions if you're, for 
example here: http://docs.python.org/py3k/

--
assignee: d...@python
components: Documentation
messages: 109289
nosy: d...@python, eliben
priority: normal
severity: normal
status: open
title: Documentation link of 3.2 not working at docs.python.org
versions: Python 3.2

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



[issue9160] Documentation link of 3.2 not working at docs.python.org

2010-07-04 Thread Eli Bendersky

Changes by Eli Bendersky eli...@gmail.com:


--
type:  - behavior

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



[issue9158] PyArg_ParseTuple y* documentation is incorrect

2010-07-04 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

y* and z* result is a Py_buffer, but in C you have to pass a reference to the 
result variable using result. Full example:

static PyObject *
getargs_y_star(PyObject *self, PyObject *args)
{
Py_buffer buffer;
PyObject *bytes;
if (!PyArg_ParseTuple(args, y*, buffer))
return NULL;
bytes = PyBytes_FromStringAndSize(buffer.buf, buffer.len);
PyBuffer_Release(buffer);
return bytes;
}

Another example: s format result is char* (and not char**). You also have to 
pass a reference using :

static PyObject *
getargs_s(PyObject *self, PyObject *args)
{
char *str;
if (!PyArg_ParseTuple(args, s, str))
return NULL;
return PyBytes_FromString(str);
}

--
resolution:  - invalid
status: open - closed

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



  1   2   >