[issue17292] Autonumbering in string.Formatter doesn't work

2013-02-25 Thread Eric V. Smith

Eric V. Smith added the comment:

This is a duplicate of issue 13598. I'll add you to nosy over there.

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

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



[issue13598] string.Formatter doesn't support empty curly braces {}

2013-02-25 Thread Eric V. Smith

Changes by Eric V. Smith e...@trueblade.com:


--
nosy: +binkert

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



[issue17197] c/profile refactoring

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 422169310b7c by Giampaolo Rodola' in branch 'default':
Fix #17197: profile/cProfile modules refactored so that code of run() and 
runctx() utility functions is not duplicated in both modules.
http://hg.python.org/cpython/rev/422169310b7c

--
nosy: +python-dev

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



[issue17197] c/profile refactoring

2013-02-25 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
assignee:  - giampaolo.rodola
resolution:  - fixed
status: open - closed

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



[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which converts all etree doctests to unittests.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch - patch review
Added file: http://bugs.python.org/file29230/test_xml_etree.patch

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



[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d707e3345a74 by Serhiy Storchaka in branch '2.7':
Issue #1470548: Do not buffer XMLGenerator output.
http://hg.python.org/cpython/rev/d707e3345a74

--

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



[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1c03e499cdc2 by Serhiy Storchaka in branch '3.2':
Issue #1470548: Add test for fragment producing with XMLGenerator.
http://hg.python.org/cpython/rev/1c03e499cdc2

New changeset 5a4b3094903f by Serhiy Storchaka in branch '3.3':
Issue #1470548: Add test for fragment producing with XMLGenerator.
http://hg.python.org/cpython/rev/5a4b3094903f

New changeset 810d70fb17a2 by Serhiy Storchaka in branch 'default':
Issue #1470548: Add test for fragment producing with XMLGenerator.
http://hg.python.org/cpython/rev/810d70fb17a2

--

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



[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2013-02-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

There is an error in my patch (already fixed in pdb-clone) and in Jyrki's patch.
Running Jyrki's patch on quit.py produces the following output where the line
number in the last entry of the backtrace is incorrect (should be line 9 instead
of line 7):

$ python quit.py
--Return--
 /tmp/quit.py(4)bar()-None
- pdb.Pdb().set_trace()
(Pdb) quit
Traceback (most recent call last):
  File quit.py, line 11, in module
foo()
  File quit.py, line 7, in foo
bar()
ZeroDivisionError: integer division or modulo by zero

This problem does not occur when issue 17277 is fixed.
Meanwhile the attached patch, based on Jyrki's patch and based on the 2.7
branch, fixes this.

--
Added file: http://bugs.python.org/file29231/quit.py

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



[issue16446] pdb raises BdbQuit on 'quit' when started with set_trace

2013-02-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The patch changes the semantics of the quit command: quit behaves like the gdb
detach command when pdb is started with set_trace.

--
Added file: http://bugs.python.org/file29232/branch-27.patch

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



[issue17294] compile-flag for single-execution to return value instead of printing it

2013-02-25 Thread Albert Zeyer

New submission from Albert Zeyer:

`compile(s, interactive, single)` would generate a code object which 
prints the value of the evaluated string if that is an expression. This is what 
you would normally want in a REPL.

Instead of printing the value, it might make more sense to return it and to 
leave it to the developer - there are many cases where it shouldn't end up on 
stdout but somewhere else.

There could be an additional compile-flag which would make a code-object 
returning the value instead of printing it.

Note that I have come up with a workaround:

def interactive_py_compile(source, filename=interactive):
c = compile(source, filename, single)

# we expect this at the end:
#   PRINT_EXPR 
#   LOAD_CONST
#   RETURN_VALUE
import dis
if ord(c.co_code[-5]) != dis.opmap[PRINT_EXPR]:
return c
assert ord(c.co_code[-4]) == dis.opmap[LOAD_CONST]
assert ord(c.co_code[-1]) == dis.opmap[RETURN_VALUE]

code = c.co_code[:-5]
code += chr(dis.opmap[RETURN_VALUE])

CodeArgs = [
argcount, nlocals, stacksize, flags, code,
consts, names, varnames, filename, name,
firstlineno, lnotab, freevars, cellvars]
c_dict = dict([(arg, getattr(c, co_ + arg)) for arg in CodeArgs])
c_dict[code] = code

import types
c = types.CodeType(*[c_dict[arg] for arg in CodeArgs])
return c


My related StackOverflow question:
http://stackoverflow.com/questions/15059372/python-use-of-eval-in-interactive-terminal-how-to-get-return-value-what-compi

--
components: Interpreter Core
messages: 182934
nosy: Albert.Zeyer
priority: normal
severity: normal
status: open
title: compile-flag for single-execution to return value instead of printing it
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue17263] crash when tp_dealloc allows other threads

2013-02-25 Thread Albert Zeyer

Albert Zeyer added the comment:

The symbols are there because it is a library which exports all the symbols. 
Other debugging information are not there and I don't know any place where I 
can get them.

It currently cannot work on Linux in the same way because the GUI is Cocoa only 
right now. I'm trying to get it to run with another Python on Mac, though.

Note that in threadmodule.c, in local_clear, we are iterating through all 
threads:

/* Remove all strong references to dummies from the thread states */
if (self-key
 (tstate = PyThreadState_Get())
 tstate-interp) {
for(tstate = PyInterpreterState_ThreadHead(tstate-interp);
tstate;
tstate = PyThreadState_Next(tstate))
if (tstate-dict 
PyDict_GetItem(tstate-dict, self-key))
PyDict_DelItem(tstate-dict, self-key);
}

In PyDict_DelItem, if the GIL is released and meanwhile, the list of 
threadstates is altered, is that a problem for this loop? So maybe tstate 
becomes invalid there.

I also noticed this part in another backtrace of the same crash:

Thread 2:
0   libsystem_kernel.dylib  0x7fff8a54e0fa __psynch_cvwait + 10
1   libsystem_c.dylib   0x7fff85daaf89 _pthread_cond_wait + 869
2   org.python.python   0x00010006f54e PyThread_acquire_lock + 
96
3   org.python.python   0x00010001d8e3 PyEval_RestoreThread + 61
4   org.python.python   0x000100053351 PyGILState_Ensure + 93
5   _objc.so0x000103b89b6e 0x103b8 + 39790
6   libobjc.A.dylib 0x7fff880c6230 (anonymous 
namespace)::AutoreleasePoolPage::pop(void*) + 464
7   libobjc.A.dylib 0x7fff880c85a2 (anonymous 
namespace)::AutoreleasePoolPage::tls_dealloc(void*) + 42
8   libsystem_c.dylib   0x7fff85dad4fe _pthread_tsd_cleanup + 
240
9   libsystem_c.dylib   0x7fff85da69a2 _pthread_exit + 146
10  libsystem_c.dylib   0x7fff85da674d _pthread_start + 338
11  libsystem_c.dylib   0x7fff85d93181 thread_start + 13


This seems to be a non-Python thread, so PyGILState_Ensure would have created a 
new threadstate and this would have altered the list.

--

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2528e4aea338 by Serhiy Storchaka in branch 'default':
Issue #17220: Little cleanup of _bootstrap.py.
http://hg.python.org/cpython/rev/2528e4aea338

--
nosy: +python-dev

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



[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Eli Bendersky

Eli Bendersky added the comment:

Serhiy, thanks for working on this! I didn't read the whole patch yet - will 
tinker with it a bit more when applying. Did you prepare the patch vs. 3.3 or 
default? The two are still synced and I'd be happy to apply it to both branches.

Now, the real reason I wanted to get rid of doctests is to make the global 
environment clean in test_xml_etree. The next logical step is to make all test 
classes in test_xml_etree accept the ET module in some way and store it, using 
it to get classes  function. I.e. no more global ET and pyET at all. Would 
you like to add this to your patch?

--

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-25 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue12915] Add inspect.locate and inspect.resolve

2013-02-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Something to consider with these functions: it is probably desirable to also 
support the popular alternate notation which uses an explicit : to separate 
the module name from the reference within the module.

For example, setuptools entry points and nose test references both use that 
format.

The alternate notation should be fairly easy to both detect and handle through 
name.partition(':')

--
nosy: +ncoghlan

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Advice: anything that's not a photo should be PNG.
Temporary fix is to change the cursor see [0]
^0 http://effbot.org/zone/tkinter-busy.htm

--
nosy: +Ramchandra Apte

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



[issue11367] xml.etree.ElementTree.find(all): docs are wrong

2013-02-25 Thread Eli Bendersky

Eli Bendersky added the comment:

Henrik, there's no need to provide more information in 3.2 and 2.7 than in 3.3 
and default. Could you just align your patches with those (i.e. same wording in 
the documentation)?

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

Well actually it IS a photo, so I think it can remain .jpg (because on print 
screen there is no cursor). Thanks for the temporary solution, altough I'm not 
sure if pyside/pygame etc will allow me to change busy cursor too.

Is there any chance for this to be fully fixed? It is a regression as it isn't 
present in previous releases, my bet is new windows launcher which does some 
work in the background.

--

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



[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This patch is for default branch. It applied to 3.3 too.

 The next logical step is to make all test classes in test_xml_etree accept 
 the ET module in some way and store it, using it to get classes  function. 
 I.e. no more global ET and pyET at all. Would you like to add this to 
 your patch?

I was going to do this on the next step, but if you prefer I can prepare a 
single patch. But it seems to me that more simple patches are easier to review.

--

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



[issue4331] Can't use _functools.partial() created function as method

2013-02-25 Thread Ulrich Eckhardt

Ulrich Eckhardt added the comment:

There is at least one thing that is missing in the patch, it lacks the 
necessary tests. The partialbug.py demonstrates the issue, it could be used as 
a base. However, even then, there is still one thing that is problematic: The 
fact that partial() returns something that behaves like a static method is 
documented and changing that is not backward compatible.

I still think that something like this should become part of Python though. 
Jack Diederich argues that you can use lambda to achieve the same, but that is 
not always true. If you want to bind an argument to the current value of a 
variable instead of a constant, lambda fails. You need the closure created by a 
function call to bind those variables inside a local function. Having a 
dedicated function for that is IMHO preferable to people copying the 
Python-only equivalent of partial() to achieve the same effect or even 
inventing their own.

--

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



[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Eli Bendersky

Eli Bendersky added the comment:

No problems. You can go ahead and commit this patch to 3.3 and default, then. I 
will review it post-commit, since I wanted to tweak some things around anyway.

--

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



[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Eli Bendersky

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


--
versions: +Python 3.3

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

The issue is NOT present in python 3.2. I'm not expert, but given that it work 
in 3.2 and works in 3.3 using direct pythonw command, I'm almost sure it's 
new windows launcher. Even if I'm wrong, you guys can be sure that the issue 
appeared in 3.3 so there are only few possibilities.

--

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



[issue4331] Can't use _functools.partial() created function as method

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

See also issue 11470.

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden

Tim Golden added the comment:

netrick: can you confirm that the same thing occurs when you explicitly
run your code via the pyw command. ie when you do this:

  pyw myprog.pyw

Also, what happens when you run:

  py myprog.pyw

ie when you use the Console launcher to launch the .pyw?

--

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



[issue15083] Rewrite ElementTree tests in a cleaner and safer way

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset af570205b978 by Serhiy Storchaka in branch '3.3':
Issue #15083: Convert ElementTree doctests to unittests.
http://hg.python.org/cpython/rev/af570205b978

New changeset 5eefc85b8be8 by Serhiy Storchaka in branch 'default':
Issue #15083: Convert ElementTree doctests to unittests.
http://hg.python.org/cpython/rev/5eefc85b8be8

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden

Tim Golden added the comment:

I can't reproduce this running Python 3.3 on Win7. I'll try WinXP later.
I'll also add Mark Hammond  Vinay as they implemented the PEP397 loader.

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden

Changes by Tim Golden m...@timgolden.me.uk:


--
nosy: +mhammond, vinay.sajip

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



[issue16986] ElementTree incorrectly parses strings with declared encoding not UTF-8

2013-02-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for C implementation. Python implementation was fixed in 
issue17089.

--
dependencies: +Expat parser parses strings only when XML encoding is UTF-8 
-Parameter type error for xml.sax.parseString(string, ...)
keywords: +patch
Added file: http://bugs.python.org/file29233/etree_parse_str.patch

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

My OS is Windows XP so it may be only XP related. So, python 3.3 and my testing:

1) pythonw app.pyw - no bug
2) python app.pyw - no bug
3) pyw app.pyw - no bug
4) py app.pyw - no bug
5) double click on app.pyw - BUG

Tested on 2 different computers with exactly the same results. Both windows xp. 
Now I'm a little bit lost as running directly pyw app.pyw doesn't cause the 
bug.

However I read that the launcher assigns .pyw files in windows to some .bat 
script instead of pure pyw.exe. How can we check it? We need to dig into what 
exactly is started when .pyw script is run through double click.

--

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



[issue10572] Move test sub-packages to Lib/test

2013-02-25 Thread Éric Araujo

Éric Araujo added the comment:

Mercurial’s diff formats are actually able to represent file creation, deletion 
and rename.

--

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



[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-25 Thread Éric Araujo

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


--
resolution:  - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder:  - Add a profile decorator to profile and cProfile

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



[issue9285] Add a profile decorator to profile and cProfile

2013-02-25 Thread Éric Araujo

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


--
nosy: +bjorns

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



[issue9285] Add a profile decorator to profile and cProfile

2013-02-25 Thread Éric Araujo

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


--
versions: +Python 3.4 -Python 3.3

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden

Tim Golden added the comment:

Things may be a little more complicated, because one of two distinct
mechanisms may be invoked to determine what to run when double-clicking:
an Explorer-based mechanism, and a non-Explorer one.
AFAICT, the former falls back to the latter.

To check the latter, the command-line you used earlier:

  assoc .pyw # - Python.NoConFile

  ftype Python.NoConFile # - whatever path

To check the former, there's a registry key which escapes me at
the moment but wouldn't be too hard to find. Obviously there's
no reason why either should cause a delay, unless you've previously
done something obscure like associate .pyw files with a network-based
copy of Python or something.

To see the non-Explorer association in action, open a command
shell in the appropriate directory, and just start the program
with: app.pyw (ie without specifying a program).

--

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



[issue10572] Move test sub-packages to Lib/test

2013-02-25 Thread Geoff Wilson

Geoff Wilson added the comment:

Odd. I must be doing something wrong. My test workflow was:
1. hg mv a b
1a. modify files to resolve issues from the move
2. hg diff  issue.patch # attached
3. hg revert --all
4. patch -p1  issue.patch

Reading the hg docs more, I should have used 'hg patch issue.patch'. 
However trying that on a trivial file move, results in a delete/create still.

--

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



[issue17277] incorrect line numbers in backtrace after removing a trace function

2013-02-25 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The traced_frame.patch fixes also issue 7238 and issue 16482.

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

So:
1) assoc .pyw # - Python.NoConFile gives an error that it can't find 
association for .pyw extension
2) opening terminal in proper directory and typing just app.pyw gives error 
that this is not known command

I did small test. Using normal (from explorer) open with + always use this 
program to open this file, firstly I associated .pyw to pythonw.exe - there is 
no bug when double clicking.

Then, I changed it to pyw.exe and the bug reappeared when double clicking.

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

I can use assoc command for .py extension but I can't for .pyw. Maybe that's 
some clue...

The strange thing is that explicit pyw.exe app.pyw gives no bug, and 
associating .pyw files to pyw.exe gives the bug when double clicking. 
Honestly I have no idea what's going on.

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

And remember that on the exactly the same computers when I uninstalled python 
3.3 and installed python 3.2, everything works flawlessy (because python 3.2 
sets .pyw files to open through pythonw.exe).

--

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



[issue11470] Flag inappropriate uses of callable class attributes

2013-02-25 Thread Ulrich Eckhardt

Changes by Ulrich Eckhardt ulrich.eckha...@dominolaser.com:


--
nosy: +eckhardt

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



[issue17295] __slots__ on PyVarObject subclass

2013-02-25 Thread Ronald Oussoren

New submission from Ronald Oussoren:

Currently a subclass of a PyVarObject (such as 'int') cannot use a non-empty 
slots, for example:

 class L (int):
...__slots__ = ('a', 'b')
... 
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: nonempty __slots__ not supported for subtype of 'int'
 

However, subclasses that don't use __slots__ do have an implicit slot: the 
__dict__ value. Wouldn't it be possible to use the trick used for tp_dictoffset 
for slots as well, that is use negative values for the slot offsets and access 
them from the end of the object?

The major problem with an implementation is that PyMember_GetOne has a 'char*' 
argument instead of a 'PyObject*' one, but that's easily changed 
(PyMember_GetOne is currently only called in Object/descrobject.c and that call 
casts PyObject* to char*.  This would be an API change, but AFAIK 
PyMember_GetOne is not documented at the moment (and changing the argument type 
would be binary compatible).

I hope to work on a patch in the near future.

--
components: Interpreter Core
messages: 182959
nosy: ronaldoussoren
priority: low
severity: normal
stage: needs patch
status: open
title: __slots__ on PyVarObject subclass
versions: Python 3.4

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread Andreas Hausmann

New submission from Andreas Hausmann:

When pickling/unpickling a class that derives from the builtin class Exception, 
unpickling results in a

TypeError: ('__init__() takes at least 2 arguments (1 given)', class 
'__main__.TestException', ())

A standard exception like ValueError can be pickled/unpickled without any 
problem.

This was observed for versions 2.7.3 and 3.2.3. for both pickle and cPickle.

A script (cpickle) that shows that behavior is included.

This is related (but I do not quite understand how) to the closed Issue1692335.

--
components: Interpreter Core
files: bug_cpickle.py
messages: 182960
nosy: Andreas.Hausmann, alexandre.vassalotti, belopolsky, benjamin.peterson, 
bpb, brett.cannon, ehuss, facundobatista, fmitha, georg.brandl, gvanrossum, 
haypo, jafo, jarpa, jason.coombs, kylev, loewis, lukasz.langa, nnorwitz, 
pitrou, python-dev, sbt, taleinat, tseaver, zbysz, zseil
priority: normal
severity: normal
status: open
title: Cannot unpickle classes derived from 'Exception'
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file29234/bug_cpickle.py

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

That issue was only fixed in 3.3.  Does your code work in 3.3?

--
nosy: +r.david.murray

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread Andreas Hausmann

Andreas Hausmann added the comment:

I have not tried in 3.3. I have no running installation of 3.3.

I need a solution for 2.7 for a Zope project that was just ported to 2.7. My 
test for Python3 was halfheartedly on my standard Python3 installation (3.2) 
after reading Issue1692335.

--

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

The reason I ask is because that issue ends with reopen if you think this 
should be backported, so a backport is at least within the real of possibility 
:)

--

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



[issue17296] Cannot unpickle classes derived from 'Exception'

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

I modified your script to run under both python2 and python3.  I get the error 
for 2.5, 2.6, and 2.7.  The script produces the same output (without the 
EXCEPTION ## EXCEPTION) under 2.4 and 3.3.

--
Added file: http://bugs.python.org/file29235/bug_cpickle.py

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



[issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it

2013-02-25 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue16482] pdb.set_trace() clobbering traceback on error

2013-02-25 Thread Jesús Cea Avión

Changes by Jesús Cea Avión j...@jcea.es:


--
nosy: +jcea

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Tim Golden

Tim Golden added the comment:

I can't reproduce this on XP either. I've tried various combinations of 
.py / .pyw, command line, double-click, etc. and I've not had a single 
problem.

Let's hope someone else can suggest something

--

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



[issue17297] Issue with return in recursive functions

2013-02-25 Thread Luis López Lázaro

New submission from Luis López Lázaro:

Sorry if I am raising something naive as perhaps I am doing something wrong as 
I am both an amateur programmer and a newcomer to Python, but version 3.3 
appears to have an issue with the return statement in the setting of recursive 
functions.

When implementing a fruitful recursive function in Python 3.3 (specifically 
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit 
(AMD64)] on win32) which depends on conditionals it only returns the result 
value if the conditions are met in the first iteration.

I am attaching a file in which I have implemented the Euclidean algorithm in 2 
slightly different ways. The print statements produce the expected results (for 
instance with 1000,75) and a print statement placed in the if loop where the 
return statement is shows the indicator sentence but no value is returned by 
the function. I have also copied an implementation obtained from a website 
(function Euclid_LP; obtained from the wiki Literate Programs, 
http://en.literateprograms.org/Euclidean_algorithm_%28Python%29) and it does 
not work either.

For the tests, initially I run the program with F5 and invoked the functions 
from the Python shell. Later I have added a main part of the program prompting 
for the numbers and calling the functions to later display the results, with no 
change in the outcome

--
components: Regular Expressions
files: Chapter 6 MCD Euclidean.py
messages: 182966
nosy: ezio.melotti, luislopezlazaro, mrabarnett
priority: normal
severity: normal
status: open
title: Issue with return in recursive functions
versions: Python 3.3
Added file: http://bugs.python.org/file29236/Chapter 6 MCD Euclidean.py

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-25 Thread STINNER Victor

STINNER Victor added the comment:

If the problem is that PyUnicode_FromUnicode() rejects character outside range 
[U+; U+10], it would be better to use the byte string '\xff' * 
sizeof_PY_UNICODE. U+66647361 may become valid in a future version of Unicode, 
I don't thing that U+ would become valid.

sizeof_PY_UNICODE is ctypes.sizeof(ctypes.c_wchar) since Python 3.3. '\xff' * 4 
works on any platform.

--

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



[issue17297] Issue with return in recursive functions

2013-02-25 Thread Matthew Barnett

Matthew Barnett added the comment:

This question should've been posted to python-l...@python.org, not here.

Your functions are calling themselves, but not returning the result of the call 
to their own callers.

--

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



[issue16935] unittest should understand SkipTest at import time during test discovery

2013-02-25 Thread Zachary Ware

Zachary Ware added the comment:

Thanks for the review, Ezio.  I've made some changes and here's the new patch.

--
Added file: http://bugs.python.org/file29237/issue16935.v3.diff

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



[issue16632] Enable DEP and ASLR

2013-02-25 Thread STINNER Victor

STINNER Victor added the comment:

 I see a crash in test_capi and a couple of crashes
 in test_faulthandler but these don't seem to be related.

Which kind of crash? faulthandler has functions to make Python crash, crashes 
are expected :-)

--
nosy: +haypo

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



[issue16632] Enable DEP and ASLR

2013-02-25 Thread Lukas Lueg

Changes by Lukas Lueg lukas.l...@gmail.com:


--
nosy:  -ebfe

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

Well I did fresh install of windows xp and encountered it. On the other pc with 
xp I tried it is also present. I don't know why I encounter this, I must try 
more PCs. If you have xp, please try if you can reproduce the issue and post 
your result here.

--

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



[issue17297] Issue with return in recursive functions

2013-02-25 Thread R. David Murray

R. David Murray added the comment:

Yes, the bug tracker is not a good place to get help on programming.  
python-list, or the python-tutors list, will produce much more useful results 
for you.

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-25 Thread STINNER Victor

STINNER Victor added the comment:

+if bad_header_value_re.search(_value):
+error_str = Bad header value: {0!r} (bad char: {1!r})
+raise AssertionError(error_str.format(
+_value, bad_header_value_re.search(_value).group(0)))

Why do you search the character twice? You can do something like:

match = bad_header_value_re.search(_value)
if match is not None:
  ... match..group(0) ...

Why do you only check value? You should also check _params:

parts = ; .join(parts)
match = bad_header_value_re.search(parts)
...

And you should also check the name.

Should we do the same checks in httplib?

--
nosy: +haypo

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



[issue3991] urllib.request.urlopen does not handle non-ASCII characters

2013-02-25 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Vinay Sajip

Vinay Sajip added the comment:

Please post, on a machine where the problem is occurring, the contents of the 
following keys in the registry. What I have shown below is what you should have 
(allowing for differing locations for Windows):

[HKEY_CLASSES_ROOT\.py]
@=Python.File

[HKEY_CLASSES_ROOT\.pyc]
@=Python.CompiledFile

[HKEY_CLASSES_ROOT\.pyo]
@=Python.CompiledFile

[HKEY_CLASSES_ROOT\.pys]
@=pysFile

[HKEY_CLASSES_ROOT\.pyw]
@=Python.NoConFile

[HKEY_CLASSES_ROOT\Python.CompiledFile]
@=Compiled Python File

[HKEY_CLASSES_ROOT\Python.CompiledFile\DefaultIcon]
@=\C:\\Windows\\py.exe\,2

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell]

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell\open]
@=Open

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell\open\command]
@=\C:\\Windows\\py.exe\ \%1\ %*

[HKEY_CLASSES_ROOT\Python.File]
@=Python File

[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]
@=\C:\\Windows\\py.exe\,1

[HKEY_CLASSES_ROOT\Python.File\shell]

[HKEY_CLASSES_ROOT\Python.File\shell\open]
@=Open

[HKEY_CLASSES_ROOT\Python.File\shell\open\command]
@=\C:\\Windows\\py.exe\ \%1\ %*

[HKEY_CLASSES_ROOT\Python.NoConFile]
@=Python File (no console)

[HKEY_CLASSES_ROOT\Python.NoConFile\DefaultIcon]
@=\C:\\Windows\\py.exe\,1

[HKEY_CLASSES_ROOT\Python.NoConFile\shell]

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open]
@=Open

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open\command]
@=\C:\\Windows\\pyw.exe\ \%1\ %*

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Vinay Sajip

Vinay Sajip added the comment:

The .pys entry needn't be there - I left it in by mistake.

--

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-25 Thread Devin Cook

Changes by Devin Cook devin.c.c...@gmail.com:


Removed file: http://bugs.python.org/file29182/header_newlines.patch

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-25 Thread Devin Cook

Devin Cook added the comment:

The spec doesn't say anything about the header name. It probably should though, 
as the same issue exists there.

I used two searches because that's how it's done in wsgiref.validate, and it's 
not a huge deal to do that because the second one will only execute when 
there's an error. That said, I changed it to how you proposed.

Here's another stab at that patch.

--
Added file: http://bugs.python.org/file29238/header_newlines_tip.patch

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-25 Thread Devin Cook

Changes by Devin Cook devin.c.c...@gmail.com:


Removed file: http://bugs.python.org/file29192/header_newlines_2.7.patch

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



[issue11671] Security hole in wsgiref.headers.Headers

2013-02-25 Thread Devin Cook

Changes by Devin Cook devin.c.c...@gmail.com:


Removed file: http://bugs.python.org/file29193/header_newlines_2.6.patch

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

Differences:

[HKEY_CLASSES_ROOT\Python.CompiledFile\DefaultIcon]
@=F:\Python33\DLLs\pyc.ico

[HKEY_CLASSES_ROOT\Python.CompiledFile\shell\open]
value not set

[HKEY_CLASSES_ROOT\Python.File\DefaultIcon]
@=F:\Python33\DLLs\py.ico

[HKEY_CLASSES_ROOT\Python.File\shell\open]
value not set

[HKEY_CLASSES_ROOT\Python.NoConFile\DefaultIcon]
@=F:\Python33\DLLs\py.ico

[HKEY_CLASSES_ROOT\Python.NoConFile\shell\open]
value not set

I once agained formatted partition and installed brand new windows, installed 
drivers and SP3, then python 3.3 and the behaviour is still the same.
As for my python installation, I didn't set anything, just clicked through 
install. And set install for all users.

Also, I tried another XP machine and the bug was there.

--

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2013-02-25 Thread Larry Hastings

Larry Hastings added the comment:

Argument Clinic is now PEP 436.

http://www.python.org/dev/peps/pep-0436/

--

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



[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-02-25 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

680959a3ae2e has caused that g-ir-scanner tool from gobject-introspection 
(which seems to create some pickles and next load them?) fails with 
MemoryError, e.g. during building of GTK+.
MemoryError occurs only for a subset of pickles.
I attach a small pickle, which allows to reproduce this problem.
Download this pickle and save it in /tmp.

Additional preparation:
$ cd /tmp
$ wget -q 
http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.34/gobject-introspection-1.34.2.tar.xz
$ tar -xJf gobject-introspection-1.34.2.tar.xz
$ sed -e '/^with LibtoolImporter/,/^$/d' -i 
gobject-introspection-1.34.2/giscanner/xmlwriter.py

Behavior before 680959a3ae2e:
$ PYTHONPATH=gobject-introspection-1.34.2 python2.7 -c 'import cPickle; 
print(cPickle.load(open(pickle)))'
giscanner.girparser.GIRParser object at 0x7f506299be90

Behavior after 680959a3ae2e:
$ PYTHONPATH=gobject-introspection-1.34.2 python2.7 -c 'import cPickle; 
print(cPickle.load(open(pickle)))'
Traceback (most recent call last):
  File string, line 1, in module
MemoryError

--
nosy: +benjamin.peterson
priority: normal - release blocker
resolution: fixed - 
stage: committed/rejected - 
status: closed - open
Added file: http://bugs.python.org/file29239/pickle

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



[issue747320] rfc2822 formatdate functionality duplication

2013-02-25 Thread karl

karl added the comment:

http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.1

quoting from HTTP 1.1 bis

   Prior to 1995, there were three different formats commonly used by
   servers to communicate timestamps.  For compatibility with old
   implementations, all three are defined here.  The preferred format is
   a fixed-length and single-zone subset of the date and time
   specification used by the Internet Message Format [RFC5322].

 HTTP-date= IMF-fixdate / obs-date

   An example of the preferred format is

 Sun, 06 Nov 1994 08:49:37 GMT; IMF-fixdate

   Examples of the two obsolete formats are

 Sunday, 06-Nov-94 08:49:37 GMT   ; obsolete RFC 850 format
 Sun Nov  6 08:49:37 1994 ; ANSI C's asctime() format

   A recipient that parses a timestamp value in an HTTP header field
   MUST accept all three formats.  A sender MUST generate the IMF-
   fixdate format when sending an HTTP-date value in a header field.


What http.server.BaseHTTPRequestHandler.date_time_string is currently doing

 import time
 timestamp = time.time()
 weekdayname = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
 monthname = [None,'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun','Jul', 'Aug', 
 'Sep', 'Oct', 'Nov', 'Dec']
 year, month, day, hh, mm, ss, wd, y, z = time.gmtime(timestamp)
 s = %s, %02d %3s %4d %02d:%02d:%02d GMT % (weekdayname[wd],day, 
 monthname[month], year,hh, mm, ss)
 s
'Mon, 25 Feb 2013 19:26:34 GMT'



what email.utils.formatdate is doing:

 import email.utils
 email.utils.formatdate(timeval=None,localtime=False, usegmt=True)
'Mon, 25 Feb 2013 19:40:04 GMT'
 import time
 ts = time.time()
 email.utils.formatdate(timeval=ts,localtime=False, usegmt=True)
'Mon, 25 Feb 2013 19:51:50 GMT'

I createad a patch 
s = email.utils.formatdate(timestamp, False, True)

I didn't touch the log method which has a different format which is anyway not 
compatible with email.utils.

--
keywords: +patch
nosy: +karlcow
Added file: http://bugs.python.org/file29240/server.patch

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



[issue7370] BaseHTTPServer reinventing rfc822 date formatting

2013-02-25 Thread karl

karl added the comment:

I think it is now fixed by my patch in http://bugs.python.org/issue747320

--
nosy: +karlcow

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



[issue10572] Move test sub-packages to Lib/test

2013-02-25 Thread Ned Deily

Ned Deily added the comment:

Geoff, you need to use hg's optional git format diff to preserve rename info. 
 See hg help diffs.

--
nosy: +ned.deily

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-25 Thread Zachary Ware

Zachary Ware added the comment:

2528e4aea338 seems to have broken building on Windows: 
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1517

--
nosy: +zach.ware

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



[issue747320] rfc2822 formatdate functionality duplication

2013-02-25 Thread karl

karl added the comment:

Made a mistake in the previous server.patch, use server.2.patch

--
Added file: http://bugs.python.org/file29241/server2.patch

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



[issue747320] rfc2822 formatdate functionality duplication

2013-02-25 Thread karl

Changes by karl karl+pythonb...@la-grange.net:


Removed file: http://bugs.python.org/file29240/server.patch

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Vinay Sajip

Vinay Sajip added the comment:

Does the error occur with the standalone launcher downloadable from BitBucket? 
The value not set for shell\open is not good.

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread Vinay Sajip

Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:


--
nosy: +loewis

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



[issue9285] Add a profile decorator to profile and cProfile

2013-02-25 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Ok, here's an updated patch modeled after:
http://hg.python.org/cpython/rev/422169310b7c

It works fine with cProfile.py but not with profile.py where I get this 
exception when I try to use the context manager (tests can be run in order to 
reproduce it):

  File /home/giampaolo/svn/python/3.4-profile/Lib/profile.py, line 339, in 
trace_dispatch_return
assert frame is self.cur[-2].f_back, (Bad return, self.cur[-3])
AssertionError: ('Bad return', ('profile', 0, ''))

I have no clue what this error means.
I wasn't able to add a context manager for profile.Profile for the same reason.
Any clue?

--
nosy: +arigo
Added file: http://bugs.python.org/file29242/profile3.patch

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



[issue9285] Add a profile decorator to profile and cProfile

2013-02-25 Thread Lukas Lueg

Changes by Lukas Lueg lukas.l...@gmail.com:


--
nosy:  -ebfe

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

Well I installed python using standard python 3.3.0.msi from python.org, so 
maybe there is something wrong with setting registry keys?

I downloaded standalone launcher from bitbucket and the results are the same:

1) command line pyw.exe app.pyw no bug
2) I assigned that standalone launcher to open .pyw files (tried .pyw1 also for 
unique extension) and in both cases when double clicked in explorer the bug 
existed

--

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



[issue17290] pythonw - loading cursor bug when launching scripts

2013-02-25 Thread netrick

netrick added the comment:

Of course, the py.exe launcher with console (both standalone and from python 
3.3) DOES NOT produce the error even when launching with double click. It's 
only pyw.exe double click thing.

--

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-25 Thread Brett Cannon

Brett Cannon added the comment:

I dug into 
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/1517/steps/compile/logs/stdio
 and found this traceback:

EXEC : Fatal Python error : Py_Initialize: unable to load the file system codec 
[C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\ssl.vcxproj]
  Traceback (most recent call last):
File frozen importlib._bootstrap, line 1570, in _find_and_load
File frozen importlib._bootstrap, line 1537, in _find_and_load_unlocked
File frozen importlib._bootstrap, line 572, in _check_name_wrapper
File frozen importlib._bootstrap, line 1035, in load_module
File frozen importlib._bootstrap, line 1016, in load_module
File frozen importlib._bootstrap, line 536, in module_for_loader_wrapper
File frozen importlib._bootstrap, line 859, in is_package
File frozen importlib._bootstrap, line 77, in _path_split
  ValueError: too many values to unpack (expected 2)

Looks like Serhiy forgot to cap the rsplit() call to a single split (which 
rpartition does implicitly). I'll fix it shortly.

--

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



[issue14468] Update cloning guidelines in devguide

2013-02-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I haven't really followed the discussion here, but both patches look ok to me 
(the committing.rst one, especially, is a welcome cleanup).

--

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-25 Thread Brett Cannon

Brett Cannon added the comment:

Found another bug introduced by this patch which I will have a patch for 
shortly.

--

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



[issue17220] Little enhancements of _bootstrap.py

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d98a82f4c9bd by Brett Cannon in branch 'default':
Issue #17220: two fixes for changeset 2528e4aea338.
http://hg.python.org/cpython/rev/d98a82f4c9bd

--

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



[issue17298] Twisted test failure triggered by change in 2.7 branch

2013-02-25 Thread Glyph Lefkowitz

New submission from Glyph Lefkowitz:

As reported in Twisted:

https://twistedmatrix.com/trac/ticket/6314

and as seen on the Twisted buildbot: 
https://buildbot.twistedmatrix.com/builders/lucid32-py2.7maint/builds/2327/steps/trial/logs/problems

The tip of the 2.7 branch is now failing Twisted's test suite.

The nature of the bug is not immediately obvious, but it looks like certain 
previously-working pickles are now raising MemoryError when we attempt to load 
them.

--
components: Library (Lib)
messages: 182993
nosy: benjamin.peterson, glyph
priority: release blocker
severity: normal
stage: needs patch
status: open
title: Twisted test failure triggered by change in 2.7 branch
type: behavior
versions: Python 2.7

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



[issue17298] Twisted test failure triggered by change in 2.7 branch

2013-02-25 Thread Ezio Melotti

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


--
nosy: +serhiy.storchaka

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



[issue17298] Twisted test failure triggered by change in 2.7 branch

2013-02-25 Thread STINNER Victor

STINNER Victor added the comment:

It looks like #13555.

--
nosy: +haypo

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



[issue17298] Twisted test failure triggered by change in 2.7 branch

2013-02-25 Thread Glyph Lefkowitz

Glyph Lefkowitz added the comment:

Yes; perhaps that change should be rolled back until a fix for the regression 
can be added?

--

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-25 Thread Ezio Melotti

Ezio Melotti added the comment:

 If the problem is that PyUnicode_FromUnicode() rejects character
 outside range [U+; U+10],

But this used to return two valid characters:
 str(array('u', b'asdf'))
array('u', '獡晤')

so I think it still should -- unless the operation was already nonsensical 
and/or there's no way to do the same thing on 3.3+ due to the change introduced 
by PEP 393.

 it would be better to use the byte string '\xff' * sizeof_PY_UNICODE. 

What for?

 U+66647361 may become valid in a future version of Unicode,

It won't.

--

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



[issue17298] Twisted test failure triggered by change in 2.7 branch

2013-02-25 Thread STINNER Victor

STINNER Victor added the comment:

 Yes; perhaps that change should be rolled back until a fix for the regression 
 can be added?

Try on your side to check if it's really a duplicate. If yes, please join the 
discussion on issue #13555.

--

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-25 Thread Ezio Melotti

Ezio Melotti added the comment:

We discussed this on IRC, and apparently the seemingly valid result I got on 
3.2 was because I had a narrow build.  On a wide 3.2 build I get:
 str(array('u', b'asdf'))
array('u', '\\U66647361')

Since 3.3+ behaves like a wide build and since \U66647361 is not valid, I now 
agree that raising an error is the right thing to do.

If possible, even 3.2 should raise an error, rather than returning an invalid 
codepoint.

--

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c354afedb866 by Victor Stinner in branch '3.3':
Issue #17223: Fix PyUnicode_FromUnicode() for string of 1 character outside
http://hg.python.org/cpython/rev/c354afedb866

New changeset a4295ab52427 by Victor Stinner in branch 'default':
(Merge 3.3) Issue #17223: Fix PyUnicode_FromUnicode() for string of 1 character
http://hg.python.org/cpython/rev/a4295ab52427

--
nosy: +python-dev

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-25 Thread STINNER Victor

STINNER Victor added the comment:

 I think this should be updated to work with the PEP 393 implementation, 
 rather than raising an error.

It was discussed to add new formats for UCS1, UCS2 and UCS4 formats to the 
array module, but nobody implemented the idea. The u format is kept unchanged 
(use Py_UNICODE / wchar_t) for backward compatibility with Python 3.2.

--

I found another bug while trying Manuel's patch :-/ It's now fixed.

@Manuel: Thanks for your patch!

--
resolution:  - fixed
status: open - closed

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



[issue17223] Initializing array.array with unicode type code and buffer segfaults

2013-02-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ebeed44702ec by Victor Stinner in branch '3.3':
Issue #17223: array module: Fix a crasher when converting an array containing
http://hg.python.org/cpython/rev/ebeed44702ec

New changeset 381de621ff6a by Victor Stinner in branch 'default':
(Merge 3.3) Issue #17223: array module: Fix a crasher when converting an array
http://hg.python.org/cpython/rev/381de621ff6a

--

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



[issue16612] Integrate Argument Clinic specialized preprocessor into CPython trunk

2013-02-25 Thread Larry Hastings

Larry Hastings added the comment:

A quick note about the extension mechanism.  Currently the only way to extend 
PyArg_Parse* is via O.  Therefore, any extended type you add will use O, and 
will have a converter.  So internally all I did was say if the parameter has 
a converter, ignore the type and use the O format unit.

This may not be the perfect extension API, if we change Clinic to using some 
new yet-to-be-defined API for argument parsing.  But I suspect it's pretty 
close.  Extension types will need a conversion function from PyObject to their 
type, they'll need a way of defining the C default value, and they'll need a 
way of cleaning up afterwards, all of which I already do.  So I guess I'm 
interested in feedback on the extension API too.

--

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



[issue14468] Update cloning guidelines in devguide

2013-02-25 Thread Chris Jerdonek

Chris Jerdonek added the comment:

 I still fail to understand what are you trying to achieve.

My goal is to reach consensus on changes and have them committed.  In its 
current form, I don't agree with the patch.  The length of the comment thread 
and the length of the patch has discouraged me from raising most of my 
comments, because I'm fairly certain my comments will lead to back-and-forth 
discussion which will make the thread even longer.  That's why I want to break 
things up.

I want to be clear that I'm not against the goals of the patch, so I'm not 
trying to block or stalemate anything.   I just have concerns I would like to 
discuss which is what the review process is supposed to allow.  Needless to 
say, I know what it feels like to have a patch reviewed in detail (which I'm 
not necessarily planning to do).  On the plus side, it's much better than 
comments being against the patch outright in any form.

--

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



[issue17289] readline.set_completer_delims() doesn't play well with others

2013-02-25 Thread Thomas Kluyver

Changes by Thomas Kluyver tak...@gmail.com:


--
nosy: +takluyver

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



[issue12345] Add math.tau

2013-02-25 Thread Simon Baird

Simon Baird added the comment:

https://github.com/search?q=%22TAU+%3D+2+%2A+Math.PI%22type=Code
https://github.com/search?q=%22TAU+%3D+PI+*+2%22type=Code

--

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



  1   2   >