[issue6517] configparser: add possibility to escape formatstrings

2010-07-24 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

 The documentation should promote RawConfigParser, and note
 SafeConfigParser and ConfigParser as remaining for backward
 compatibility for existing software. 

That is another way to go around this. Anyway, ConfigParser is the least 
predictable of all three for end users and the documentation should be adjusted 
to emphasize this. 

 Maintainers of legacy software
 using ConfigParser should be encouraged to convert to SafeConfigParser
 (or even RawConfigParser) if possible.

That's another comment that should appear in the documentation.

 Documentation changes should be sufficient; deprecation warnings
 typically generate more pain than good.

Isn't is what I was saying above?

--

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



[issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method

2010-07-24 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

 Unless there is a reason I have missed, I would iterate through the
 smaller set, which might even be empty or nearly so, rather than
 either in particular.

You're right, here is a new patch. Pseudocode:

def isdisjoint(self, other):
if self is other:
if len(self) == 0:
return True
else:
return False
else:
if len(other)  len(self):
self, other = other, self
for item in other:
if item in self:
return False
return True

--
Added file: http://bugs.python.org/file18172/issue9212a.diff

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



[issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.)

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This issue only seems to be relevant for OSX, and then only for OSX releases 
before 10.5, because in that release Apple made sure that the LANG variable and 
simular LC_* ones specify a UTF-8 encoding and we're back at the common case 
where the filesystem encoding matches the locale encoding.

A system where the filesystem encoding doesn't match the locale encoding is 
hard to get right. While it would be possible to add sys.cmdlineencoding that 
doesn't actually solve the semantic problem because external tools might not 
cooperate.

That is, most system tools seem to work with bytes internally and do not treat 
arguments as text encoded in the locale encoding that should be re-encoded in 
the filesystem encoding before passing them to the C APIs.

That is, when calling ls somefile the ls command will pass the bytes in 
argv[1] to the POSIX routines for getting file information without trying to 
reencode.

In short, having a filesystem encoding that is different from the command-line 
only works when all system tools cooperate and are unicode aware.

To be honest, I'd say the behavior of OSX 10.4 is a bug and we might add a 
workaround on that platform that uses CFStringGetSystemEncoding() to fetch the 
actual system encoding when LANG=C.

(And I'm -1 on adding the patch)

See also: issue9167

--
nosy: +ronaldoussoren

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



[issue9366] Reference leak for local new style class

2010-07-24 Thread Kay Hayen

New submission from Kay Hayen kayha...@gmx.de:

Hello,

I have created tests that check the reference counting and found that the 
following simple function leaks references in CPython:

def simpleFunction39():
   class Parent( object ):
  pass

I have attached a test that needs to be run with python-dbg and checks the 
total reference count for many language constructs. Sometimes a warmup can be 
useful, if CPython caches something, but it doesn't help in this case. Removing 
object or replacing it with an old style class helps.

I think I saw that 3 references of object leak, and a total of ca. 20 for each 
call to the function. I suspect a memory leak too.

Use the attached file for reproduction of the problem.

--
components: Interpreter Core
files: Referencing.py
messages: 111433
nosy: kayhayen
priority: normal
severity: normal
status: open
title: Reference leak for local new style class
type: resource usage
versions: Python 2.6
Added file: http://bugs.python.org/file18173/Referencing.py

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



[issue9367] test_getgroups in test_posix fails

2010-07-24 Thread Darren Worrall

New submission from Darren Worrall d...@darrenworrall.co.uk:

In my checkout of py3k (r83123), test_getgroups in test_posix fails - the right 
elements are returned but the ordering is different:

$ ./python -m test.regrtest test_posix
test_posix
test test_posix failed -- Traceback (most recent call last):
  File /home/daz/src/py3k/Lib/test/test_posix.py, line 360, in test_getgroups
self.assertEqual([int(x) for x in groups.split()], posix.getgroups())
AssertionError: Lists differ: [1000, 4, 6, 20, 24, 46, 105, ... != [4, 6, 20, 
24, 46, 105, 119, 1...

First differing element 0:
1000
4

- [1000, 4, 6, 20, 24, 46, 105, 119, 122, 125, 126, 128]
+ [4, 6, 20, 24, 46, 105, 119, 122, 125, 126, 128, 1000]

1 test failed:
test_posix

Platform is Ubuntu 10.04 x86_64, kernel is 2.6.32 - unfortunately my C sucks so 
I'm not sure what's going on.

--
messages: 111434
nosy: DazWorrall
priority: normal
severity: normal
status: open
title: test_getgroups in test_posix fails

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



[issue9368] Const-Correctness for Method Calls

2010-07-24 Thread Armin Ronacher

New submission from Armin Ronacher armin.ronac...@active-4.com:

The following patch changes some parts of the public C API for const 
correctness which would help C++ programmers.

The original patch was provided by neXyon on irc.freenode.net.

It does not produce any compiler warnings on GCC and I don't expect any 
compiler warnings on other systems either.

--
components: None
files: const.patch
keywords: patch
messages: 111435
nosy: aronacher
priority: normal
severity: normal
stage: patch review
status: open
title: Const-Correctness for Method Calls
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18174/const.patch

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



[issue4184] Remove use of private attributes in smtpd

2010-07-24 Thread Richard Jones

Richard Jones richardjo...@optushome.com.au added the comment:

Committed in revision 83125.

--
assignee:  - richard
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
type:  - feature request

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-07-24 Thread Jörg Müller

New submission from Jörg Müller nex...@gmail.com:

Patch attached

--
components: Interpreter Core
files: patch.diff
keywords: patch
messages: 111437
nosy: neXyon
priority: normal
severity: normal
status: open
title: const char* for PyObject_CallMethod and PyObject_CallFunction
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file18175/patch.diff

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



[issue9336] string.letters should display locale based equivalent of a-Z

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

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

Actually, in Python 2.x, string.letters *does* contain the letters based on the 
locale. Just make sure to call locale.setlocale.

--
nosy: +loewis

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-07-24 Thread Jörg Müller

Jörg Müller nex...@gmail.com added the comment:

I've merged the patch with the changes from Armin in issue9368.

--
type: feature request - behavior
Added file: http://bugs.python.org/file18176/patch.diff

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-07-24 Thread Jörg Müller

Changes by Jörg Müller nex...@gmail.com:


Removed file: http://bugs.python.org/file18175/patch.diff

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



[issue9368] Const-Correctness for Method Calls

2010-07-24 Thread Jörg Müller

Jörg Müller nex...@gmail.com added the comment:

Uhm, while I reported this Armin was faster than me :) However, I've merged our 
patches in issue9369.

--
nosy: +neXyon

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



[issue7900] posix.getgroups() failure on Mac OS X

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

2.7: r83124
2.6: r83126

The fix is now in all active branches, and I therefore close the issue.

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

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



[issue8792] xmlrpclib compatibility issues with Apache XML-RPC library

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

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

Can somebody please point to a current version of the Apache documentation? The 
link in msg106322 does not work anymore.

I'm tempted to close this as invalid: Apache is clearly violating the XML-RPC 
specification, so the bug is theirs.

As a work-around, adding this to dispatch in your own application seems like a 
good solution to me.

--

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



[issue7041] test_macostools fails on os x 10.6

2010-07-24 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
assignee:  - ronaldoussoren
components: +Macintosh

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



[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

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

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

I just noticed that I only need to strip the comma from the URL.

So I now see it's not an Apache bug, but explicitly marked as an extension. So 
I'm reclassifying this as a feature request. As a new feature, it can only go 
into 3.2.

Attila, Bhargav: is either of you interested in providing a patch?

--
priority: normal - low
title: xmlrpclib compatibility issues with Apache XML-RPC library - Support 
Apache extensions to XML-RPC in xmlrpclib
type: behavior - feature request
versions: +Python 3.3 -Python 2.6, Python 2.7, Python 3.1

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



[issue8798] tkinter build variants on OSX

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

We talked about this at the language summit at EuroPython 2010. We'll resolve 
the installer issue by moving the 64-bit capable installer to Tk 8.5 (with a 
minimal OSX version of 10.6). 

The 32-bit installer will still use Tk 8.4 because it needs to run on OSX 
10.3.9 and later, and that's they only version of Tk that is available 
everywhere as part of a system install.

I'm closing this issue because the proposed mechanism would only be truly 
useful as part of the OSX installer and that won't happen.

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

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



[issue9367] test_getgroups in test_posix fails

2010-07-24 Thread Darren Worrall

Darren Worrall d...@darrenworrall.co.uk added the comment:

After a quick chat with Ronald at the EP sprint he says the ordering didnt 
matter, so here's a quick patch to check only for deltas.

--
keywords: +patch
Added file: http://bugs.python.org/file18177/py3k-issue9367.diff

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



[issue4813] On OS-X the directories searched by setup.py for Tk are in the wrong order.

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This issue is no longer valid, the current search order from setup.py:


def detect_tkinter_darwin(self, inc_dirs, lib_dirs):
# The _tkinter module, using frameworks. Since frameworks are quite
# different the UNIX search logic is not sharable.
from os.path import join, exists
framework_dirs = [
'/Library/Frameworks',
'/System/Library/Frameworks/',
join(os.getenv('HOME'), '/Library/Frameworks')
]

sysroot = macosx_sdk_root()

This matches the order in which the linker searches.

--
resolution:  - out of date
stage: needs patch - committed/rejected
status: open - closed

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



[issue9335] LC_CTYPE system setting not respected by setlocale()

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

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

If an application uses .isalpha for a security-relevant check, this is a 
security issue in the application, not in Python.

--

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



[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-24 Thread Anthony Long

Anthony Long antl...@gmail.com added the comment:

I disagree. It's expected that the function will return valid data. This 
doesn't return valid data so isalpha() is compromised.

--

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



[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I agree with Martin that the security problem would be in the application, not 
python itself.

Testing with isalpha is generally not the right thing to do anyway, it is much 
better to restrict input to a know-good set of data, such as by using regular 
expressions.  For multi-byte encodings like UTF-8 you cannot rely on per-byte 
calls to isalpha anyway.  The situation is even worse for an encoding like 
Shift-JIS where you need context to know if a byte is part of a multi-byte 
value.

--

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



[issue9370] Add reader redirect from test package docs to unittest module

2010-07-24 Thread Nick Coghlan

New submission from Nick Coghlan ncogh...@gmail.com:

Brett updated the docs for the test package to (correctly) point out that it is 
our internal testing package and isn't subject to the same stringent backwards 
compatibility rules as the rest of the standard library.

A see also link pointing readers that have landed there over to the unittest 
module for their testing infrastructure needs would be a friendly thing to 
include.

--
assignee: d...@python
components: Documentation
keywords: easy
messages: 111450
nosy: d...@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add reader redirect from test package docs to unittest module
versions: Python 2.7, Python 3.2

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



[issue1560032] confusing error msg from random.randint

2010-07-24 Thread Petras Zdanavičius

Petras Zdanavičius petra...@gmail.com added the comment:

I have written a patch thats makes these strange error messages go away.
What actually I have done was something like this:

 randint = _inst.randint

Was replaced with:

 def randint(a, b):
return _inst.randint(a, b)

But I do not think it is worth to add additional stack frame just for error 
messages be a little more better.

--
keywords: +patch
nosy: +Petras.Zdanavičius
Added file: http://bugs.python.org/file18178/pseudo-fix-1560032.patch

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



[issue9197] Crash when importer an extension after Py_Initialize, Py_Finalize and Py_Initialize

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

(changing subject to better tell what this issue is about)

--
title: subprocess module causing crash - Crash when importer an extension 
after Py_Initialize, Py_Finalize and Py_Initialize

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



[issue1152248] Enhance file.readlines by making line separator selectable

2010-07-24 Thread Ralph Corderoy

Ralph Corderoy ralph-pythonb...@inputplus.co.uk added the comment:

fileLineIter() is not a solution that allows this bug to be closed, no.
readline() needs modifying and if that means python-dev discussion then
that's what it needs.  Things to consider include changing the record
separator as the file is read.

$ printf 'a b c\nd e f ' |
 awk '{print  $0 } NR == 1 {RS =  }'
a b c
d
e
f
$

--

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



[issue7041] test_macostools fails on os x 10.6

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

This issue was fixed in the repository a while back by disabling these tests on 
64-bit systems.

As Ned notes the code uses APIs that aren't available for 64-bit processes.

--
status: open - closed

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



[issue9368] Const-Correctness for Method Calls

2010-07-24 Thread Éric Araujo

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


--
resolution:  - duplicate
stage: patch review - committed/rejected
status: open - closed
superseder:  - const char* for PyObject_CallMethod and PyObject_CallFunction

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



[issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction

2010-07-24 Thread Éric Araujo

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


--
nosy: +aronacher
stage:  - commit review

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-24 Thread Mark Lawrence

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

I assume that this is on *nix boxes, on Windows it's:-

 quit
Use quit() or Ctrl-Z plus Return to exit
 exit
Use exit() or Ctrl-Z plus Return to exit

--
nosy: +BreamoreBoy

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



[issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.)

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

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

It seems that everybody now agrees to close this issue as won't fix.

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

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



[issue9335] LC_CTYPE system setting not respected by setlocale()

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

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

 I disagree. It's expected that the function will return valid data. This 
 doesn't return valid data so isalpha() is compromised.

What is valid data? The function (isalpha) should return a boolean, 
and it does. So the result is certainly valid.

The documentation says For 8-bit strings, this method is 
locale-dependent. So it is correct if it returns what the OS vendor says
to return.

--

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



[issue2454] sha and md5 fixer

2010-07-24 Thread Mark Lawrence

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

Can this be committed please.  In msg110796 I over-emphasised the technical 
aspects, the patch is actually against 2to3.

--

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



[issue7635] 19.6 xml.dom.pulldom doc: stub?

2010-07-24 Thread Mark Smith

Mark Smith mark.sm...@practicalpoetry.co.uk added the comment:

I have a patch that provides full documentation for pulldom, and adds sensible 
docstrings to the pulldom module. I have unfortunately created the patch on the 
py3k branch -- please let me know what I should do regarding porting these 
changes to Python 2.7.

--
keywords: +patch
nosy: +mark.smith
Added file: http://bugs.python.org/file18179/7635.patch

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



[issue2454] sha and md5 fixer

2010-07-24 Thread Éric Araujo

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

Minor nit: I suggest naming the fixer fix_hashlib, since the name fix_hash 
could easily be understood as something fixing __hash__ (even if such a fix is 
impossible for a machine to do).

This fix could also go into fix_imports, but it’s useful as a standalone fixer 
e.g. to run on code that drops 2.5 compatibility.

--
nosy: +merwok

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



[issue2927] expose html.parser.unescape

2010-07-24 Thread Mark Lawrence

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

msg110657 recommends close - wontfix.  Does anybody want this kept open or can 
it be closed?

--
status: open - pending

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



[issue2927] expose html.parser.unescape

2010-07-24 Thread Éric Araujo

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


--
nosy: +ezio.melotti, haypo
status: pending - open
versions: +Python 3.2 -Python 2.7

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



[issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The attached patch makes sure that os.path.join(sys.prefix, 'lib') isn't added 
to the link path when using a framework build.

This fixes the issue at hand in that I can then build a 3-way build of 2.7 when 
the default 32-bit is already installed. Without the patch _curses_panel fails 
to build because it tries to link to a 32-bit only library.

What I haven't done yet is check how this affects the script that builds the 
installer. That's the primary reason for not applying the patch at this time

--
keywords: +patch
versions: +Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file18180/setup.py.patch

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



[issue3704] cookielib doesn't handle URLs with / in parameters

2010-07-24 Thread Mark Lawrence

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

Can we have the patch committed to 2.7 and 3.1 please.

--

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



[issue4485] fast swap of default Windows python versions

2010-07-24 Thread Mark Lawrence

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

Hum, I think I spoke too soon.  @Brian: @Tim: what do you think about this?

--
nosy: +brian.curtin, tim.golden

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




[issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

The root cause of having the flags twice is that the Makefile explicitly sets 
LDFLAGS in the environment before when running setup.py, and that distutils 
appens the value of $(LDFLAGS) to $(LDSHARED) when LDFLAGS is set in the 
environment.

Line from the makefile:
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' 
OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;

And in Lib/distutils/ccompiler.py (in customize_compiler):

if 'LDFLAGS' in os.environ:
ldshared = ldshared + ' ' + os.environ['LDFLAGS']

A quick workaround to remove the duplicate flags is to explictly remove the 
related values from os.environ before calling main in setup.py:


# --install-platlib
if __name__ == '__main__':
import os
del os.environ['LDFLAGS']
main()

I've attached a patch that implements this behavior. I'm not 100% sure this is 
the right solution because sysconfig._parse_makefile also looks at the 
environment and it may be better to remove the code from 
ccompiler.customize_compiler instead.

--
keywords: +patch
nosy: +tarek
Added file: http://bugs.python.org/file18181/setup.py.patch

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



[issue6135] subprocess seems to use local 8-bit encoding and gives no choice

2010-07-24 Thread Mark Lawrence

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

In 2.7 and py3k test_subprocess has a class BaseTestCase which has a 
assertStderrEqual method.  These don't exist in 3.1.  I believe that the py3k 
code will need to be backported to 3.1.  Can this be done on this issue, or do 
we need a new one to keep things clean?

--

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



[issue9335] LC_CTYPE system setting not respected by setlocale()

2010-07-24 Thread Anthony Long

Anthony Long antl...@gmail.com added the comment:

The locale is set incorrectly though - so it is not valid data. Valid data is 
a-Z. nothing more nothing less, and the locale and the alphabet should not be 
changed.

--

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



[issue8938] Mac OS dialogs(Save As..., Load) translation

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

I don't think the Tk framework that is used by Tkinter is actually localized, 
but I don't know enough of Tcl/Tk to know for sure.

EasyDialogs isn't explicitly localized either, and I guess the system doesn't 
do automatic localization either because neither the embedded Python.app nor 
the framework are localized which makes the system assume that they are english 
only.

--

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



[issue9315] The trace module lacks unit tests

2010-07-24 Thread Eli Bendersky

Eli Bendersky eli...@gmail.com added the comment:

I'm attaching a file with some unit tests for Lib/trace.py module in Python 
2.7. Currently the unit tests check the API only, for line counting, func call 
counting and function caller relationships, because these can be tested through 
the API, without capturing stdout and resulting coverage files. All in all, 
these features are given a pretty good coverage.

I've named the file test_trace_module.py because test_trace.py hasn't yet been 
renamed in 2.7 and I don't want to get into the naming mess.

More tests can (and will) be added, but this is a start.

--
Added file: http://bugs.python.org/file18182/test_trace_module.py

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



[issue9167] argv double encoding on OSX

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Using the CF API to fetch the system encoding won't work:

Using PyObjC:
 CFStringConvertEncodingToIANACharSetName(CFStringGetSystemEncoding())
u'macintosh'

There doesn't seem to be another way to extract the prefered encoding from the 
system.

I see two possible resolutions for this issue:

* Close as won't fix
  This is technically a platform issue that has been fixed in OSX 10.5

* Add a workaround that explicitly sets os.environ['LANG'] to
  'en_US.UTF-8' before converting argument and environment values
  to Unicode (only on OSX  10.4, when LANG=C and of course resetting
  the previous value after conversion)

I have a 10.4 system I could develop this on, but that's currently in a 
different country than me.

--

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



[issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Ned: could you please check if the issue is present in Python 2.7?

I don't have access to machines that are capable of running OSX 10.3.

--

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



[issue6517] configparser: add possibility to escape formatstrings

2010-07-24 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. fdr...@acm.org added the comment:

We're in agreement; I was specifically adding weight to *not*
selecting the second optoin Łukasz Langa presented:

 2. We deprecate ConfigParser in the code and in the documentation.

--

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



[issue7635] 19.6 xml.dom.pulldom doc: stub?

2010-07-24 Thread Éric Araujo

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

Working off py3k is the thing to do. If the patch is trivial to apply to the 
other branches, the committer will probably use svnmerge to do it, else it may 
be useful to adapt your patch to 2.7. I’d recommend waiting for feedback before 
doing this.

--
assignee: georg.brandl - d...@python
nosy: +d...@python, merwok

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



[issue9371] pulldom doesn't provide END_DOCUMENT or COMMENT nodes.

2010-07-24 Thread Mark Smith

New submission from Mark Smith mark.sm...@practicalpoetry.co.uk:

I've been developing unit tests to increase the code coverage for pulldom, and 
have discovered that comments and end_document do not appear to result in 
events being obtained from the DOMEventStream.

I've attached a failing TestCase to demonstrate this.

--
components: XML
files: test_pulldom.py
messages: 111474
nosy: mark.smith
priority: normal
severity: normal
status: open
title: pulldom doesn't provide END_DOCUMENT or COMMENT nodes.
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file18183/test_pulldom.py

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



[issue9372] pulldom.DOMEventStream.__getitem__ is broken

2010-07-24 Thread Mark Smith

New submission from Mark Smith mark.sm...@practicalpoetry.co.uk:

DOMEventStream implements __getitem__, but ignores the index/key that is passed 
in and simply returns the next item from the stream. This is seriously 
unexpected behaviour.

I don't believe this functionality can be sensibly implemented in this class, 
and plan to submit a patch deprecating this method.

--
components: XML
messages: 111475
nosy: mark.smith
priority: normal
severity: normal
status: open
title: pulldom.DOMEventStream.__getitem__ is broken
versions: Python 3.2

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



[issue9373] pulldom has low code coverage

2010-07-24 Thread Mark Smith

New submission from Mark Smith mark.sm...@practicalpoetry.co.uk:

pulldom has poor code coverage, so I am currently implementing thorough unit 
tests for it.

--
components: XML
messages: 111476
nosy: mark.smith
priority: normal
severity: normal
status: open
title: pulldom has low code coverage
versions: Python 3.2

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



[issue9372] pulldom.DOMEventStream.__getitem__ is broken

2010-07-24 Thread Éric Araujo

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

You may want to keep existing functionality, this time in the proper method 
(__iter__).

--
nosy: +merwok
stage:  - unit test needed
type:  - behavior

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



[issue4199] add shorthand global and nonlocal statements

2010-07-24 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
versions: +Python 3.3 -Python 3.2

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



[issue4485] fast swap of default Windows python versions

2010-07-24 Thread Brian Curtin

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

msg77014 could bring startup time down significantly so I'm -1 on that.

Overall I've never found difficulty in running scripts with the right version 
so I don't have a strong enough opinion on any of it. I think it's probably 
something which should be baked in python-ideas for a while to get a wider 
audience to think about it.

--

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



[issue9372] pulldom.DOMEventStream.__getitem__ is broken

2010-07-24 Thread Mark Smith

Mark Smith mark.sm...@practicalpoetry.co.uk added the comment:

I should have mentioned: __iter__ is already implemented, and works as expected.

--

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



[issue9367] test_getgroups in test_posix fails

2010-07-24 Thread Ronald Oussoren

Changes by Ronald Oussoren ronaldousso...@mac.com:


--
assignee:  - ronaldoussoren
nosy: +ronaldoussoren

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



[issue9365] Installing a distro without sqlite3 will require a reinstall of python to function if installed at a later date

2010-07-24 Thread R. David Murray

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

This is not a bug in Python.  Your link implies you are building things from 
scratch, so it is your responsibility to resolve the dependencies.

sqlite3 support is implemented via an extension module (compiled C code).  That 
extension module must be built against sqlite3.  If you don't have sqlite3 
installed, the extension can't be built (which the Python build process tells 
you in the summary at the end).  If you later install sqlite3, there's no way 
the extension module to get automatically compiled.  You have to do it, as you 
discovered.

On systems with a package manager, the sqlite3 dependency would be 
automatically resolved.  Unless you told the system to build without sqlite, in 
which case it would again be your responsibility to reinstall python after 
changing your mind.

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

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



[issue9367] test_getgroups in test_posix fails

2010-07-24 Thread Ronald Oussoren

Ronald Oussoren ronaldousso...@mac.com added the comment:

Committed a fix in:

3.2: r83133
3.1: r83134
2.7: r83135
2.6: r83136

I ended up committing a slightly different patch than attached here, the test 
now calls sorted to sort both lists before comparing, which IMO makes it 
slightly clearer.

--
resolution:  - accepted
stage:  - committed/rejected
status: open - pending
type:  - behavior

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



[issue9277] test_struct failure on ARM

2010-07-24 Thread Mark Dickinson

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


--
status: pending - closed

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



[issue9367] test_getgroups in test_posix fails

2010-07-24 Thread R. David Murray

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

Except for the 2.6 backport, you could also have used assertItemsEqual, which 
is a smart wrapper around the idiom you implemented.

--
nosy: +r.david.murray
status: pending - open

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



[issue9367] test_getgroups in test_posix fails

2010-07-24 Thread R. David Murray

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


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

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-24 Thread Alexander Belopolsky

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

 I assume that this is on *nix boxes

It's a bit of a stretch to call OSX unix, but yes:

 Laptop = a MacBook Air

If you have not seen one of these, the control key is marked control on its 
keyboard.

--

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



[issue9362] Make exit/quit hint more novice friendly

2010-07-24 Thread Alexander Belopolsky

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

Now, as I look at it, the windows message is probably even worse.  What is 
plus?  Is Ctrl-Z control *minus* z?

For a novice, you really have to say: press Ctrl and Z keys together and then 
press Return or Enter key.  Of course this longer phrase is not appropriate for 
the exit hint.

--

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



[issue9336] string.letters should display locale based equivalent of a-Z

2010-07-24 Thread R. David Murray

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

Ah, right.  I was misled by examples from another ticket and did not verify.

--

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



[issue9371] pulldom doesn't provide END_DOCUMENT or COMMENT nodes.

2010-07-24 Thread Éric Araujo

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

I tried looking at the doc to see if this was by design, and well, pulldom docs 
:) So I looked at the code, same thing, and finally read the commit history. It 
appears that pulldom is supposed to be DOM-compliant, so go ahead in adding 
unit tests for that and fixing it.

--
nosy: +merwok

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



[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Hm. This seems an old bug, probably introduced when closures where first 
introduced (2.1 ISTR, by Jeremy Hylton).

Class scopes *do* behave differently from function scopes; outside a nested 
function, this should work:

x = 1
class C(object):
  x = x
assert X.x == 1

And I think it should work that way inside a function too.

So IMO the bug is that in classes Test and Test3, the x defined in the function 
scope is not used.  Test2 shows that normally, the x defined in the inner scope 
is accessed.

So, while for *function scopes* the rules are if it is assigned anywhere in 
the function, every reference to it references the local version, for *class 
scopes* (outsided methods) the lookup rules are meant to be dynamic, meaning 
if it isn't defined locally yet at the point of reference, use the next outer 
definition.

I haven't reviewed the patches.

--

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



[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

I meant, of course,

assert C.x == 1

--

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



[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

2010-07-24 Thread Bhargav

Bhargav bhar...@bluejeansnet.com added the comment:

What I do is not a possible solution, because some other machine might add 
e:nil, what we need is XML namespace parsing.

Also I can't really use my solution, as it makes my client non-portable, I cant 
move it from my dev machine to production at all.

This is just a workaround so that I am not stuck at ex:nil for my development.

I am not an expert in xmlrpc nor in python to really contribute a patch, but if 
I could really do think of something, I will contribute it.

Having said that, I know for sure the server works for Java clients and I have 
heard it works for .Net.

I know this is not a standard, but a widely used and published extension, and 
hence I think we should atleast port it back to the 2.7 branch as not everyone 
has moved to python 3 yet.

--

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2010-07-24 Thread Mark Lawrence

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

@Art: @David: A lot of changes have been made to test_zipfile since the last 
patch was produced.  I'm unsure as to whether the patch could be applied to 2.7 
as is, or it would be simpler to rework the patch for 2.7 and the py3k 
branches.  Could one of you take a look please, thanks.

--
nosy: +BreamoreBoy

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



[issue7825] test_threadsignals leaks references

2010-07-24 Thread Mark Lawrence

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

The patch is small and easily applied, but no point me trying it as I've only a 
Windows box.  Also note that my earlier comment was incorrect as I misread the 
original post.

--

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



[issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values

2010-07-24 Thread Mark Lawrence

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

minidom.patch had the new file listed before the old, so I've uploaded 
minidom.diff.  The patch is tiny and looks clean.  Tests have been repeated on 
Windows against 2.7 and are fine, so I believe this can be committed.

--
Added file: http://bugs.python.org/file18184/minidom.diff

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



[issue1672568] silent error in email.message.Message.get_payload

2010-07-24 Thread Mark Lawrence

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

I've double checked this and still all tests pass before patching message.py.  
Could somebody else please pick this one up, thanks.

--

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



[issue7113] ConfigParser load speedup

2010-07-24 Thread Mark Lawrence

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

@Łukasz: I patched the unit test file only and ran it and all tests passed, I 
assume that this behaviour is incorrect.

--
nosy: +BreamoreBoy
stage:  - patch review

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



[issue4686] Exceptions in ConfigParser don't set .args

2010-07-24 Thread Mark Lawrence

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

Tests failed after patching test file, all passed after patching the code on 
Windows against 3.2.  The patch looks simple and clean so I don't see why it 
can't be committed.  As this is a behaviour issue the code should also be 
backported.

--
nosy: +BreamoreBoy
stage:  - patch review
versions: +Python 2.7, Python 3.1

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



[issue7113] ConfigParser load speedup

2010-07-24 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Thanks, Mark. The tests should pass for both the old version and the patched 
one. 

The change in the code involves performance, not functionality. I didn't want 
to set assertions that are time based so naturally the new test also runs on 
the old implementation. The thing is that it runs slower.

--

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



[issue4686] Exceptions in ConfigParser don't set .args

2010-07-24 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Thanks, Mark. Should I do the backporting or do you have some 
technology/process for this?

I can do the backport as well if it doesn't require SVN commit access. I would 
need some help because it would be my first backport :)

--

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



[issue4686] Exceptions in ConfigParser don't set .args

2010-07-24 Thread Mark Lawrence

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

Łukasz, no problem.  It would be my first backport too! :) I think that it's 
best left to the committers as they've well used to doing things like this.

--

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



[issue7113] ConfigParser load speedup

2010-07-24 Thread Mark Lawrence

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

Łukasz in that case I think we should get this committed as the patch is small 
and looks clean.  I assume that this will be backported as 2.7 and 3.1 are 
likely to be around for some years yet.

--

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



[issue1682942] ConfigParser support for alt delimiters

2010-07-24 Thread Mark Lawrence

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

Łukasz please attach your patch and I'll run with it, while you're at it could 
you also provide a unit test patch for #5412, thanks.

--

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



[issue1706039] Added clearerr() to clear EOF state

2010-07-24 Thread Mark Lawrence

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

Could somebody with an OS X system please try out the py3k patch, thanks.

--

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



[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson

David Watson bai...@users.sourceforge.net added the comment:

Unit tests were in the patch!  However, none of the patches
applied any more, so I've updated them and also improved the
tests a bit.  Again, I haven't tried them on Windows.

Unsetting a nonexistent variable isn't supposed to be an error
(see POSIX), but I did find a different problem with checking
unsetenv()'s return value, which is that older systems declare it
as void.  I've removed the check from the patch, mainly because I
don't know how to write the appropriate autoconf test, but it
isn't strictly necessary as long as putenv() can't set a name
that unsetenv() can fail to remove.

I did however find one more case where that can happen, which is
with an environment variable that has an empty name.  Linux at
least allows such variables to be set and passed to new
processes, but its unsetenv() will not remove them - the latter
behaviour is required by POSIX.

To avoid a use-after-free problem similar to the embedded-'='
one, I've made a separate patch to make putenv() raise ValueError
for empty names as well, but it's a more awkward case as Python
may receive such a variable on startup, which it would then be
unable to change (although even without the patch, it's already
unable to remove it - posix.unsetenv() just silently fails).

Checking unsetenv()'s return value would avoid the use-after-free
without having to change putenv(), but it would, for example,
make os.environ.clear() fail if an empty-named variable was
present - which would be correct, since the variable was not
removed, but rather surprising.  To really delete such a variable
would require editing **environ directly, AFAIK.

--
Added file: http://bugs.python.org/file18185/putenv-equals-2.x.diff

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



[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson

Changes by David Watson bai...@users.sourceforge.net:


Added file: http://bugs.python.org/file18186/putenv-empty-2.x.diff

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



[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson

Changes by David Watson bai...@users.sourceforge.net:


Added file: http://bugs.python.org/file18187/putenv-equals-3.x.diff

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



[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson

Changes by David Watson bai...@users.sourceforge.net:


Added file: http://bugs.python.org/file18188/putenv-empty-3.x.diff

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



[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson

Changes by David Watson bai...@users.sourceforge.net:


Added file: http://bugs.python.org/file18189/visibility-2.x.diff

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



[issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked

2010-07-24 Thread David Watson

Changes by David Watson bai...@users.sourceforge.net:


Added file: http://bugs.python.org/file18190/visibility-3.x.diff

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



[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

2010-07-24 Thread R. David Murray

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

Well, you could try applying the patch and see if it applies cleanly and passes 
the tests.  But it would be helpful to have it reworked for py3k, since we now 
commit first to py3k and then backport to 2.7.

I have not reviewed the updated patch.

--

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



[issue2001] Pydoc interactive browsing enhancement

2010-07-24 Thread Alexander Belopolsky

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

Hmm.  Still no luck


$ ./python.exe -m pydoc -g
Server ready at: http://localhost:7464/
Segmentation fault


The Segmentation fault happens after I enter pydoc in the search window and 
press the Search! button.

BTW, please remove !'s from the labels.

--

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



[issue2001] Pydoc interactive browsing enhancement

2010-07-24 Thread Alexander Belopolsky

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

OK, the crash is due to issue9319, but as far as I understand, the faulty code 
is in the error handling branch, so there must be a bug in your code as well.

--

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



[issue7635] 19.6 xml.dom.pulldom doc: stub?

2010-07-24 Thread Terry J. Reedy

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

Thank you for the patch. I can now imagine using the module. Comments:

+   :synopsis: Iterative XML parsing with DOM nodes.
seem a bit too terse and confusing. Would

+   :synopsis: Iterative parsing of XML to event, DOM node pairs, with option 
subtree creation.

be accurate?

-.. class:: PullDOM(documentFactory=None)
-   :class:`xml.sax.handler.ContentHandler` implementation that ...

I was expecting this to be filled out with the methods of PullDOM. But you new 
docstring
+A ContentHandler that is used internally by :class:`DOMEventStream` to
+provide an iterator over the nodes in an XML stream. This class would not
+normally be used directly - its main responsibility is to produce DOM
+nodes from SAX events.

suggests that it is sufficiently private that it should not be documented at 
all, and that anyone who wanted to use it directly should either try 
help(pullDom) or read the code. Correct?

I am not sure of the standard for when to document or not helper classes, so I 
will leave this question to a doc person.

\ No newline at end of file
Is this a message from diff to add one?
--

The py3k branch is now trunk. Most applicable patches should be developed on 
that branch and then possibly backported. The current pullDOM page is useless, 
so this should be backported. Since the docs appear to have been untouched 
since the beginning, the manual page, at least, should apply directly.

To go into 2.6.6, the final 2.6 bugfix release, a patch needs be applied by the 
end of July. So consider my first and third comments first and a possible minor 
update. I would recommend that for commit/review for at least 2.6.

--
stage:  - patch review
type:  - behavior

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



[issue7830] Flatten nested functools.partial

2010-07-24 Thread Alexander Belopolsky

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

 FWIW, I agree with Antoine. You cannot know in advance whether a
 partial-subclass has semantics that need to be preserved when
 flattening.


Raymond,

I have actually conceded this point to Antoine.  See msg108980 above.  Not only 
the latest patch preserves partial-subclasses, it also foregoes the 
optimization if there is anything in __dict__ of the inner partial.

It looks like we have a consensus on the features, the remaining question is 
whether this is enough of an optimization to justify adding extra code.

--

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



[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Terry J. Reedy

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

Guido clarified:
 Class scopes *do* behave differently from function scopes;
 outside a nested function, this should work:
 x = 1
 class C(object):
   x = x
 assert C.x == 1
 And I think it should work that way inside a function too.

I take that to mean that

x = 0
def f()
  x = 1
  class C(object):
x = x
  assert C.x == 1
f()

should work, meaning that C.x==0 and UnboundLocalError are both wrong.

That would mean to me that in The class’s suite is then executed in a new 
execution frame (see section Naming and binding), using a newly created local 
namespace and the original global namespace. the phrase the original global 
namespace should be changed to the surrounding namespaces.

I also think this from Guido

So, while for *function scopes* the rules are if it is assigned anywhere in 
the function, every reference to it references the local version, for *class 
scopes* (outsided methods) the lookup rules are meant to be dynamic, meaning 
if it isn't defined locally yet at the point of reference, use the next outer 
definition.

should somehow also be clearer, probably also in the class page, so that people 
will neither expect an UnboundLocalError.

--

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



[issue2001] Pydoc interactive browsing enhancement

2010-07-24 Thread Ron Adam

Ron Adam ron_a...@users.sourceforge.net added the comment:

Ok, on the ! marks.

The Segmentation fault exits python and isn't catchable as far as I know. It's 
happens in the compiled tokenize.c file. The python side error detection 
doesn't get a chance to catch it.

The problem is present without the patch applied and when using the console 
help so it wasn't anything I did.  I could use a hack to bypass that particular 
file, but I don't think that is the correct answer to this particular problem.  
Better to get that issue resolved first.

--

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



[issue9374] urlparse should parse query and fragment for arbitrary schemes

2010-07-24 Thread Nick Welch

New submission from Nick Welch mackst...@gmail.com:

While the netloc/path parts of URLs are scheme-specific, and urlparse can be 
forgiven for refusing to parse them for unknown schemes, the query and fragment 
parts are standardized, and should be parsed for unrecognized schemes.

According to Wikipedia:
--
Internet standard STD 66 (also RFC 3986) defines the generic syntax to be used 
in all URI schemes. Every URI is defined as consisting of four parts, as 
follows:
scheme name : hierarchical part [ ? query ] [ # fragment ]
--
http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax


Here is a demonstration of what urlparse currently does:

 urlparse.urlsplit('myscheme://netloc/path?a=b#frag')
SplitResult(scheme='myscheme', netloc='', path='//netloc/path?a=b#frag', 
query='', fragment='')

 urlparse.urlsplit('http://netloc/path?a=b#frag')
SplitResult(scheme='http', netloc='netloc', path='/path', query='a=b', 
fragment='frag')

--
components: Library (Lib)
messages: 111511
nosy: Nick.Welch
priority: normal
severity: normal
status: open
title: urlparse should parse query and fragment for arbitrary schemes
type: behavior
versions: Python 2.6

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



[issue9226] erroneous behavior when creating classes inside a closure

2010-07-24 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

On Sat, Jul 24, 2010 at 3:21 PM, Terry J. Reedy rep...@bugs.python.org wrote:

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

 Guido clarified:
 Class scopes *do* behave differently from function scopes;
 outside a nested function, this should work:
 x = 1
 class C(object):
   x = x
 assert C.x == 1
 And I think it should work that way inside a function too.

 I take that to mean that

 x = 0
 def f()
  x = 1
  class C(object):
    x = x
  assert C.x == 1
 f()

 should work, meaning that C.x==0 and UnboundLocalError are both wrong.

Indeed.

 That would mean to me that in The class’s suite is then executed in a new 
 execution frame (see section Naming and binding), using a newly created local 
 namespace and the original global namespace. the phrase the original global 
 namespace should be changed to the surrounding namespaces.

Those words sound like they were never revised since I wrote them for
Python 0.9.8 or so...

 I also think this from Guido

 So, while for *function scopes* the rules are if it is assigned anywhere in 
 the function, every reference to it references the local version, for *class 
 scopes* (outsided methods) the lookup rules are meant to be dynamic, meaning 
 if it isn't defined locally yet at the point of reference, use the next 
 outer definition.

 should somehow also be clearer, probably also in the class page, so that 
 people will neither expect an UnboundLocalError.

FWIW, unless something drastically changed recently, the language
reference is likely out of date in many areas. I would love it if a
team of anal retentive freaks started going through it with a fine
comb so as to make it describe the state of the implementation(s) more
completely.

--

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



[issue8792] Support Apache extensions to XML-RPC in xmlrpclib

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

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

Adding it to 2.7 is really out of the question. Assuming somebody would 
implement (which might not happen in the next three years or so), it can only 
go into 3.x, so you'ld have to port your code to 3.x to use it.

--

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



[issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress File exists exception.

2010-07-24 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com added the comment:

I suggest to raise exception when target regular file exists:

try:
mkdir(name, mode)
except OSError as e:
if not (exist_ok and e.errno == errno.EEXIST and path.isdir(name)):
raise

--

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



[issue9299] os.makedirs(): Add a keyword argument to suppress File exists exception

2010-07-24 Thread Arfrever Frehtes Taifersar Arahesis

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


--
title: os.mkdir() and os.makedirs() add a keyword argument to suppress File 
exists exception. - os.makedirs(): Add a keyword argument to suppress File 
exists exception

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



[issue8340] bytearray undocumented on trunk

2010-07-24 Thread ipatrol

ipatrol ipatrol6...@yahoo.com added the comment:

Yeah, I'll say. I prefer bytearray to back-and-forth mapping with chr and ord. 
I use it particularly as a mid-step in working with binary representations of 
strings. Please backport these docs with changes reflecting 2.x's paradigms.

--
nosy: +ipatrol
type: behavior - feature request

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



  1   2   >