[issue16819] IDLE b method completion incorrect

2012-12-30 Thread Ramchandra Apte

New submission from Ramchandra Apte:

To reproduce, type b. and then press TAB.
The encode method is listed, that means that IDLE is listing the methods of  
(it should list the methods of b).

--
components: IDLE
messages: 178558
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: IDLE b method completion incorrect
type: behavior

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16819
___
___
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)

2012-12-30 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Bump.
@neologix
I have a 64-bit laptop with 2 GB memory so I don't think I can do so. (though 
one could use swap)

--

___
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



[issue14597] Cannot unload dll in ctypes until script exits

2012-12-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue13951] Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2012-12-30 Thread Ramchandra Apte

Ramchandra Apte added the comment:

Bump.

--

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



[issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2012-12-30 Thread Ramchandra Apte

Changes by Ramchandra Apte maniandra...@gmail.com:


--
title: Seg Fault in .so called by ctypes causes the interpreter to Seg Fault - 
Document that Seg Fault in .so called by ctypes causes the interpreter to Seg 
Fault

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



[issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2012-12-30 Thread Georg Brandl

Georg Brandl added the comment:

The reference to faulthandler is a good addition.  The other added sentence 
reads repetitive and can be left out.  Proposal:

There are, however, enough ways to crash Python with :mod:`ctypes`, so you 
should be careful anyway.  The :mod:`faulthandler` module can be helpful in 
debugging crashes, e.g. from segmentation faults produced by erroneous C 
library calls.

--
nosy: +georg.brandl

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



[issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings.

2012-12-30 Thread Georg Brandl

Georg Brandl added the comment:

I think you will, Matthew being MRAB on the mailing lists :)

--
nosy: +georg.brandl

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



[issue16818] Couple of mistakes in PEP 431

2012-12-30 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
nosy: +lregebro

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



[issue16814] use --directory option of make in describing how to build the docs

2012-12-30 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe added the comment:

 This is not a `make' tutorial...

I find the latest patch to be a great compromise though. Many people
would be grateful to learn about the -C option. I am one of them.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16814
___
___
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)

2012-12-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I may tackle this but rare 2.7-only bugs are pretty low on my priorities list.

--

___
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



[issue16814] use --directory option of make in describing how to build the docs

2012-12-30 Thread Georg Brandl

Georg Brandl added the comment:

Well, I'm not -1 about the patch.  But there is something to be said for 
conciseness, and sprinkling the docs with endless alternate routes will not 
make it easier to read quickly and get the information you need.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16814
___
___
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)

2012-12-30 Thread Charles-François Natali

Charles-François Natali added the comment:

 I have a 64-bit laptop with 2 GB memory so I don't think I can do so. (though 
 one could use swap)

AFAICT, a binary string a little longer than 1GB should be enough to
reproduce the bug.
Just make sure Python isn't built with '-fwrapv'.

--

___
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



[issue16816] Bug in hash randomization

2012-12-30 Thread Domen Kožar

Domen Kožar added the comment:

I believe this is not the case, I have updated example to use ordereddict, same 
effect:

https://gist.github.com/4409304

--
resolution: invalid - 
status: closed - open

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



[issue16816] Bug in hash randomization

2012-12-30 Thread Charles-François Natali

Charles-François Natali added the comment:

What exactly are you trying to demonstrate?
As explained by Benjamin, the output can differ from one invokation to another 
because the iteration order depends on the hash value (position in the 
buckets). Running your script on Python 2.7 or curent outputs good and bad 
randomly, which is expected when randomization is enabled.
With randomization off, the output is consistent.

--
nosy: +neologix

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



[issue16816] Bug in hash randomization

2012-12-30 Thread Domen Kožar

Domen Kožar added the comment:

That would mean there is a bug in OrderedDict, since iterator of item in 
OrderedDict should keep the order?

--

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



[issue16816] Bug in hash randomization

2012-12-30 Thread Charles-François Natali

Charles-François Natali added the comment:

No, there's a bug in your code:

nest_variables(collections.OrderedDict({'foo.bar': '1', 'foo': '2'}))


You pass the OrderedDict *and already constructed dict*, so entries are 
inserted in a random order.
Just use this and it'll work properly:

nest_variables(collections.OrderedDict(('foo.bar', '1'), ('foo', '2')))


--

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



[issue16816] Bug in hash randomization

2012-12-30 Thread Charles-François Natali

Charles-François Natali added the comment:

There's actually a parenthesis missing:

nest_variables(collections.OrderedDict((('foo.bar', '1'), ('foo', '2'


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

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



[issue16816] Bug in hash randomization

2012-12-30 Thread Domen Kožar

Domen Kožar added the comment:

Ah, works much better if you pass tuple to ordereddict. Seems like a bug in my 
program indeed (I was using ordereddict, but not correctly). 

Sorry for the noise!

--

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



[issue14373] C implementation of functools.lru_cache

2012-12-30 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Thread-safe implementation for cache cleanup.

--
Added file: http://bugs.python.org/file28490/14373.v7.diff

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



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread R. David Murray

R. David Murray added the comment:

Hmm.  What if we made import_fresh_module a context manager, so that the 
restore of the original module in sys.modules only happened at the end of the 
context?

--

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



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread Eli Bendersky

Eli Bendersky added the comment:

David, how would this help pickle not find _elementtree though? It's already in 
sys.modules *before* fresh_import is used, because test___all__ put it there.

I'm experimenting with just deleting _elementtree from sys.modules before 
running the tests, so far with little success.

--

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



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread Eli Bendersky

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


--
Removed message: http://bugs.python.org/msg178576

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



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread Eli Bendersky

Eli Bendersky added the comment:

David, how would this help pickle not find _elementtree though? It's already in 
sys.modules *before* fresh_import is used, because test___all__ put it there.

I'm experimenting with just deleting _elementtree from sys.modules before 
running the tests, so far with little success.

--

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



[issue15948] Unchecked return value of I/O functions

2012-12-30 Thread Marek Šuppa

Marek Šuppa added the comment:

Any update on this?

--

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



[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 71508fc738bb by Eli Bendersky in branch '3.3':
For Issue #16076: make sure that pickling of Element objects is tested, and do
http://hg.python.org/cpython/rev/71508fc738bb

New changeset 5a38f4d7833c by Eli Bendersky in branch 'default':
For issue #16076: merge 3.3
http://hg.python.org/cpython/rev/5a38f4d7833c

--
nosy: +python-dev

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



[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-30 Thread Eli Bendersky

Eli Bendersky added the comment:

I've added some (currently pyET specific) pickling tests. Daniel, could you 
re-generate the patch? Note that for the C version of pickling you can now 
enable the pickle test. Point to consider - can elements pickled in C be 
unpickled in Python and vice versa? It should probably work (see test_decimal's 
pickling tests).

--

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



[issue16672] improve tracing performances when f_trace is NULL

2012-12-30 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/issue16672
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread R. David Murray

R. David Murray added the comment:

It would help because import_fresh_module would have updated sys.modules to be 
the module under test, and would not restore the previously existing entry in 
sys.modules until after your test had completed.

--

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



[issue16819] IDLE b method completion incorrect

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Same for u'' on 2.7. Completion list doesn't contain isdecimal and 
isnumeric.

--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka
versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue16814] use --directory option of make in describing how to build the docs

2012-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

FWIW even if I heard about the one-liner a few times already I can't really 
seem to remember it, and prefer to do cd Doc anyway.  Using cd Doc also 
makes all the subsequent commands shorter (e.g. opening files, running other 
make targets).
The patch proposed by Chris looks OK to me though.

--

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



[issue15948] Unchecked return value of I/O functions

2012-12-30 Thread Ezio Melotti

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


--
nosy: +serhiy.storchaka

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



[issue16819] IDLE b method completion incorrect

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which fixes this issue. It is applicable for all version, 
except uU can be removed from string of string prefix characters in 3.2.

--
nosy: +kbk
stage:  - patch review

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



[issue16819] IDLE b method completion incorrect

2012-12-30 Thread Serhiy Storchaka

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


--
keywords: +patch
Added file: http://bugs.python.org/file28491/idle_bytes_completion.patch

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



[issue6010] unable to retrieve latin-1 encoded data from sqlite3

2012-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

While trying to reproduce the issue I noticed this while inserting values:

import sqlite3
db = sqlite3.connect(':memory:')
cur = db.cursor()
cur.execute(create table foo (x))
# this works fine
cur.execute(uinsert into foo values ('café').encode('latin1'))
# this fails
cur.execute(uinsert into foo values (?), (u'café'.encode('latin1'),))
# this fails too
cur.execute(insert into foo values (?), (u'café'.encode('latin1'),))

The error is:
 sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a 
text_factory that can interpret 8-bit bytestrings (like text_factory = str). It 
is highly recommended that you instead just switch your application to Unicode 
strings.

Should this be reported in the first case too? (This would be 
backward-incompatible, but, unless it's expected to work, we can always add a 
warning.)

--
components: +Library (Lib) -None
nosy: +ezio.melotti
versions: +Python 2.7 -Python 2.5

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



[issue16804] python3 -S -m site fails

2012-12-30 Thread Meador Inge

Meador Inge added the comment:

Yeah, it is a result of the fix for issue11591 (changeset a364719e400a).  
Incidentally, the decision was made to forgo writing a testcase in favor of 
proof by inspection :-)

There are also other consequences of that change:

   ./python.exe -S
   Python 3.4.0a0 (default:08c215115842, Dec 30 2012, 09:54:54) 
   [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on 
darwin
import site
quit()
   Traceback (most recent call last):
 File stdin, line 1, in module
   NameError: name 'quit' is not defined
^D

'quit' not being defined in this case is a regression.

ISTM the original change was meant to only prevent sys.path from being altered, 
but it is preventing a bunch of other things (USER_BASE, USER_SITE, quit, ...) 
from being initialized as well.

--
nosy: +eric.araujo

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



[issue16783] sqlite3 accepts strings it cannot (by default) return

2012-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

 Treating invalid data as sometimes valid and sometime as invalid is a 
 problem. 

What is valid is defined by your application.  AFAIU sqlite3 defaults to utf-8, 
but it's able to work with latin1 data as well.  The fact that you are mixing 
utf-8 and latin1 is an error in your application, and while it might be nice if 
sqlite3 warned you about it, it's not necessarily its responsibility.  Even 
thought it's a really bad idea, you might want to store data with different 
encodings and still being able to retrieve them using the right text_factory.

However while trying to reproduce the issue I noticed a possible inconsistency 
and reported it on #6010.

--
stage:  - committed/rejected
superseder:  - unable to retrieve latin-1 encoded data from sqlite3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16783
___
___
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

2012-12-30 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

___
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



[issue16741] `int()`, `float()`, etc think python strings are null-terminated

2012-12-30 Thread Matthew Barnett

Matthew Barnett added the comment:

I've attached a small additional patch for truncating the UTF-8.

I don't know whether it's strictly necessary, but I don't know that it's 
unnecessary either! (Better safe than sorry.)

--
Added file: http://bugs.python.org/file28492/issue16741#2.patch

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



[issue16820] configparser.ConfigParser.clean and .update bugs

2012-12-30 Thread Wolfgang Scherer

New submission from Wolfgang Scherer:

configparser.ConfigParser.clean() always fails:

 cfg = configparser.ConfigParser()
 if not hasattr(configparser.ConfigParser, 'clear'):
... configparser.ConfigParser.clear = configparser_clear_compat
 cfg.clear() #doctest: +ELLIPSIS
Traceback (most recent call last):
...
ValueError: Cannot remove the default section.

configparser.ConfigParser.update() overwrites all sections except DEFAULT 
instead of updating them.

See attached test file-

--
components: Library (Lib)
files: bug_configparser.py
messages: 178588
nosy: wolfmanx
priority: normal
severity: normal
status: open
title: configparser.ConfigParser.clean and .update bugs
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file28493/bug_configparser.py

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



[issue14373] C implementation of functools.lru_cache

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Alexey, as I see, you have missed some Antoine's comments (and my comments 
about whitespaces). Please, be more careful.

--

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



[issue16741] `int()`, `float()`, etc think python strings are null-terminated

2012-12-30 Thread Serhiy Storchaka

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


--
nosy: +serhiy.storchaka
versions: +Python 3.4

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



[issue2350] 'exceptions' import fixer

2012-12-30 Thread Berker Peksag

Berker Peksag added the comment:

I've converted Benjamin's patch to extended diff format, fixed some
PEP 8 violations and typos, removed the {get, set}_prefix usage, added
more tests and updated the documentation.

--
nosy: +berker.peksag
Added file: http://bugs.python.org/file28494/issue2350.diff

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



[issue2350] 'exceptions' import fixer

2012-12-30 Thread Benjamin Peterson

Benjamin Peterson added the comment:

This is something people can easily convert in there 2.x code, so I don't think 
the need for it is great.

--
assignee: collinwinter - 

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



[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

LGTM.

--

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



[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-30 Thread Serhiy Storchaka

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


--
Removed message: http://bugs.python.org/msg178416

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



[issue16820] configparser.ConfigParser.clean and .update bugs

2012-12-30 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +lukasz.langa

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



[issue16773] int() half-accepts UserString

2012-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

Not sure this is worth fixing, unless the fix is trivial.

--

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



[issue16804] python3 -S -m site fails

2012-12-30 Thread Meador Inge

Meador Inge added the comment:

Whoops, the 'quit' case is actually intended and is documented 
(http://docs.python.org/3.4/library/site.html):


or additions to the builtins. To explicitly trigger the usual site-specific 
additions, call the site.main() function.


I think the right way to fix this is to use the accessor functions for the 
USER_* variables.  Does the attached look OK?

--
assignee:  - meador.inge
keywords: +patch
stage:  - patch review
Added file: http://bugs.python.org/file28495/issue16804-0.patch

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



[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 503b889668fc by Serhiy Storchaka in branch '2.7':
Issue #16645: Fix hardlink extracting test for tarfile.
http://hg.python.org/cpython/rev/503b889668fc

New changeset d42bf4faf3d1 by Serhiy Storchaka in branch '3.2':
Issue #16645: Fix hardlink extracting test for tarfile.
http://hg.python.org/cpython/rev/d42bf4faf3d1

New changeset e1a0901e4ef7 by Serhiy Storchaka in branch '3.3':
Issue #16645: Fix hardlink extracting test for tarfile.
http://hg.python.org/cpython/rev/e1a0901e4ef7

New changeset f173c2e92b64 by Serhiy Storchaka in branch 'default':
Issue #16645: Fix hardlink extracting test for tarfile.
http://hg.python.org/cpython/rev/f173c2e92b64

--
nosy: +python-dev

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



[issue16645] Wrong test_extract_hardlink() in test_tarfile.py

2012-12-30 Thread Serhiy Storchaka

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


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

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



[issue7300] Unicode arguments in str.format()

2012-12-30 Thread Pedro Algarvio

Pedro Algarvio added the comment:

This is not a 2.7 issue only:

 import sys
 sys.version_info
(2, 6, 5, 'final', 0
 'Foo {0}'.format(u'bár')
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1: 
ordinal not in range(128)


--
nosy: +Pedro.Algarvio

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



[issue16379] SQLite error code not exposed to python

2012-12-30 Thread Daniel Shahaf

Daniel Shahaf added the comment:

New patch, with better docs and less error leaks, per Ezio's review.

--
Added file: http://bugs.python.org/file28496/i16379-v2.diff

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



[issue16379] SQLite error code not exposed to python

2012-12-30 Thread Daniel Shahaf

Daniel Shahaf added the comment:

A couple of random eyebrow-raisers I noticed while working on v2:

- sqlite3.Warning is a subclass of Exception, rather than sqlite3.Error
  or builtins.Warning.  (Also, the docs say will raise a Warning,
  intending to refer to sqlite3.Warning, but the lack of markup makes
  this ambiguous --- it would be interpreted as a reference to
  builtins.Warning).

- If _PyUnicode_AsStringAndSize() returns NULL, the code sets a
  sqlite3.Warning exception without first checking what exception is
  already set.  (grep for PYSQLITE_SQL_WRONG_TYPE)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16379
___
___
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)

2012-12-30 Thread Serhiy Storchaka

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


--
stage: patch review - needs patch

___
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



[issue7300] Unicode arguments in str.format()

2012-12-30 Thread Ezio Melotti

Ezio Melotti added the comment:

2.6 only gets security fixes.

 My patch converts the format string to unicode using the default 
 encoding. It's inconsistent with str%args: str%args converts str to 
 unicode using the ASCII charset (if a least one argument is an unicode 
 string), not the default encoding.

I think it's better to be consistent and use ASCII.

--

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



[issue15861] ttk.Treeview unmatched open brace in list

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Have you reviewed the patch? Is it good?

--

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



[issue16379] SQLite error code not exposed to python

2012-12-30 Thread Daniel Shahaf

Daniel Shahaf added the comment:

New patch fixing indentation of versionadded markup.

--
Added file: http://bugs.python.org/file28497/i16379-v3.diff

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



[issue8745] zipimport is a bit slow

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Catalin, are you going to continue?

--

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



[issue9720] zipfile writes incorrect local file header for large files in zip64

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What variant of patches should I commit? Or prepare other?

--

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



[issue16061] performance regression in string replace for 3.3

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I going speed up other cases for replace(), but for now I have only this patch. 
Is it good? Should I apply it to 3.3 as there is a 3.3 regression?

--
keywords: +3.3regression

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



[issue16773] int() half-accepts UserString

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is definitely non-trivial. 1-argument int() works with UserString because 
__int__() method is defined for UserString (as __float__(), as __complex__()). 
I.e. UserString looks as number-like for it. Unfortunately there is no way to 
make a class be string-like without inheriting it from str class.

--

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



[issue16061] performance regression in string replace for 3.3

2012-12-30 Thread Benjamin Peterson

Benjamin Peterson added the comment:

As __ap__ says, it would be nice to have a comment.

--
nosy: +benjamin.peterson

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



[issue16061] performance regression in string replace for 3.3

2012-12-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

64-bit linux results:

3.2  3.3  patch

133 (-28%)   1343 (-93%)  96 1 'a' 'b' 'c'
414 (-9%)704 (-47%)   3752 'a' 'b' 'c'
319 (-8%)491 (-40%)   2933 'a' 'b' 'c'
253 (-7%)384 (-39%)   2354 'a' 'b' 'c'
216 (-8%)320 (-38%)   1995 'a' 'b' 'c'
192 (-9%)278 (-37%)   1756 'a' 'b' 'c'
175 (-10%)   247 (-36%)   1577 'a' 'b' 'c'
162 (-11%)   223 (-35%)   1448 'a' 'b' 'c'
153 (-14%)   204 (-35%)   1329 'a' 'b' 'c'
145 (-15%)   188 (-35%)   12310 'a' 'b' 'c'
108 (-36%)   112 (-38%)   69 20 'a' 'b' 'c'
86 (-59%)53 (-34%)35 50 'a' 'b' 'c'
78 (-71%)31 (-26%)23 100 'a' 'b' 'c'
73 (-84%)12 (+0%) 12 1000 'a' 'b' 'c'
81 (-88%)10 (+0%) 10 1 'a' 'b' 'c'

133 (-23%)   1470 (-93%)  1031 '\u010a' '\u010b' '\u010c'
414 (-10%)   799 (-54%)   3712 '\u010a' '\u010b' '\u010c'
319 (-5%)576 (-47%)   3033 '\u010a' '\u010b' '\u010c'
254 (-1%)461 (-46%)   2514 '\u010a' '\u010b' '\u010c'
216 (+2%)391 (-44%)   2205 '\u010a' '\u010b' '\u010c'
193 (+4%)341 (-41%)   2006 '\u010a' '\u010b' '\u010c'
175 (+5%)303 (-39%)   1847 '\u010a' '\u010b' '\u010c'
163 (+6%)275 (-37%)   1728 '\u010a' '\u010b' '\u010c'
153 (+6%)252 (-36%)   1629 '\u010a' '\u010b' '\u010c'
145 (+7%)235 (-34%)   15510 '\u010a' '\u010b' '\u010c'
108 (-1%)133 (-20%)   10720 '\u010a' '\u010b' '\u010c'
86 (-27%)66 (-5%) 63 50 '\u010a' '\u010b' '\u010c'
79 (-44%)44 (+0%) 44 100 '\u010a' '\u010b' '\u010c'
74 (-66%)24 (+4%) 25 1000 '\u010a' '\u010b' '\u010c'
75 (-71%)22 (+0%) 22 1 '\u010a' '\u010b' '\u010c'

1687 (-91%)  1362 (-89%)  1501 '\U0001000a' '\U0001000b' '\U0001000c'
1146 (-58%)  817 (-41%)   4792 '\U0001000a' '\U0001000b' '\U0001000c'
919 (-61%)   627 (-43%)   3583 '\U0001000a' '\U0001000b' '\U0001000c'
802 (-63%)   521 (-44%)   2944 '\U0001000a' '\U0001000b' '\U0001000c'
729 (-64%)   446 (-42%)   2595 '\U0001000a' '\U0001000b' '\U0001000c'
678 (-65%)   394 (-40%)   2376 '\U0001000a' '\U0001000b' '\U0001000c'
643 (-66%)   350 (-37%)   2207 '\U0001000a' '\U0001000b' '\U0001000c'
617 (-66%)   313 (-34%)   2078 '\U0001000a' '\U0001000b' '\U0001000c'
598 (-67%)   283 (-30%)   1989 '\U0001000a' '\U0001000b' '\U0001000c'
581 (-67%)   258 (-27%)   18910 '\U0001000a' '\U0001000b' '\U0001000c'
511 (-71%)   152 (-3%)14820 '\U0001000a' '\U0001000b' '\U0001000c'
472 (-76%)   89 (+28%)11450 '\U0001000a' '\U0001000b' '\U0001000c'
461 (-78%)   68 (+47%)100100 '\U0001000a' '\U0001000b' '\U0001000c'
452 (-81%)   48 (+81%)87 1000 '\U0001000a' '\U0001000b' '\U0001000c'
452 (-81%)   46 (+85%)85 1 '\U0001000a' '\U0001000b' '\U0001000c'

--

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



[issue11344] Add os.path.splitpath(path) function

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please review. This function is very important for many applications (and it 
hard to get right).

--

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



[issue16061] performance regression in string replace for 3.3

2012-12-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

64-bit windows results:

3.3  patched

925 (-90%)   97 1 'a' 'b' 'c'
881 (-54%)   4052 'a' 'b' 'c'
623 (-51%)   3083 'a' 'b' 'c'
482 (-48%)   2524 'a' 'b' 'c'
396 (-44%)   2235 'a' 'b' 'c'
344 (-40%)   2086 'a' 'b' 'c'
306 (-38%)   1907 'a' 'b' 'c'
276 (-37%)   1738 'a' 'b' 'c'
254 (-36%)   1629 'a' 'b' 'c'
241 (-35%)   15610 'a' 'b' 'c'
158 (-24%)   12020 'a' 'b' 'c'
107 (-12%)   94 50 'a' 'b' 'c'
87 (+7%) 93 100 'a' 'b' 'c'
70 (+3%) 72 1000 'a' 'b' 'c'
63 (+8%) 68 1 'a' 'b' 'c'

1332 (-92%)  1061 '\u010a' '\u010b' '\u010c'
1137 (-60%)  4592 '\u010a' '\u010b' '\u010c'
836 (-58%)   3473 '\u010a' '\u010b' '\u010c'
660 (-56%)   2884 '\u010a' '\u010b' '\u010c'
567 (-55%)   2565 '\u010a' '\u010b' '\u010c'
503 (-51%)   2456 '\u010a' '\u010b' '\u010c'
455 (-47%)   2427 '\u010a' '\u010b' '\u010c'
414 (-44%)   2318 '\u010a' '\u010b' '\u010c'
387 (-41%)   2279 '\u010a' '\u010b' '\u010c'
365 (-35%)   23710 '\u010a' '\u010b' '\u010c'
256 (-21%)   20120 '\u010a' '\u010b' '\u010c'
185 (-9%)16850 '\u010a' '\u010b' '\u010c'
186 (-19%)   150100 '\u010a' '\u010b' '\u010c'
137 (-1%)1361000 '\u010a' '\u010b' '\u010c'
131 (+3%)1351 '\u010a' '\u010b' '\u010c'

1346 (-88%)  1601 '\U0001000a' '\U0001000b' '\U0001000c'
1247 (-62%)  4692 '\U0001000a' '\U0001000b' '\U0001000c'
965 (-64%)   3523 '\U0001000a' '\U0001000b' '\U0001000c'
845 (-64%)   3034 '\U0001000a' '\U0001000b' '\U0001000c'
720 (-65%)   2515 '\U0001000a' '\U0001000b' '\U0001000c'
655 (-65%)   2306 '\U0001000a' '\U0001000b' '\U0001000c'
604 (-58%)   2567 '\U0001000a' '\U0001000b' '\U0001000c'
570 (-62%)   2148 '\U0001000a' '\U0001000b' '\U0001000c'
546 (-63%)   2039 '\U0001000a' '\U0001000b' '\U0001000c'
515 (-63%)   19010 '\U0001000a' '\U0001000b' '\U0001000c'
404 (-61%)   15720 '\U0001000a' '\U0001000b' '\U0001000c'
339 (-62%)   13050 '\U0001000a' '\U0001000b' '\U0001000c'
308 (-60%)   122100 '\U0001000a' '\U0001000b' '\U0001000c'
284 (-54%)   1301000 '\U0001000a' '\U0001000b' '\U0001000c'
281 (-60%)   1131 '\U0001000a' '\U0001000b' '\U0001000c'

--

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



[issue11344] Add os.path.splitpath(path) function

2012-12-30 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 Please review. This function is very important for many applications
 (and it hard to get right).

The pathlib module (PEP 428) has such functionality built-in.

--

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



[issue14373] C implementation of functools.lru_cache

2012-12-30 Thread Alexey Kachayev

Alexey Kachayev added the comment:

Updated diff with:
 * fix object leaks
 * tp_clear
 * additional test for maxsize  0

I also reimplemented multithreading test (fixed error and added skip rule). But 
actually, I'm not sure that it's enough for ensuring thread-safety of clear 
operation. I'm working on other variant now. I will be appreciated for any 
advice about where to find example of the same (or close enough) test cases 
from other modules.

Regarding to previous comments from review. 

1. guard against negative numbers

I added special test case for negative maxsize in order to show, that now C 
version works the same as Python one. So, should we change both implementation? 
What behavior is most logical here? Reimplementation will change public API, so 
it's not only about acceleration.

2. Use regular PyObject instead of lru_list_elem.

What the problems are with current implementation?

--
Added file: http://bugs.python.org/file28498/14373.v9.diff

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



[issue16061] performance regression in string replace for 3.3

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 As __ap__ says, it would be nice to have a comment.

Oh, I thought I had already done this.

--

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



[issue6975] symlinks incorrectly resolved on Linux

2012-12-30 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Antoine, how about this mosquito?

--

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



[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-30 Thread Carsten Klein

Carsten Klein added the comment:

I have created a patch for Python 2.7.3 that fixes the issue for that release, 
too.

--
Added file: http://bugs.python.org/file28499/python2.7.3.diff

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



[issue16061] performance regression in string replace for 3.3

2012-12-30 Thread STINNER Victor

STINNER Victor added the comment:

str_replace_1char.patch: why not implementing replace_1char_inplace() in 
stringlib, with one version per character type (UCS1, UCS2, UCS4)?

I prefer unicode_2.patch algorithm because it's simpler: only one loop (vs two 
loops for str_replace_1char.patch, with a threshold of 10 different characters).

Why do you changed your algorithm? Is str_replace_1char.patch algorithm more 
efficient than unicode_2.patch algorithm? Is the speedup really interesting?

--

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



[issue16821] bundlebuilder broken in 2.7

2012-12-30 Thread Barry Alan Scott

New submission from Barry Alan Scott:

bundlebuild in pytthon 2.7 fails to create usable applications.

After examining the code there are a number of coding errors:

1. optimize will puts the -O in the wrong place in the argv
2. Modules.zip is never added to the path

The bunderbuilder in 2.6 can be made to work with 2.7 by
applying the following patch to the 2.6 code.

--- bundlebuilder.py~   2012-12-30 21:32:40.0 +
+++ bundlebuilder.py2012-12-30 21:32:40.0 +
@@ -337,7 +337,6 @@
 Python,  # the Python core library
 Resources/English.lproj,
 Resources/Info.plist,
-Resources/version.plist,
 ]
 
 def isFramework():

--
messages: 178616
nosy: barry-scott
priority: normal
severity: normal
status: open
title: bundlebuilder broken in 2.7
type: performance
versions: Python 2.7

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



[issue7300] Unicode arguments in str.format()

2012-12-30 Thread STINNER Victor

STINNER Victor added the comment:

Another option is to decide that this issue will *not* be fixed in Python 2, 
and Python 3 *is* the good solution if you have this issue.

Doing the work twice can cause new problems, formatting an argument twice may 
return two different values :-( It may have an impact on performances and may 
introduce regressions.

Oh by the way, it's trivial to workaround this issue in Python 2: just use a 
Unicode format string. For example, replace '{0}'.format(u'\u3042') with 
u'{0}'.format(u'\u3042').

I hate implicit conversion from bytes to Unicode in Python 2, it's maybe better 
to not add a new special case?

--

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



[issue7300] Unicode arguments in str.format()

2012-12-30 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree that we should close this as won't fix in 2.7.

--

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



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2012-12-30 Thread Samuel John

Samuel John added the comment:

Sounds reasonable, but please put the libs not in a place that might conflict 
with a Tk installed by other means (e.g. homebrew's Tk is a `/usr/local`).

--
nosy: +samueljohn

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



[issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers

2012-12-30 Thread Ed Campbell

Changes by Ed Campbell drescampb...@gmail.com:


--
nosy: +esc24

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



[issue16817] test___all__ has to save and restore sys.modules while it does all the importing

2012-12-30 Thread Eli Bendersky

Eli Bendersky added the comment:

I'm renaming the issue to just mention the problem, not the initially proposed 
solution (following the python-dev discussion).

--

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



[issue16817] test___all__ affects other tests by doing too much importing

2012-12-30 Thread Eli Bendersky

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


--
title: test___all__ has to save and restore sys.modules while it does all the 
importing - test___all__ affects other tests by doing too much importing

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



[issue16821] bundlebuilder broken in 2.7

2012-12-30 Thread Ned Deily

Ned Deily added the comment:

Barry, can you provide a simple test case that demonstrates the failures you 
see?

--
assignee:  - ronaldoussoren
components: +Macintosh
nosy: +ned.deily, ronaldoussoren
stage:  - test needed
type: performance - behavior

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



[issue16821] bundlebuilder broken in 2.7

2012-12-30 Thread Barry Alan Scott

Barry Alan Scott added the comment:

I'm using the pysvn workbench sources to find the problem.

Test cases for Mac Apps are not that simple. You need a GUI
framework for starters.

But I'm happy to test any candidate fix using workbench.

As I said a code inspection of the changes since 2.6 will
show that this code cannot work.

--

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



[issue16822] execv (et al.) should invoke atexit handlers before executing new code

2012-12-30 Thread Ned Batchelder

New submission from Ned Batchelder:

If I register an atexit handler, and then call os.execv, the handler is not 
invoked before my process changes over to the new program.  Shouldn't it be?  
My program is ending, so my atexit handlers should be invoked.

This is based on this coverage.py bug:  
https://bitbucket.org/ned/coveragepy/issue/43/coverage-measurement-fails-on-code
  If the atexit handlers were invoked as part of os.execv, it would work 
properly.

--
messages: 178623
nosy: nedbat
priority: normal
severity: normal
status: open
title: execv (et al.) should invoke atexit handlers before executing new code
versions: Python 2.7, Python 3.3

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



[issue14516] test_tools assumes BUILDDIR=SRCDIR

2012-12-30 Thread Roumen Petrov

Roumen Petrov added the comment:

No - it is broken.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14516
___
___
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

2012-12-30 Thread Berker Peksag

Berker Peksag added the comment:

Attaching new patch to address Vinay Sajip's suggestions on Rietveld. Thank 
you, Vinay.

--
Added file: http://bugs.python.org/file28500/issue12915_v2.diff

___
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



[issue9586] warning: comparison between pointer and integer in multiprocessing build on Tiger

2012-12-30 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +sbt

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



[issue1674555] sys.path in tests contains system directories

2012-12-30 Thread Eli Bendersky

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


--
nosy: +eli.bendersky

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



[issue10527] multiprocessing.Pipe problem: handle out of range in select()

2012-12-30 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Updated patch including test fixes is in attachment.

--
Added file: http://bugs.python.org/file28501/issue10527-3.patch

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



[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-30 Thread Daniel Shahaf

Daniel Shahaf added the comment:

Attached.  Differences to previous version:

- Avoid the test___all__ issue (#16817) by manipulating sys.modules
  directly

- Support pickling interoperability between the C and Python
  implementations

--
Added file: http://bugs.python.org/file28502/i16076-v6.diff

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



[issue16689] stdout stderr redirection mess

2012-12-30 Thread Ralf Schmitt

Ralf Schmitt added the comment:

flushing stdout may help before writing to stderr (or at least when writing a 
traceback). see 
http://utcc.utoronto.ca/~cks/space/blog/programming/HowToWriteToStderr for a 
discussion.

I don't think it's unreasonable to implement that in python core.

--
nosy: +schmir

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



[issue16783] sqlite3 accepts strings it cannot (by default) return

2012-12-30 Thread William D. Colburn

William D. Colburn added the comment:

What it should do is be consistent (predictable) in it's handling of
input and output.  If it accepts unicode and outputs unicode, then it
should accept unicode and output unicode, not accept garbage and then
barf.  Valid data should be consistantly valid, and invalid data
should be consistently invalid.   It is bad behavior for a system to
allow invalid data in that can't be recovered or handled.

On Sun, Dec 30, 2012 at 9:32 AM, Ezio Melotti rep...@bugs.python.org wrote:

 Ezio Melotti added the comment:

 Treating invalid data as sometimes valid and sometime as invalid is a 
 problem.

 What is valid is defined by your application.  AFAIU sqlite3 defaults to 
 utf-8, but it's able to work with latin1 data as well.  The fact that you are 
 mixing utf-8 and latin1 is an error in your application, and while it might 
 be nice if sqlite3 warned you about it, it's not necessarily its 
 responsibility.  Even thought it's a really bad idea, you might want to store 
 data with different encodings and still being able to retrieve them using the 
 right text_factory.

 However while trying to reproduce the issue I noticed a possible 
 inconsistency and reported it on #6010.

 --
 stage:  - committed/rejected
 superseder:  - unable to retrieve latin-1 encoded data from sqlite3

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue16783
 ___

--

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



[issue1653416] OS X print f, Hello produces no error on read-only f: normal?

2012-12-30 Thread Ned Deily

Ned Deily added the comment:

An update: the problem with OS X behavior appears to have been fixed between OS 
X 10.6 and 10.7.  As of 10.7, print to a read-only file also fails as on linux:

 print  f, Hi
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: [Errno 9] Bad file descriptor

Also, f.write() as of 2.7.3 produces a more meaningful message.

 f.write(bha)
Traceback (most recent call last):
  File stdin, line 1, in module
IOError: File not open for writing

Since the original example now produces an exception, plus, as noted, this is 
not an issue for 3.x and it's not likely that further work will be done  on 2.x 
in this area, I'm closing this as out-of-date.

--
nosy:  -BreamoreBoy
resolution:  - out of date
stage: test needed - committed/rejected
status: open - closed

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



[issue13657] IDLE doesn't support sys.ps1 and sys.ps2.

2012-12-30 Thread Roger Serwy

Changes by Roger Serwy roger.se...@gmail.com:


--
nosy:  -serwy

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



[issue3871] cross and native build of python for mingw* hosts

2012-12-30 Thread Roumen Petrov

Roumen Petrov added the comment:

Jason Huntley wrote:
 Jason Huntley added the comment:

 Finally! I was able to get all building on mingw64, gcc 4.7.2, and python 
 3.3. I had to take everybody's work here a little further, and I have 
 produced a new patch which will build python33 using the latest minw64 
 compiler in an msys environment.

 I cloned the 3.3 branch and applied the latest patch available here, 
 py3k-20121004-MINGW.patch. I had to make quite a few more updates to get all 
 the modules compiling with 4.7.2 and python find all the modules in the 
 correct paths in an msys/mingw64 environment. I've compiled another patch, 
 which addresses all the latest issues.
Until now I did not change Mingw compiler class, just because is 
reported in a number of separate issues. I would like to disagree with 
'hard codded' compiler flags into python code. For instance 
-mms-bitfields is default for GCC 4.7+ . Also -pthread has to be 
detected by configure if is required for host platform.
Another point is mno-cygwin - reported in issue 12641. Unfortunately one 
of PSF project directors misread error message and issue remain unresolved.

Please provide more details for change in Lib/ntpath.py .

What is reasons to add more build-in modules (time, math, ...) ?

Why is updated PC/pyconfig.h ? This is so called by python community 
posix-build and pyconfig.h is generated by configure script. Did I 
miss something ?

File configure.ac contain so many unrelated changes - replace tabs with 
spaces. Please post as separate diff you changes.

Why is updated Lib/plat-generic/regen ?

Currently my private repository reintroduce support _sysconfigdata.py 
but this require some changes in PC/getpathp.c . I left current 
installation from makefile as is and after this with an extra script i 
move file for location same as primary build. This is reason do not 
include more search paths in this file. Issue for unification of python 
installation across platforms may be will be resolved with 14302 and 9654.

Roumen

--

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



[issue16820] configparser.ConfigParser.clean and .update bugs

2012-12-30 Thread Łukasz Langa

Changes by Łukasz Langa luk...@langa.pl:


--
assignee:  - lukasz.langa

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



[issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable

2012-12-30 Thread Daniel Shahaf

Daniel Shahaf added the comment:

BTW, maybe I'm just confused, but I'm a little surprised that C pickling - 
Python unpickling works: the C __reduce__ returns a 3-element tuple, which 
according to pickle docs[1] must either be a dictionary or be passed to 
__setstate__; it's not a dictionary and the Python implementation doesn't have 
a __setstate__.

http://docs.python.org/3/library/pickle#pickle.object.__reduce__

--

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



[issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault

2012-12-30 Thread Meador Inge

Meador Inge added the comment:

Georg's proposal seems reasonable to me sans one very minor nit.  I think the 
e.g. bit is better off parenthesized:

 There are, however, enough ways to crash Python with :mod:`ctypes`, so you
-should be careful anyway.
+should be careful anyway.  The :mod:`faulthandler` module can be helpful in
+debugging crashes (e.g. from segmentation faults produced by erroneous C
+library calls).

If there are no objections, then I will go ahead and commit this version.

--

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



[issue16747] Remove 'file' type reference from 'iterable' glossary entry

2012-12-30 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6

2012-12-30 Thread STINNER Victor

STINNER Victor added the comment:

I spoke with schmir on IRC about this issue because he considers the request as 
valid, and he doesn't understand why the issue was closed with wont fix.

--

schmir use case:

 - a network where IPv6 doesn't work (for an unknown reason)
 - a Linux system with IPv6 support and a network interface with a local link 
address (fe80:...), maybe also with a IPv6 public address (it doesn't really 
matter for the use case)
 - Python configured with --disable-ipv6 to ensure that Python will not send 
any IPv6 request (according to schmir) (./configure --disable-ipv6)
 - the DNS client is configured to return IPv4 addresses and then IPv6 addresses
 - call socket.create_connection((hostname, 80))
 - the computer cannot connect to this host in IPv4 nor IPv6

Current behaviour:

 - Python calls getaddrinfo() with ai_family=0 (AF_UNSPEC)
 - the DNS client (of the glibc) asks for A (IPv4) and  (IPv6) DNS records
 - Python tries to connect to the IPv4 address and fails (connection error for 
example)
 - Python tries to connect to the IPv6 address and fails with a TypeError 
because AF_INET6 is not supported
 - the final exception is misleading: TypeError instead of a connection error

schmir expects that --disable-ipv6 would really disable IPv6 *everywhere* in 
Python, which is wrong. Python may still get IPv6 adddresses from getaddrinfo() 
if the system does somehow support IPv6.

schmir proposes the change create_connection() to really disable IPv6 there: 
force AF_INET if socket.has_ipv6 is False.
https://github.com/SiteSupport/gevent/commit/9b1bccffc11455112076189f35023291cf97a2a2

I agree that something is wrong here, but I also disagree with schmir. In my 
opinion, --disable-ipv6 is the wrong answer to the initial problem (ensure that 
the computer will not use IPv6 because IPv6 doesn't work somewhere in the 
network). The correct solution is to disable IPv6 system wide. See for example 
https://wiki.archlinux.org/index.php/IPv6#Disable_IPv6 to disable IPv6 system 
wide on Linux.

It's simpler and safer to disable IPv6 system wide instead of fixing all 
applications. Other applications will have the same issue (ask  DNS 
records) in the same use case.

wont fix is the correct status for this issue: we agree that there is a bug, 
but it will not be fixed, because --disable-ipv6 is the wrong solution.

--

Note: ai_flags=AI_ADDRCONFIG would not change anything because the network 
interface has an IPv6 local link address. See 
http://sourceware.org/bugzilla/show_bug.cgi?id=12377 for a discussion about 
this in the glibc.

Note: schmir uses Gentoo and disabled the ipv6 use flag of its python package 
(USE=-ipv6).

--
nosy: +haypo

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



[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-30 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue16802] fileno argument to socket.socket() undocumented

2012-12-30 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



  1   2   >