[issue7639] bdist_msi fails on files with long names

2010-07-23 Thread Craig McQueen

Changes by Craig McQueen pyt...@craig.mcqueen.id.au:


--
nosy: +cmcqueen1975

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



[issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True

2010-07-23 Thread Chris Rebert

Chris Rebert pyb...@rebertia.com added the comment:

I found some extra time. Here's an initial suggested patch against py3k head.

Disclaimer: I have no special expertise in computer security beyond having read 
Secure Coding: Principles and Practices a while back.

--
keywords: +patch
Added file: http://bugs.python.org/file18136/subprocess.rst.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7950
___
___
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-23 Thread Martin v . Löwis

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

I fail to see the bug in this report. '\xff' is a letter because the C library 
says it is. If you think the result is wrong, file a bug report with the OS 
vendor.

--
nosy: +loewis

___
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



[issue9264] trace.py documentation is incomplete

2010-07-23 Thread Eli Bendersky

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

Attaching a patch vs. the 2.6 maintenance branch for the Doc/library/trace.rst 
file

* Fixed some formatting issues for command line options and class references
* Documented all relevant user-accessible methods
* Divided command-line options logically into sub-sections and improved their 
explanations

I ran `make html` from the Doc/ directory and made sure the HTML looks OK

--
Added file: http://bugs.python.org/file18137/issue9262.py26.patch

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



[issue9193] Versioned .so files

2010-07-23 Thread Barry A. Warsaw

Barry A. Warsaw ba...@python.org added the comment:

I'd love it if Windows was also supported, but right now I don't have the 
cycles to make and test the changes, or the expertise to understand any related 
Windows issues.  I've mentioned this in PEP 3149, and I'd happily accept code 
and PEP updates for Windows.

--

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



[issue839159] iterators broken for weak dicts

2010-07-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

It looks like this issue has been fixed in issue7105 already. Can we close this 
ticket?

--

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



[issue3526] Customized malloc implementation on SunOS and AIX

2010-07-23 Thread Sébastien Sablé

Sébastien Sablé sa...@users.sourceforge.net added the comment:

Well I am still interested in getting this patch officially integrated in 
Python.

This patch is integrated in the version of Python that we deploy to our 
customers with our products (Sungard GP3). So it runs in production at various 
clients sites (some European banks with massive SunOs and AIX servers running 
thousands of sessions of our application) and it has provided some huge memory 
consumption improvements.

The problem appears quite obviously when you run a relatively big application 
on SunOS or AIX: if you allocate some memory in a Python process at some stage, 
this memory will never be released to the system until you leave that process, 
even if that memory is not used by Python anymore.
With my patch, the process can actually release the memory to the system so 
that it can be used by other processes.

Linux is not impacted by this problem because the GNU libc implements the same 
memory allocation mechanism based on dlmalloc.

I guess there are not that many people running Python applications with a big 
memory footprint on AIX or SunOS, otherwise this problem would be more popular.

--

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



[issue839159] iterators broken for weak dicts

2010-07-23 Thread Mark Dickinson

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

It's not yet fixed in 2.7 or 2.6.  Updating versions.

--
nosy: +mark.dickinson
versions: +Python 2.6 -Python 3.1, Python 3.2

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



[issue839159] iterators broken for weak dicts

2010-07-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

We might as well backport Antoine's patch rather than take this one (even if 
mine for 2.x already). It would be weird to have 2 wildly different patches to 
solve the same problem.

Maybe close this ticket and flag issue7105 for backporting?

--

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



[issue839159] iterators broken for weak dicts

2010-07-23 Thread Mark Dickinson

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

Agreed.

--
resolution:  - duplicate
status: open - closed
superseder:  - weak dict iterators are fragile because of unpredictable GC runs

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



[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2010-07-23 Thread Mark Dickinson

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

The issue still exists in 2.6 and 2.7.

Closing issue 839159 as a duplicate of this one.

--
nosy: +mark.dickinson
resolution: fixed - 
stage: committed/rejected - 
status: closed - open
versions: +Python 2.6, Python 2.7 -Python 3.1, Python 3.2

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



[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2010-07-23 Thread Mark Dickinson

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


--
nosy: +BreamoreBoy, ajaksu2, dcjim, elachuni, tseaver, vdupras

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



[issue4047] test_run_abort triggers CrashReporter on MacOS X

2010-07-23 Thread Ronald Oussoren

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

Committed a fix in r83067 (py3k), will backport to other active branches 
shortly.

--
versions:  -Python 3.2

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



[issue2734] 2to3 converts long(itude) argument to int

2010-07-23 Thread Peter

Changes by Peter p.j.a.c...@googlemail.com:


--
nosy: +maubp

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



[issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings

2010-07-23 Thread Peter

Changes by Peter p.j.a.c...@googlemail.com:


--
nosy: +maubp

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



[issue6095] os.curdir as the default argument for os.listdir

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

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

At Europython, we agreed that this functionality is too trivial to add to the 
standard library; for all practical purposes, os.listdir(.) will do the right 
thing.

So rejecting this as won't fix.

--
nosy: +loewis
resolution:  - wont fix
status: open - closed

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



[issue9073] Tkinter module missing from install on OS X 10.6.4

2010-07-23 Thread Ronald Oussoren

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

As Ned noted Tkinter is named tkinter in py3k.

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

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



[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

If I understand the patch correctly, this patch basically add a test for 
relative imports. I'm pretty sure this is already testes in importlib.test. 
Brett, am I right?

If yes, there's no point in applying this patch.

--
nosy: +vdupras

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



[issue7895] Mac 10.6 mac_ver() crashes with USING_FORK_WITHOUT_EXEC_IS _NOT_SUPPORTED_BY_FILE_MANAGER

2010-07-23 Thread Ronald Oussoren

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


--
keywords: +easy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7895
___
___
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-23 Thread Richard Jones

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

After discussing with core devs at the EuroPython sprint I will implement a 
different approach: new attributes with the old, private attributes implemented 
as properties over the new attributes. The properties responsible for this will 
raise PendingDeprecationWarnings.

I'll also be improving (well, *implementing*) test coverage for the module 
while I'm at it.

--

___
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



[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Brett Cannon

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

Yes, importlib has tests for relative import, but those are only run against 
importlib and not __import__. Adding Skip's tests and seeing how they differ 
from what importlib.test.import_.test_relative_imports would be good.

--

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



[issue5120] Disabling test_ttk_guionly on mac

2010-07-23 Thread Ronald Oussoren

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

This is still an issue for the PPC Tiger buildbot:

test_ttk_guionly
make: *** [buildbottest] Segmentation fault

(Direct link: 
http://www.python.org/dev/buildbot/builders/PPC%20Tiger%202.7/builds/39/steps/test/logs/stdio)

--

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

what do you mean by 'too trivial' ?

I don't understand why this is now suddenly rejected. Raymond, Guido, and other 
people have +1 this on python-ideas.

http://mail.python.org/pipermail/python-ideas/2009-May/004871.html

People have worked on a patch, so I think this is unfair to close it now 
without more explanations, and just say that 'we agreed at EP'...

--
nosy: +gvanrossum

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



[issue9337] Make float.__str__ behave identically to float.__repr__

2010-07-23 Thread Mark Dickinson

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

Proposal:  make the str of a float (or complex number) identical to the repr of 
a float (or complex number), in Python 3.2.  This idea came up a couple of 
times at EuroPython, and generally met with approval.

An open question: what should be done on platforms that don't support the short 
float repr?  In practice, I don't think this matters too much:  it's difficult 
to find such platforms.  The simplest thing to do would be to make __str__ 
identical to __repr__ on all platforms.

This change *will* inevitably break code;  the question is whether this level 
of breakage is acceptable for 3.1 - 3.2.

I'll also bring this up on the python-dev mailing list.

--
assignee: mark.dickinson
components: Interpreter Core
messages: 111268
nosy: eric.smith, mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: Make float.__str__ behave identically to float.__repr__
type: feature request
versions: Python 3.2

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Éric Araujo

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


--
nosy: +merwok

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



[issue6095] os.curdir as the default argument for os.listdir

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

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

ok, so reopening. Linking to the mailing list would have helped.

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

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



[issue9338] argparse optionals with nargs='+' can't be followed by positionals

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[From the old argparse tracker: 
http://code.google.com/p/argparse/issues/detail?id=20]

You can't follow a nargs='+' optional argument with a positional argument:

 import argparse
 parser = argparse.ArgumentParser(prog='PROG')
 parser.add_argument('--badger', nargs='+')
 parser.add_argument('spam')
 parser.parse_args('--badger A B C D'.split())
usage: PROG [-h] [--badger BADGER [BADGER ...]] spam
PROG: error: too few arguments

Ideally, this should produce:

 parser.parse_args('--badger A B C D'.split())
Namespace(badger=['A', 'B', 'C'], spam='D')

The problem is that the nargs='+' causes the optional to consume all the 
arguments following it, even though we should know that we need to save one for 
the final positional argument.

A workaround is to specify '--', e.g.:

 parser.parse_args('--badger A B C -- D'.split())
Namespace(badger=['A', 'B', 'C'], spam='D')

The problem arises from the fact that argparse uses regular-expression style 
matching for positional arguments, but it does that separately from what it 
does for optional arguments.

One solution might be to build a regular expression of the possible things a 
parser could match. So given a parser like::

  parser = argparse.ArgumentParser()
  parser.add_argument('-w')
  parser.add_argument('-x', nargs='+')
  parser.add_argument('y')
  parser.add_argument('z', nargs='*')

the regular expression might look something like (where positionals have been 
replaced by the character A)::

  (-w A)? (-x A+)? A (-w A)? (-x A+)? A* (-w A)? (-x A+)?

Note that the optionals can appear between any positionals, so I have to repeat 
their regular expressions multiple times. Because of this, I worry about how 
big the regular expression might grow to be for large parsers. But maybe this 
is the right way to solve the problem.

--
messages: 111270
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse optionals with nargs='+' can't be followed by positionals
type: feature request

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



[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-07-23 Thread Steve Holden

Steve Holden st...@holdenweb.com added the comment:

With the 2.7 release now completed should we close this issue? There's nothing 
to be done about the 2.6 issue.

--
nosy: +holdenweb

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



[issue9338] argparse optionals with nargs='+' can't be followed by positionals

2010-07-23 Thread Éric Araujo

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


--
resolution:  - duplicate
stage: needs patch - committed/rejected
status: open - closed
superseder:  - argparse does not accept options taking arguments beginning 
with dash (regression from optparse)

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Yes, sorry. I should have added the link when I opened the bug. Thanks for 
reopening it

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

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Tarek Ziadé

Changes by Tarek Ziadé ziade.ta...@gmail.com:


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

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



[issue9173] logger statement not guarded in shutil._make_tarball

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

Changes by Fred L. Drake, Jr. fdr...@acm.org:


--
nosy: +tarek

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Tarek Ziadé

Changes by Tarek Ziadé ziade.ta...@gmail.com:


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

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

reopening again sorry (roundup bug)

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

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



[issue8118] PYTHON_API_VERSION needs to be bumped?

2010-07-23 Thread Ronald Oussoren

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

I agree, this issue can be closed as there's nothing useful we can do at this 
point in time.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

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



[issue9275] python 2.7 OS X installer no longer installs /usr/local/bin symlinks by default

2010-07-23 Thread Ronald Oussoren

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

Fixed in r83070, NEWS update in r83071.

--
resolution:  - fixed
stage:  - committed/rejected
type:  - behavior

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



[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

Because importlib is already well tested and that it already has the machinery 
to test __import__ instead of the importlib code, I suggest that we re-use 
importlib's relative tests instead.

Attached is a patch that does this. I made sure that __import__ was actually 
called.

--
Added file: http://bugs.python.org/file18138/issue8392.diff

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



[issue8123] TypeError in urllib when trying to use HTTP authentication

2010-07-23 Thread Dmitry Jemerov

Dmitry Jemerov intelliy...@gmail.com added the comment:

Patch (with unittest) attached.

--
keywords: +patch
Added file: http://bugs.python.org/file18139/8123.patch

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



[issue9275] python 2.7 OS X installer no longer installs /usr/local/bin symlinks by default

2010-07-23 Thread Ronald Oussoren

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


--
status: open - closed

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



[issue9339] threading is_alive documnetation is unclear

2010-07-23 Thread Brian Brazil

New submission from Brian Brazil brian.bra...@gmail.com:

http://docs.python.org/py3k/library/threading.html

Roughly, a thread is alive from the moment the start() method returns until 
its run() method terminates.

Using Roughly in relation to threading is a bit unspecific. I've had a look 
through _bootstrap_inner() and attached a patch to clarify this.

--
assignee: d...@python
components: Documentation
files: threading-roughly-doc-fix.patch
keywords: patch
messages: 111278
nosy: bbrazil, d...@python
priority: normal
severity: normal
status: open
title: threading is_alive documnetation is unclear
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file18140/threading-roughly-doc-fix.patch

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



[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2010-07-23 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Note that the negative number heuristic you're complaining about doesn't 
actually affect your code below. The negative number heuristic is only used 
when you have some options that look like negative numbers. See the docs for 
more information:

http://docs.python.org/library/argparse.html#arguments-containing

Your problem is that you want --safe to be treated as a positional argument 
even though you've declared it as an option. Basically there are two reasonable 
interpretations of this situation. Consider something like --conf-file 
--safe. Either the user wants a conf file named --safe, or the user 
accidentally forgot to type the name of the conf file. Argparse assumes the 
latter, though either one is conceivable. Argparse assumes the latter because, 
while it occasionally throws an unnecessary exception, the other behavior would 
allow an error to pass silently.

I'm definitely opposed to changing the default behavior to swallow some errors 
silently. If you'd like to propose an API for enabling such behavior explicitly 
and supply a patch and tests implementing it, I'll be happy to review it though.

--

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



[issue9338] argparse optionals with nargs='+' can't be followed by positionals

2010-07-23 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

This is definitely a different bug from the one you just marked it as a 
duplicate of.

--
resolution: duplicate - 
stage: committed/rejected - needs patch
status: closed - open
superseder: argparse does not accept options taking arguments beginning with 
dash (regression from optparse) - 

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



[issue9339] threading is_alive documnetation is unclear

2010-07-23 Thread Brian Brazil

Changes by Brian Brazil brian.bra...@gmail.com:


Removed file: http://bugs.python.org/file18140/threading-roughly-doc-fix.patch

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



[issue9339] threading is_alive documnetation is unclear

2010-07-23 Thread Brian Brazil

Brian Brazil brian.bra...@gmail.com added the comment:

Here's a slightly cleaner version.

--
Added file: http://bugs.python.org/file18141/threading-roughly-doc-fix.patch

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



[issue9338] argparse optionals with nargs='+' can't be followed by positionals

2010-07-23 Thread Éric Araujo

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

I read too fast, I’m sorry for that.

--
nosy: +merwok

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



[issue6878] changed return type from tkinter.Canvas.coords

2010-07-23 Thread Petras Zdanavičius

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

I have added tests.

--
nosy: +Petras.Zdanavičius
Added file: http://bugs.python.org/file18142/fix-6878-with-tests.patch

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



[issue6878] changed return type from tkinter.Canvas.coords

2010-07-23 Thread Éric Araujo

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

Looks good to me. Thanks!

--

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



[issue9340] argparse parse_known_args does not work with subparsers

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[Moved from http://code.google.com/p/argparse/issues/detail?id=45]

If you try to use parse_known_args and you have a subparser, the subparser will 
still complain if it sees extra arguments:

 parser = argparse.ArgumentParser()
 subparsers = parser.add_subparsers()
 subparsers.add_parser('A')
 parser.parse_known_args(['A', '--foo', 'b'])
usage:  A [-h]
 A: error: unrecognized arguments: --foo b

What should be returned is probably:

 parser.parse_known_args(['A', '--foo', 'b'])
(Namespace(), ['--foo', 'b'])

The problem is that subparsers don't know whether they're being called by 
parse_args() or parse_known_args(). I see a few possible fixes:

* Add another argument to Action.__call__ that indicates what method is being 
called. But that would break any existing subclasses.

* Do some stack inspection using sys._getframe(). But that's not guaranteed to 
work on other implementations of Python.

* When parse_args is called, set some flag on the subparsers object that causes 
it to call parse_known_args instead, and restore that flag before 
parse_known_args returns. This probably introduces potential threading issues, 
though practically perhaps they'll never turn up.

--
assignee: bethard
components: Library (Lib)
messages: 111285
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse parse_known_args does not work with subparsers
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue9255] document that the 'test' package is for core developers only

2010-07-23 Thread Brett Cannon

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

3.2: 83072
3.1: 83076
2.7: 83077

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9255
___
___
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-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

Applies cleanly on the py3k branch at r83069, the tests work correctly (fail 
before applying the patch, success afterwards), and, to the best of my C-API 
knowledge, the C code is alright.

Oh, and it behaves as described...

Python 3.2a0 (py3k:83069M, Jul 23 2010, 12:40:49) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type help, copyright, credits or license for more information.
 def foo(a, b, c): pass
... 
 from functools import partial
 p1 = partial(foo, 1)
 p1.func, p1.args
(function foo at 0x1004531e8, (1,))
 p2 = partial(foo, 2)
 p2.func, p2.args
(function foo at 0x1004531e8, (2,))

--
nosy: +vdupras

___
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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-07-23 Thread Dmitry Jemerov

Dmitry Jemerov intelliy...@gmail.com added the comment:

Patch (suggested fix and unittest) attached.

--
keywords: +patch
Added file: http://bugs.python.org/file18143/9291.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9291
___
___
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-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

Oops, used it wrong (but it still works correctly).


 p2 = partial(p1, 2)
 p2.func, p2.args
(function foo at 0x10051da68, (1, 2))

--

___
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



[issue9341] allow argparse subcommands to be grouped

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[Moved from http://code.google.com/p/argparse/issues/detail?id=53]

It's currently not possible to have subcommands formatted in groups, e.g. 
instead of:

subcommands:
  {a,b,c,d,e}
a  a subcommand help
b  b subcommand help
c  c subcommand help
d  d subcommand help
e  e subcommand help 

you should be able to get something like:

subcommands:
  group1:
a  a subcommand help
b  b subcommand help
c  c subcommand help
  group2:
d  d subcommand help
e  e subcommand help

--
components: Library (Lib)
messages: 111290
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: allow argparse subcommands to be grouped
type: feature request

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-07-23 Thread Dmitry Jemerov

Dmitry Jemerov intelliy...@gmail.com added the comment:

And by the way I've verified that the problem doesn't happen in py3k trunk.

--

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



[issue9342] Tests for monthrange in calendar.py module

2010-07-23 Thread John Chandler

New submission from John Chandler therealmetal...@gmail.com:

Hi,

Attaching a patch for the test_calendar.py file.

Adds six tests to provide test coverage of the monthrange function.


John

--
components: Tests
files: test_calendar.patch
keywords: patch
messages: 111292
nosy: John.Chandler
priority: normal
severity: normal
status: open
title: Tests for monthrange in calendar.py module
versions: Python 3.2
Added file: http://bugs.python.org/file18144/test_calendar.patch

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



[issue6095] os.curdir as the default argument for os.listdir

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

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

Thanks for the patch. Committed (with modifications) as r83078.

--
resolution:  - accepted
status: open - closed

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



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

2010-07-23 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

In argparse, -debug is a perfectly valid flag (you're not required to have 
--debug, and you can even have +debug if you want and you specify it 
correctly), so unless I misunderstand what the bug is, this doesn't apply to 
argparse.

--

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



[issue6095] os.curdir as the default argument for os.listdir

2010-07-23 Thread Tarek Ziadé

Tarek Ziadé ziade.ta...@gmail.com added the comment:

Thanks for looking into this !

--

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



[issue9339] threading is_alive documnetation is unclear

2010-07-23 Thread Brett Cannon

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

3.2: 83080
3.1: 83081
2.7: 83082

--
nosy: +brett.cannon
resolution:  - fixed
status: open - closed

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



[issue4047] test_run_abort triggers CrashReporter on MacOS X

2010-07-23 Thread Ronald Oussoren

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

Backported to 3.1 in r83069, 2.7 in r83079, 2.6 in r83083

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

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



[issue9255] document that the 'test' package is for core developers only

2010-07-23 Thread Éric Araujo

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

Brett, could you add “r” or “rev ” before revision numbers in the future? It’s 
Roundup implicit markup to make a link to a revision. (Evil but handy.) Thanks 
in advance :)

--
nosy: +merwok
stage: needs patch - committed/rejected

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-23 Thread Mark Lawrence

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

@Peter again the py3k patch is fine and the 2.7 fails.  Is this worth all your 
effort?

--

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



[issue2979] use_datetime in SimpleXMLRPCServer

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

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

At EuroPython, Virgil remarked that there was some discussion of this patch 
somewhere.

--
nosy: +loewis

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



[issue4297] Add error_log attribute to optparse.OptionParser

2010-07-23 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Not sure, but I think _print_message in argparse isn't exactly what the OP is 
looking for if they really only care about errors. If you want to override how 
errors are printed, then it's absolutely correct to override the error method 
(in argparse at least), and your overridden method should be given every 
message that is normally printed as an error.

If by errors, you mean anything the parser might print out (e.g. the output 
of --help), then you may indeed want _print_message to become public so you 
can override it. Let me know.

--

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



[issue4297] Add error_log attribute to optparse.OptionParser

2010-07-23 Thread Éric Araujo

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


--
nosy: +merwok

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



[issue9341] allow argparse subcommands to be grouped

2010-07-23 Thread Éric Araujo

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


--
nosy: +merwok
resolution:  - accepted
versions: +Python 3.2

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



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

2010-07-23 Thread R. David Murray

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

In that case you are correct, it does not apply to argparse.

--

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



[issue8273] move generally useful test_support functions into the unittest package

2010-07-23 Thread Éric Araujo

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


--
nosy: +merwok

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



[issue7895] Mac 10.6 mac_ver() crashes with USING_FORK_WITHOUT_EXEC_IS _NOT_SUPPORTED_BY_FILE_MANAGER

2010-07-23 Thread Ronald Oussoren

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

Fixed in r83075 (3.2), r83084 (3.1), r83085 (2.7), r83086 (2.6)

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

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-23 Thread Peter Donis

Peter Donis peterdo...@alum.mit.edu added the comment:

@Mark, I'm probably stubborn, yes. :-) Could you post verbose
output from your testing on Windows? I'd at least like to be
able to duplicate your findings; it's possible there's
something simple I'm missing.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1812
___
___
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-23 Thread Mark Lawrence

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

The patch seems clean to me.  Applied patch to unit test and ran it, tests 
failed, then applied patch to module, tests passed.  Also tried import 
pydoc;pydoc.gui() from the command line, the output looked fine to me.  Tested 
on Windows Vista with Firefox.  Could someone commit this please.

--
nosy: +BreamoreBoy
stage: patch review - commit review

___
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



[issue9343] Document that argparse parents must be fully declared before children

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[From http://code.google.com/p/argparse/issues/detail?id=61]

It should be documented clearly that only the arguments present on the parent 
parser at the time ArgumentParser is called will be included in the parser.

 parent = argparse.ArgumentParser(add_help=False)
 child = argparse.ArgumentParser(parents=[parent])
 parent.add_argument('--foo', action='store_true')
 child.parse_args(['--foo'])
usage: [-h]
: error: unrecognized arguments: --foo

--
assignee: d...@python
components: Documentation
messages: 111306
nosy: bethard, d...@python
priority: normal
severity: normal
status: open
title: Document that argparse parents must be fully declared before children
versions: Python 2.7, Python 3.2, Python 3.3

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



[issue9343] Document that argparse parents must be fully declared before children

2010-07-23 Thread Éric Araujo

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

I removed 3.3, since it currently means “won’t be done for 3.2, so note for 
later.” I don’t know if the report applies to 3.1 (doc fixes go into stable 
releases too), so I’m not adding it.

--
nosy: +merwok
versions:  -Python 3.3

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



[issue9343] Document that argparse parents must be fully declared before children

2010-07-23 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Ah, thanks for the fix. No it doesn't need to go in 3.1 - argparse is only in 
2.7 and 3.2.

--

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



[issue9344] please add posix.getgrouplist()

2010-07-23 Thread Ronald Oussoren

New submission from Ronald Oussoren ronaldousso...@mac.com:

A number of unix systems expose a getgroupslist function to fetch the groups 
that a user is a member of. It would be nice if that function were exposed to 
python.

See issue7900 for more information on why that would be useful.

--
keywords: easy
messages: 111309
nosy: ronaldoussoren
priority: low
severity: normal
status: open
title: please add posix.getgrouplist()
versions: Python 3.2

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



[issue9344] please add posix.getgrouplist()

2010-07-23 Thread Ronald Oussoren

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


--
nosy: +belopolsky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9344
___
___
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-23 Thread Ronald Oussoren

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

I've added issue9344 for adding os.getgroupslist. I'd prefer to keep adding 
that function separate from this issue. Btw. I'm +1 on adding such a function.

I will shortly commit a port of os-getgroups-v3.patch to 3.2, but without the 
tests in PosixGroupsTester because those explictly exclude OSX.

--

___
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



[issue9345] argparse wrap tests are sensitive to terminal size

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[From http://code.google.com/p/argparse/issues/detail?id=63]

What steps will reproduce the problem?
1. PYTHONPATH=. python test/test_argparse.py
2. do the above in an 80x24 terminal window and it passes
3. do the same in an 80 wide emacs shell buffer and you get lots of failures

To make sure this doesn't continue to be a problem, we probably need to do 
something like os.environ['COLUMNS'] = 80 and check output like that.

--
components: Tests
messages: 111311
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse wrap tests are sensitive to terminal size
type: behavior
versions: Python 2.7, Python 3.2

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

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

I am seeing the same exception when the server returns ex:nil, even when I 
enable allow_none.

The library only accepts 'nil' not 'ex:nil'

As a workaround, I have added dispatch[ex:nil] to my local library (which is 
obviously not a solution)

--
nosy: +bhargav

___
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



[issue9346] Improve threading tests

2010-07-23 Thread Brian Brazil

New submission from Brian Brazil brian.bra...@gmail.com:

The attached patch:
Remove unused self-test from threading.py that doesn't really test much.

Add better testing for Thread.__repr__.

This brings coverage as measured by regrtest from 40% to 45%.

--
components: Interpreter Core
files: threading_test_cleanup.patch
keywords: patch
messages: 111313
nosy: bbrazil
priority: normal
severity: normal
status: open
title: Improve threading tests
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file18145/threading_test_cleanup.patch

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



[issue1812] doctest _load_testfile function -- newline handling seems incorrect

2010-07-23 Thread Mark Lawrence

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

@Peter apologies hereby offered, the 2.7 patch is fine, I'd screwed up 
doctest_testfile.txt.  As the patch is ok and has been very thoroughly tested 
please can this be committed.

--
stage:  - commit review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1812
___
___
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-23 Thread R. David Murray

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

This would involve too much of a behavior change to be introduced in a point 
release.  string.letters does not exist in py3k.  Closing as out of date.

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

___
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



[issue9347] Calling argparse add_argument with a sequence as 'type' causes spurious error message

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

What steps will reproduce the problem?

parser = argparse.ArgumentParser()
parser.add_argument('--foo', type=(int, float))

What is the expected output?

ValueError: (type 'int', type 'float') is not callable

What do you see instead?

TypeError: not all arguments converted during string formatting

Please provide any additional information below.

This is caused by calling using the % string formatting operator without
proper wrapping of the argument. The fix is basically:

-raise ValueError('%r is not callable' % type_func)
+raise ValueError('%r is not callable' % (type_func,))

--
components: Library (Lib)
messages: 111316
nosy: bethard
priority: low
severity: normal
stage: needs patch
status: open
title: Calling argparse add_argument with a sequence as 'type' causes spurious 
error message
type: behavior
versions: Python 2.7, Python 3.2

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



[issue9348] Calling argparse's add_argument with the wrong number of metavars causes delayed error message

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

What steps will reproduce the problem?

parser = argparse.ArgumentParser()  
parser.add_argument('--foo', nargs=2, metavar=('X','Y','Z'))
parser.parse_args(['-h'])

The error dosn't show up until help is formatted.

Giving any incorrect length of metavar will produce the problem, which
includes a tuple whos length doesn't match a numerical value, more than two 
metavars to '*' or '+', and more than one metavar to '?'. Furthermore, a tuple 
of length one causes the error when nargs is greater than 1, '*', or '+'.

What is the expected output? What do you see instead?

When the help is displayed, you get:

TypeError: not all arguments converted during string formatting

Or a similar error message for other cases.

It would be expected that the error message would be more specific. The
error should definitely be raised when add_argument is called, rather than 
later.

There should be a test that does something like:

for meta in ('X', ('X',), ('X','Y'), ('X','Y','Z')):
for n in (1, 2, 3, '?', '+', '*'):
parser = argparse.ArgumentParser()
parser.add_argument('--foo', nargs=n, metavar=meta)
parser.format_help()

and makes sure that the error shows up in add_argument, not format_help.

--
components: Library (Lib)
messages: 111317
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: Calling argparse's add_argument with the wrong number of metavars causes 
delayed error message
type: behavior
versions: Python 2.7, Python 3.2

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-07-23 Thread R. David Murray

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

And just for clarity: py3k trunk does contain the _winreg code path.

--
stage: unit test needed - patch review

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2010-07-23 Thread Brian Curtin

Changes by Brian Curtin cur...@acm.org:


--
nosy: +brian.curtin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9291
___
___
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-23 Thread Alexander Belopolsky

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

Since I am the OP of this patch, I would like a +1 from another developer 
before checking this in.  (Or a couple of -1s before rejecting:-)


Antoine,

Does the latest patch address your concerns?

Virgil,

If you care enough about this feature, please post a summary on python-dev and 
ask for comments.

--
stage: patch review - commit review

___
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



[issue9349] document argparse's help=SUPPRESS

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

Argparse supports silencing help for certain options using SUPPRESS.

 parser = argparse.ArgumentParser()
 parser.add_argument('--foo', help=argparse.SUPPRESS)
 parser.print_help()
usage: [-h]

optional arguments:
  -h, --help  show this help message and exit

This should be documented in the description of help=

http://docs.python.org/library/argparse.html#help

--
assignee: d...@python
components: Documentation
messages: 111320
nosy: bethard, d...@python
priority: normal
severity: normal
status: open
title: document argparse's help=SUPPRESS
versions: Python 2.7, Python 3.2

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



[issue9350] add remove_argument_group to argparse

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[From http://code.google.com/p/argparse/issues/detail?id=71]

There is a method ArgumentParser.add_argument_group() to create and add an 
argument group to the parser.  I would like the ability to remove an argument 
group via a method like remove_argument_group(group).

The use case for me is I create an argument group and then conditionally add a 
bunch of arguments to it.  If zero arguments are added I would like to then 
remove the group so that an empty group does not show up in the help output.

--
components: Library (Lib)
messages: 111321
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: add remove_argument_group to argparse
type: feature request

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



[issue9342] Tests for monthrange in calendar.py module

2010-07-23 Thread Brett Cannon

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

3.2 in r83089

--
nosy: +brett.cannon
resolution:  - accepted
status: open - closed

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



[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Brett Cannon

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

Committed in r83090. Tweaked the patch from Virgil slightly so that it sets the 
flag used by importlib to delineate whether to use __import__ back to its 
original setting after running the tests.

--
resolution:  - accepted
status: open - closed

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



[issue9351] argparse set_defaults on subcommands should override top level set_defaults

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

If you use set_defaults on a subparser, but a default exists on the top level 
parser, the subparser defaults are ignored:

 parser = argparse.ArgumentParser()
 xparser = parser.add_subparsers().add_parser('X')
 parser.set_defaults(foo=1)
 xparser.set_defaults(foo=2)
 parser.parse_args(['X'])
Namespace(foo=1)

This is counter to what people probably expect, that the subparser, when 
selected, would override the top level parser.

The behavior is because of the following code in parse_known_args:

for dest in self._defaults:
if not hasattr(namespace, dest):
setattr(namespace, dest, self._defaults[dest])

This happens before the subparser sees the namespace object, and so the 
subparser sees that no defaults need to be filled in.

--
components: Library (Lib)
messages: 111324
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse set_defaults on subcommands should override top level 
set_defaults
type: behavior
versions: Python 2.7, Python 3.2

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



[issue8392] unit tests rather light on testing __import__(..., level)

2010-07-23 Thread Virgil Dupras

Virgil Dupras hs...@hardcoded.net added the comment:

Brett, I think there's a problem with the tweak you made to the patch. There 
was already a testcase called RelativeImportTests and you've hidden it (that I 
why I called it ImportlibRelativeImportTests initially).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8392
___
___
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-23 Thread Alexander Belopolsky

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

On Fri, Jul 23, 2010 at 4:03 AM, Martin v. Löwis rep...@bugs.python.org 
wrote:
..
 I fail to see the bug in this report. '\xff' is a letter because the C 
 library says it is.

This does not explain the difference between 2.6 and 2.7.  With
attached issue9335-test.py,

$ cat issue9335-test.py
import locale
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
print(chr(255).isalpha())

$ python2.7 issue9335-test.py
False
$ python2.6 issue9335-test.py
True
$ python2.5 issue9335-test.py
True

Since chr(255) = '\xff', is not a valid UTF-8 byte sequence, it makes
little sense to ask whether it is a letter or not in a locale that
uses UTF-8 encoding.   Nevertheless the behavior changed between
revisions and it is not mentioned in what's new in 2.7.  (I suspect
this was introduced in issue5793 (r72040), but I have not verified.)

There are two possible action items here:

1. New behavior needs to be documented.   I believe 2.7 is correct
because when isalpha is used to sanitize untrusted input, it is better
to reject in the case of uncertainy.

2. Arguably, this is a security issue and thus eligible for backporting to 2.6.

--
Added file: http://bugs.python.org/file18146/issue9335-test.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9335
___import locale
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
print(chr(255).isalpha())
___
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-23 Thread Ronald Oussoren

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

Daniele: which version of OSX do you use?  And if you use OSX 10.5 or 10.6: 
which is your system language according to system preferences (the topmost 
entry in the list of the Language and Text preference pane, whose icon looks 
a little like a UN flag.

I can only reproduce this by explicitly setting LANG=C before running the test 
on OSX 10.6 (with English as the main language)

This may be very hard to fix. What happens is that subprocess.Popen converts 
the argument array into the filesystem encoding (which on OSX is always UTF-8). 
The argv decoder then decodes the using the encoding specified in LANG, which 
on your system is different from UTF-8. This results in a string where each 
byte in the UTF-8 encoding of snowman is represented as a single character. 
Those characters are then encoded as UTF-8 by the test and that results in the 
error your seeing.

That is, the output looks like the output of this code:

 snowman = '\u2603'
 snowman.encode('utf-8').decode('latin1').encode('utf-8')

--

___
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



[issue9352] argparse eats characters when parsing multiple merged short options

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[Moved from http://code.google.com/p/argparse/issues/detail?id=73]

What steps will reproduce the problem?
parser = ArgumentParser(prefix_chars=-+)
parser.add_argument(-a,action=store_true)
parser.add_argument(+b,action=store_true)
parser.add_argument(+c,action=store_true)
print parser.parse_args(-abc.split())

What is the expected output? What do you see instead?
I would expect Namespace(a=True, b=True, c=True)
You get Namespace(a=True, b=False, c=True)

because in the loop that iterates through the prefix characters it builds an 
option_string to try by pulling the first character off explicit_arg. If it 
doesn't match any option then it will try the next prefix character, but it 
will have lost that character from the explicit_arg. This is also a problem 
even with only one prefix character because if it doesn't match an option the 
error message will be missing that one character.

The above match -a, tried -b and fails, but instead of trying +b, it tries +c 
because the b has been lost.

I've included multiple_short.patch which fixes just this bug. However, I also 
don't agree with the behavior of trying all prefix characters. I would expect 
that when merging short options together they would have to all share the same 
prefix character. If I have prefix_chars=-+ and I have options -a, +a, -b, 
and +b and I type +ab I would expect my action to be called with option_strings 
+a and +b, not +a and -b. The patch to fix the above bug *and* only try the 
same prefix character as the first option is multiple_short_same_prefix.patch.

[Only the latter patch (which sounds like the right behavior) is attached. It 
will need to be updated to work against Python trunk.]

--
components: Library (Lib)
files: multiple_short_same_prefix.patch
keywords: patch
messages: 111328
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse eats characters when parsing multiple merged short options
type: behavior
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file18147/multiple_short_same_prefix.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9352
___
___
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-23 Thread Alexander Belopolsky

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

Another issue that may be worth revisiting is whether or not it is OK for 
_tkinter to set the locale.


21.2.2. For extension writers and programs that embed Python

Extension modules should never call setlocale(), except to find out what the 
current locale is. 
 

http://docs.python.org/dev/library/locale.html#for-extension-writers-and-programs-that-embed-python

--
components: +Interpreter Core -Macintosh
nosy: +eric.smith
type:  - behavior

___
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



[issue4485] fast swap of default Windows python versions

2010-07-23 Thread Mark Lawrence

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

Right now this would suit me down to the ground, as I'm running four 
maintenance versions, 2.6/7 and 3.1/2 in parallel.  But as this is a feature 
request it will not happen until 3.2 at the earliest.

--
nosy: +BreamoreBoy
versions: +Python 3.2 -Python 2.5, Python 2.6, Python 3.0

___
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



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

2010-07-23 Thread Alexander Belopolsky

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


Added file: http://bugs.python.org/file18148/datetimetester.py

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



[issue9353] argparse __all__ is incomplete

2010-07-23 Thread Steven Bethard

New submission from Steven Bethard steven.beth...@gmail.com:

[Moved from http://code.google.com/p/argparse/issues/detail?id=75]

What steps will reproduce the problem?
1. import argparse
2. print dir(argparse)
3. print argparse.__all__

Compare the output for public methods and attributes from #2 that aren't in #3.

I see the following entries that look like they should be public but aren't in 
__all__::

'ArgumentTypeError', 'ONE_OR_MORE', 'OPTIONAL', 'PARSER', 'REMAINDER',  
'SUPPRESS', 'ZERO_OR_MORE'

I was writing a compat layer to allow unbundling argparse from ipython if it's 
already installed in the system when I ran across this.  The particular public 
attribute that was missing there was 'SUPPRESS'

--
components: Library (Lib)
messages: 111331
nosy: bethard
priority: normal
severity: normal
stage: needs patch
status: open
title: argparse __all__ is incomplete
type: behavior
versions: Python 2.7, Python 3.2

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



  1   2   3   >