[issue13935] Tarfile - Fixed GNU tar header base-256 handling

2012-02-03 Thread Lars Gustäbel

Changes by Lars Gustäbel :


--
assignee:  -> lars.gustaebel
nosy: +lars.gustaebel

___
Python tracker 

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



[issue10487] http.server doesn't process Status header from CGI scripts

2012-02-03 Thread Éric Araujo

Changes by Éric Araujo :


--
title: http.server - doesn't process Status: header from CGI scripts -> 
http.server doesn't process Status header from CGI scripts
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue13893] Make CGIHTTPServer capable of redirects (and status other than 200)

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

Can someone assess if this is actually a duplicate of #10487 or something else? 
 Thanks

--
nosy: +eric.araujo

___
Python tracker 

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



[issue13893] Make CGIHTTPServer capable of redirects (and status other than 200)

2012-02-03 Thread Éric Araujo

Changes by Éric Araujo :


--
keywords: +needs review
stage:  -> test needed
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4

___
Python tracker 

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



[issue13879] Argparse does not support subparser aliases in 2.7

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

Ah, I did not see that your first message talked about the dev doc, which is 
3.3.

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

___
Python tracker 

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



[issue13934] sqlite3 test typo

2012-02-03 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee:  -> ghaering
keywords: +needs review
nosy: +ghaering
stage:  -> patch review
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

[Amaury]
> The test function should use "from test.support import TESTFN" to get
> a temporary file name
I believe that TESTFN predates tempfile (and the tempfile helpers in regrtest 
and test.support) and is now seen as an ugly relic (at least by me :)

[poq]
>> I think the doc could link to the sqlite.org doc about URIs.
> I considered this, but the rest of the sqlite3 module documentation doesn't 
> link to the
> sqlite.org doc pages either.
Well, users need a way to find the list of allowed options.  The Python docs 
should either list them (there aren’t much; pro: all the info is here, con: 
maintenance) or link to them.

By the way, do you want to give us your full name so that we can credit you?  
(And on a related subject, I don’t know if this small patch requires a 
contributor agreement.)

--

___
Python tracker 

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



[issue12955] urllib.request example should use "with ... as:"

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

Either we find a commonly used stdlib class that is not a context manager but 
has a close method and is not going to become a context manager (I can’t see 
why such a thing would be), or we can add something like: “closing is useful 
with code that you can’t change to add context management, for example 
urllib.urlopen before Python 3.3”.

--

___
Python tracker 

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



[issue13910] test_packaging is dependent on dict ordering.

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

Thanks for the report; it was not obvious (due to title/scope change) that 
there was already one :)  I’m on this.

--
assignee:  -> eric.araujo
resolution:  -> duplicate
stage: test needed -> committed/rejected
status: open -> closed
superseder:  -> pysetup create should not convert package_data to extra_files

___
Python tracker 

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



[issue13712] pysetup create should not convert package_data to extra_files

2012-02-03 Thread Éric Araujo

Changes by Éric Araujo :


--
dependencies: +package_data only allows one glob per-package

___
Python tracker 

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



[issue13937] multiprocessing.ThreadPool.join() blocks indefinitely.

2012-02-03 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

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



[issue13938] 2to3 fails to convert types.StringTypes appropriately

2012-02-03 Thread Mark Hammond

New submission from Mark Hammond :

test_types.py converts "types.StringTypes" to "str" - but types.StringTypes is 
a tuple, so expressions like "type(x) in type.StringTypes" fails after 
conversion with "TypeError: argument of type 'type' is not iterable"

Attaching a fix and test.

Note that the fixer still seems "strange" after this fix - types.StringType 
gets converted to "bytes" but types.StringTypes uses str.  This means the 
expression "type.StringType in type.StringTypes" evaluates to True in 2.x but 
False once converted - however, that should probably be tackled in a different 
bug - the fact the expression now causes a TypeError once converted is more 
blatantly wrong and the focus of this bug.

--
components: 2to3 (2.x to 3.x conversion tool)
files: fix_stringtypes_fixer.patch
keywords: patch
messages: 152592
nosy: mhammond
priority: normal
severity: normal
status: open
title: 2to3 fails to convert types.StringTypes appropriately
versions: Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file24415/fix_stringtypes_fixer.patch

___
Python tracker 

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



[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I presume you intend regex to match the spec rather than bugs. So if re has a 
bug in an obsure corner case and the spec is ambiguous, as I have the 
impression is the case here, using the interpretation embodied in regex would 
avoid creating a conflict.

--

___
Python tracker 

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



[issue13929] fnmatch to support escape characters

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The doc chapters are entitled "fnmatch — Unix filename pattern matching" and 
"glob — Unix style pathname pattern expansion". The first explicitly disclaims 
the feature you request: "Be aware there is no way to quote meta-characters.", 
suggests using re for anything beyond fnmatch, and shows to use .translate to 
make a start in doing so. For your example:

>>> re.match(r".*\[Ver\.2\].*",  "Document[Ver.2].doc")
<_sre.SRE_Match object at 0x0331AF38>

Indeed, fnmatch works by using translate() and re.match. What you are asking 
for in something in between the unix language and re. If one re feature is 
added, why not another?

So the scope of these modules is clearly circumscribed. I suspect their intent 
was to make it easy to translate unix shell scripts into Python. 
What you are asking for in something in between. If you want to pursue this, 
post on python-list or python-ideas to garner more support. But I anticipate 
rejection as not needed and contrary to intent.

Not obvious from the doc is that an unmatch '[' or ']' is escaped:
>>> name = "Document[Ver.2.doc"
>>> pattern = "*[Ver.2*"
>>> fnmatch.fnmatch(name, pattern)
True
>>> name = "DocumentVer.2].doc"
>>> pattern = "*Ver.2]*"
>>> fnmatch.fnmatch(name, pattern)
True
I presume this matches the *nix behavior, but don't know.

--
nosy: +terry.reedy
resolution:  -> rejected
status: open -> closed
versions:  -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.4

___
Python tracker 

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



[issue13933] IDLE:not able to complete the hashlib module

2012-02-03 Thread Ramchandra Apte

Ramchandra Apte  added the comment:

I am using Ubuntu 11.04 with Python 3.2.2 from the package reprositeries 
(binaries)

--

___
Python tracker 

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



[issue1813] Codec lookup failing under turkish locale

2012-02-03 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
status: open -> closed

___
Python tracker 

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



[issue13932] If some test module fails to import another module unittest reports a very misleading message

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +Tests
nosy: +ezio.melotti, michael.foord

___
Python tracker 

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



[issue13933] IDLE:not able to complete the hashlib module

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ramchandra: what OS and Python version? Please always include in reports.

I verified on win7,3.2.2, with hashlib versus itertools, idlelib, heapq, trace. 
(On my new machine, popup is so fast I do not need .) In fact, 'hashlib.' 
and  results in a tab to next tab position. ^ to  
also does not work, but it does without the '.'. Some files (only builtins?) 
work without being imported. Everything seemed to work the same in an edit 
window.

hashlib.__all__ exists as a tuple. Modules without .__all__ also work.
Both cases are handled in idlelib.AutoComplete.fetch_completions().
I see nothing strange about hashlib.

Looking at idlelib.AutoComplete.py, I see other problems to fix.

"This extension can complete either attribute names of file names."
/of/or/, but ^ in name brings up globals list with cursor at closest name 
to what one has entered. Are these handled elsewhere?

# This string includes all chars that may be in a file name (without a path
# separator)
FILENAME_CHARS = string.ascii_letters + string.digits + os.curdir + "._~#$:-"
# This string includes all chars that may be in an identifier
ID_CHARS = string.ascii_letters + string.digits + "_"

FILENAME_CHARS looks Windows specific. Both definitions are obsolete. IDLE 
should not separately define such things if at all possible.

But 'hash' is not in the file and I see little specific to the text context. 
Without being able to insert print calls to see what is and is not executed, I 
have no idea how to proceed.

--
nosy: +serwy, terry.reedy
versions: +Python 3.3

___
Python tracker 

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



[issue8418] Crash 0xc0000417 STATUS_INVALID_CRUNTIME_PARAMETER on program exit

2012-02-03 Thread Mark Hammond

Mark Hammond  added the comment:

See also http://bugs.python.org/issue13038 - same exception but in a different 
content, but the underlying cause may be similar.

--
nosy: +mhammond

___
Python tracker 

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



[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-02-03 Thread Matthew Barnett

Matthew Barnett  added the comment:

This should answer that question:

>>> re.findall(r"[\A\C]", r"\AC")
['C']
>>> regex.findall(r"[\A\C]", r"\AC")
['A', 'C']

The behaviour of regex is intended to match that of re for backwards 
compatibility.

--

___
Python tracker 

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



[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2012-02-03 Thread Mark Hammond

Mark Hammond  added the comment:

Actually, I think this is OK - the reference to the "x86" is in the tests and 
those tests don't actually perform a build, just check the manifest is detected 
and stripped (ie, the test should still work fine on 64bit boxes).  Ideally the 
test could also check a manifest with a 64bit architecture, but I don't think 
that's really necessary...

--

___
Python tracker 

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



[issue13911] test_trace depends on dict repr() ordering

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +belopolsky
stage:  -> test needed
versions: +Python 3.3

___
Python tracker 

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



[issue13910] test_packaging is dependent on dict ordering.

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +alexis, eric.araujo, tarek
stage:  -> test needed
versions: +Python 3.3

___
Python tracker 

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



[issue13909] Ordering of free variables in dis is dependent on dict ordering.

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +ncoghlan
stage:  -> test needed
versions: +Python 3.3

___
Python tracker 

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Sorry Martin, I see you already said that. Anyway, I closed other three in 
favor of this one.

--

___
Python tracker 

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

#5218 is a 4th duplicate, also with a patch to the ceval loop and test.

--
nosy: +georg.brandl, gpolo, pitrou

___
Python tracker 

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



[issue13915] Update Tutorial 6.1.3 for PEP 3145

2012-02-03 Thread John Roth

John Roth  added the comment:

I apologize for not submitting this in patch format, but I don't have a 
development system available.

I suggest replacing the entire 6.1.3 section with: 

To speed up loading modules, Python caches the compiled version of each module 
in the __pycache__ directory under the name module.cpython-xy.pyc, where xy is 
the Python version number. For example, in release 3.2 the compiled version of 
spam.py would be cached as __pycache__/spam.cpython-32.pyc. This naming 
convention allows compiled modules from different releases and different 
versions of Python to coexist.

Python checks the revision date of the source against the compiled version to 
see if it’s out of date and needs to be recompiled. This is a completely 
automatic process. Also, the compiled modules are platform-independent, so the 
same library can be shared among systems with different architectures.

Python does not check the cache in two circumstances. First, it always 
recompiles and does not store the result for the module that’s loaded directly 
from the command line. Second, it does not check the cache if there is no 
source module. To support a non-source (compiled only) distribution, the 
compiled module must be in the source directory, and there must not be a source 
module.

Some tips for experts:

* You can use the -O or -OO switches on the Python command to reduce the size 
of a compiled module. The -O switch removes assert statements, the -OO switch 
removes both assert statements and __doc__ strings. Neither optimization 
affects running time, however it’s possible that they may affect run-time 
behavior. Optimized modules have a .pyo rather than a .pyc suffix. Future 
releases may change the effects of optimization.

*   The module compileall can create .pyc files (or .pyo files when -O is used) 
for all modules in a directory.

*   There is more detail on this process, including a flow chart of the 
decisions, in PEP 3147.

--
nosy: +JohnRoth1

___
Python tracker 

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



[issue5218] Check for tp_iter in ceval:ext_do_call before overriding exception message

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This is one of 4 duplicate issues, 3 with somewhat similar patches, with nearly 
disjoint nosy lists. Consolidating.

--
nosy: +terry.reedy
resolution:  -> duplicate
status: open -> closed
superseder:  -> Function calls taking a generator as star argument can mask 
TypeErrors in the generator
versions: +Python 3.2, Python 3.3 -Python 3.1

___
Python tracker 

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +ron_adam

___
Python tracker 

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

#13904 is another dup, with patches to test and ceval. I asked that they be 
reloaded to this issue.

--
nosy: +ncoghlan
versions:  -Python 3.1

___
Python tracker 

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



[issue13904] Generator as *args: TypeError replaced

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

I unlinked to see if I could link it to 4806 instead. Did not work. Please nosy 
yourself there and upload your files to *that* issue.

--
nosy: +terry.reedy
resolution:  -> duplicate
status: open -> closed
superseder:  -> Function calls taking a generator as star argument can mask 
TypeErrors in the generator
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue13893] Make CGIHTTPServer capable of redirects (and status other than 200)

2012-02-03 Thread Glenn Linderman

Glenn Linderman  added the comment:

This seems related to issue 10487. Some of the code is different in Python 3.  
Since this is an enhancement, it seems unlikely to ever be accepted for 2.x, 
which is in bugfix-only mode.

Sadly, most hosting companies are still running Python 2.x, with many as old as 
2.4.

Happily, you can patch your own copy to work; I did that, for both 2.x and 3.x, 
and described the issues in a set of bug issues, but haven't had the time to 
figure out how to go through the development process and submit individual 
patches: my code is kind of a bundled solution to all the issues I submitted, 
and it doesn't seem likely that a single patch to solve all the issues would be 
acceptable.  I'm happy to share my code, if it would help someone generate 
patches.

--
nosy: +v+python

___
Python tracker 

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



[issue13904] Generator as *args: TypeError replaced

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Added file: http://bugs.python.org/file24358/typeerror-replaced-in-stararg.diff

___
Python tracker 

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



[issue13904] Generator as *args: TypeError replaced

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Removed file: 
http://bugs.python.org/file24358/typeerror-replaced-in-stararg.diff

___
Python tracker 

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



[issue11944] Function call with * and generator hide exception raised by generator.

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Function calls taking a generator as star argument can mask 
TypeErrors in the generator

___
Python tracker 

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



[issue13899] re pattern r"[\A]" should work like "A" but matches nothing. Ditto B and Z.

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Does anyone have regex installed, to see what it does?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue13892] distutils handling of windows manifest isn't optimal

2012-02-03 Thread Mark Hammond

Mark Hammond  added the comment:

I thought this shouldn't be a problem - that as pythonxx.dll contains a 
manifest with the references and also contains hoops to ensure its "activation 
context" is used when loading dynamic modules, that things should work 
correctly.  The scenario you outline isn't that different to Python being used 
as a COM server - where a program like "cscript.exe", which comes with Windows 
but I'm pretty sure has no reference to the CRT manifest we care about, loads 
up a Python COM object, causing Python to be loaded and it to load extension 
modules - and that works correctly.

That said though, I agree it would be nice if the manifest handling was 
optional, but it isn't immediately clear how that could be done given how 
distutils is structured.  Indeed, there isn't even an obvious way to do it 
programatically other than by monkey-patching the compiler class.  At least if 
you do take the monkey-patch route, you should find it necessary to only patch 
one fairly small method in the class.

--

___
Python tracker 

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



[issue13896] Make shelf instances work with 'with' as context managers

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

contextlib.closing is an adapter for using objects that have a close method but 
have not be modernized to be context managers by having _enter__ and __exit__ 
methods added. Its doc gives the example
with closing(urlopen('http://www.python.org')) as page:
This is now obsolete as the object returned is now a context manager.

A shelf instance would make a better example now, but...
I think it reasonable to update shelve.Shelf also. I believe
  def __enter__(self): return self
  def __exit__(self, e_typ, e_val, tb): self.close()
are all that are needed. (Nick, true?)

--
nosy: +ncoghlan, terry.reedy
stage:  -> test needed
title: shelf doesn't work with 'with' -> Make shelf instances work with 'with' 
as context managers
type:  -> enhancement
versions: +Python 3.3

___
Python tracker 

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



[issue12955] urllib.request example should use "with ... as:"

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Senthil:
http://docs.python.org/dev/library/contextlib.html#contextlib.closing
currently has this example:

from urllib.request import urlopen
with closing(urlopen('http://www.python.org')) as page:

which is misleading in that the object returned from urlopen

has __enter__ and __exit__ methods and therefore is a c.m. in itself and does 
not need to be wrapped in closing(). I did not really understand from your 
comment whether there is any need to use closing() with anything returned in 
urllib. 

At the moment, shelves are not C.M.s, and would make better examples, but 
#13896 suggests 'fixing' that also.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2012-02-03 Thread STINNER Victor

STINNER Victor  added the comment:

Codec encoders reuse the same exception object for speed, but set some 
attributes (start, end and reason). Recreate the args tuple each time that a 
attribute is set. UnicodeEncodeError and UnicodeDecodeError should maybe 
override args getter to create a new tuple at each call.

--

___
Python tracker 

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



[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-03 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

digit transposition corrected 12902

--

___
Python tracker 

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



[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
superseder: Clarify sentence in tutorial -> help("modules") executes module code

___
Python tracker 

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



[issue13882] PEP 410: Use decimal.Decimal type for timestamps

2012-02-03 Thread STINNER Victor

STINNER Victor  added the comment:

Even if some people dislike the idea of adding datetime.datetime type, here is 
a patch implementing it (it requires time_decimal-XX.patch). The patch is at 
least a proof-of-concept that it is possible to change the internal structure 
without touching the public API.

Example:

$ ./python
>>> import datetime, os, time
>>> open("x", "wb").close(); print(datetime.datetime.now())
2012-02-04 01:17:27.593834  

>>> print(os.stat("x", timestamp=datetime.datetime).st_ctime)   
>>>  
2012-02-04 00:17:27.592284+00:00

>>> print(time.time(timestamp=datetime.datetime))   
>>> 
2012-02-04 00:18:21.329012+00:00
>>> time.clock(timestamp=datetime.datetime)
ValueError: clock has an unspecified starting point
>>> print(time.clock_gettime(time.CLOCK_REALTIME, timestamp=datetime.datetime))
2012-02-04 00:21:37.815663+00:00
>>> print(time.clock_gettime(time.CLOCK_MONOTONIC, timestamp=datetime.datetime))
ValueError: clock has an unspecified starting point

As you can see: conversion to datetime.datetime fails with ValueError('clock 
has an unspecified starting point') for some functions, sometimes depending on 
the function argument (clock_gettime).

--
Added file: http://bugs.python.org/file24414/timestamp_datetime.patch

___
Python tracker 

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



[issue13926] pydoc - stall when requesting a list of available modules in the online help utility

2012-02-03 Thread Ned Deily

Ned Deily  added the comment:

Jeroen, if you try running "help()" from a command-line python2.7, rather than 
in IDLE, what results do you get?  Most likely, Python will crash there and 
there should be an exception and traceback printed, in which case the problem 
has nothing to do with IDLE directly.  Note that there have been some 
improvements to pydoc's robustness since 2.7.2 was released (for instance, the 
changes for issue7425 and issue7367).

(Terry, are you sure you meant Issue12092?)

--
nosy: +ned.deily

___
Python tracker 

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



[issue13861] test_pydoc failure

2012-02-03 Thread Ned Deily

Ned Deily  added the comment:

For the as-yet unreleased changes for Issue7425, I added some test cases for 
pydoc -k (apropos) and chose a keyword of "nothing", a keyword which has no 
hits in the standard library.  Unfortunately, you both installed third-party 
packages that *do* have hits for "nothing".  Cute!  I've now changed the 
keyword to a nonsense one which I hope will have a zero probability of getting 
a hit.

--
assignee:  -> ned.deily
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue13861] test_pydoc failure

2012-02-03 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset e5f2c04055a2 by Ned Deily in branch '2.7':
Issue #13861: Prevent test_apropos* test case failures in test_pydoc.
http://hg.python.org/cpython/rev/e5f2c04055a2

New changeset 5eb47e1732a0 by Ned Deily in branch '3.2':
Issue #13861: Prevent test_apropos* test case failures in test_pydoc.
http://hg.python.org/cpython/rev/5eb47e1732a0

New changeset ff230e366610 by Ned Deily in branch 'default':
Issue #13861: merge
http://hg.python.org/cpython/rev/ff230e366610

--
nosy: +python-dev

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker

Lakin Wecker  added the comment:

Yeah - good point, and I agree.

--

___
Python tracker 

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



[issue13937] multiprocessing.ThreadPool.join() blocks indefinitely.

2012-02-03 Thread Ben Timby

New submission from Ben Timby :

If you instantiate a ThreadPool, then call map() with an empty list, the join() 
method will block indefinitely on self._result_handler.join()

$ python
> from multiprocessing.pool import ThreadPool
> t = ThreadPool(1)
> t.map_async(lambda x: x, [])
> t.close()
> t.join()  # <- never returns

I was not able to determine the root cause, however, I found that the join() 
blocks when joining the _result_handler thread.

--
components: Library (Lib)
messages: 152566
nosy: Ben.Timby
priority: normal
severity: normal
status: open
title: multiprocessing.ThreadPool.join() blocks indefinitely.
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Tim Peters

Tim Peters  added the comment:

It is odd, but really no odder than "zero values" of other types evaluating to 
false in Boolean contexts ;-)  Closing as "invalid".

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker

Lakin Wecker  added the comment:

Although I find it odd, you are all correct.

It is documented.  (I don't know how I missed that when I read those docs 
looking for that exact documentation).

It is consistent with the rest of python.

Do I close this? Do you guys? I'm fine with closing it.  Thanks and sorry for 
the noise.

--

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Tim Peters

Tim Peters  added the comment:

>From the docs, at:

http://docs.python.org/library/datetime.html#time-objects

"""
in Boolean contexts, a time object is considered to be true if and only if, 
after converting it to minutes and subtracting utcoffset() (or 0 if that’s 
None), the result is non-zero.
"""

--
nosy: +tim_one

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

This is by design.  I don't have a reference, but I do remember this being 
discussed.  Suggestions for improving the documentation are welcome.

--

___
Python tracker 

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



[issue12993] prepared statements in sqlite3 module

2012-02-03 Thread Georg Brandl

Changes by Georg Brandl :


--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Georg Brandl

Georg Brandl  added the comment:

BTW, "being a valid time" is not a good argument: 0, "" or False are all valid 
instances of their types.

--

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Georg Brandl

Georg Brandl  added the comment:

It must be by design -- someone has implemented a __bool__ (formerly 
__nonzero__) method; otherwise all objects would be true.

--
nosy: +georg.brandl, lemburg

___
Python tracker 

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



[issue5300] distutils ignores file permissions

2012-02-03 Thread Patrick Andrew

Changes by Patrick Andrew :


--
components: +Distutils2 -Distutils
nosy: +alexis
title: build_module failure -> distutils ignores file permissions
versions: +3rd party -Python 2.7

___
Python tracker 

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



[issue5300] build_module failure

2012-02-03 Thread Patrick Andrew

Changes by Patrick Andrew :


--
title: build_module faulre -> build_module failure

___
Python tracker 

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



[issue5300] build_module faulre

2012-02-03 Thread Patrick Andrew

Changes by Patrick Andrew :


--
components: +Distutils -Distutils2
title: Distutils ignores file permissions -> build_module faulre
versions: +Python 2.7 -3rd party

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker

Lakin Wecker  added the comment:

Right. I've updated my code to be more correct:

instead of:

if not start_time:
start_time = default_time

it now reads:

if start_time is None:
start_time = default_time

which operates correctly and works fine for my case, I just thought it was odd 
that one time out of all of them evaluates to False.  I too wonder if it's by 
design or not.

It's definitely not documented if it is by design.

--

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +belopolsky

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread R. David Murray

R. David Murray  added the comment:

I don't think I would have ever thought of testing a datetime for its truth 
value.  But the behavior you observe is consistent with the rest of Python: 0 
is false.

I wonder if this is by design or by accident.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker

Changes by Lakin Wecker :


--
components: +Library (Lib)
type:  -> behavior

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker

Lakin Wecker  added the comment:

I'm updating the versions to the ones that I've actually tried it on - this is 
not an exhaustive search at this point.

--
versions: +Python 2.6, Python 2.7

___
Python tracker 

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



[issue13936] datetime.time(0, 0, 0) evaluates to False despite being a valid time

2012-02-03 Thread Lakin Wecker

New submission from Lakin Wecker :

midnight is represented by datetime.time(0,0,0).  However, this time (unlike 
all other valid times, including datetime.time(0,0,1)) evalutes to false in if 
conditions:

import datetime
if datetime.time(0,0,0):
print "datetime.time(0,0,0) is not a bug!"
else:
print "datetime.time(0,0,0) is a bug!"

if datetime.time(0,0,1):
print "datetime.time(0,0,1) is not a bug!"
else:
print "datetime.time(0,0,1) is a bug!"

--
messages: 152556
nosy: Lakin.Wecker
priority: normal
severity: normal
status: open
title: datetime.time(0,0,0) evaluates to False despite being a valid time

___
Python tracker 

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



[issue6210] Exception Chaining missing method for suppressing context

2012-02-03 Thread Ethan Furman

Ethan Furman  added the comment:

I just noticed that no one is assigned to this issue -- anybody on the nosy 
list able to review?

--

___
Python tracker 

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



[issue13124] Add "Running a Build Slave" page to the devguide

2012-02-03 Thread Stefan Krah

Stefan Krah  added the comment:

Eric Snow  wrote:
> Incidentally, the second patch is a bit cleaner than the first.

Yes, indeed it is. :) To prevent a misunderstanding: In my last mail I was
talking about the "Build Slaves and Security" additions to:

http://wiki.python.org/moin/BuildBot

--

___
Python tracker 

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



[issue12142] Reference cycle when importing ctypes

2012-02-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +meador.inge

___
Python tracker 

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



[issue12993] prepared statements in sqlite3 module

2012-02-03 Thread poq

poq  added the comment:

This can be closed.

--

___
Python tracker 

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



[issue12142] Reference cycle when importing ctypes

2012-02-03 Thread poq

poq  added the comment:

I've attached a patch for the _array_type change.

The long double fix is probably dependent on PEP3118 (#3132).

--
keywords: +patch
Added file: http://bugs.python.org/file24413/ctypes-leak.patch

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2012-02-03 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> In fact, you can create those files from python, files that python can not 
> unpack later.

Really? How so? BZ2File only started accepting the "a" mode in 3.3
(thanks to Nir's patch for this issue, actually).

> If the refusal of backporting this to 3.2 and 2.7 is firm, I would beg to 
> document this limitation in the 2.7/3.2 docs. It is serious enough.

Of course. I'll add a note to the docs once I've created the bz2file
package on PyPI, so we can refer readers to it.


> As the bug/feature judgment is not easy to make, I think python-dev should be 
> asked.

Fair enough; I was actually going to suggest consulting the 2.7 release
manager, but I suppose getting more opinions on the mailing list makes
sense.

--

___
Python tracker 

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



[issue13935] Tarfile - Fixed GNU tar header base-256 handling

2012-02-03 Thread Oskar Wycislak

New submission from Oskar Wycislak :

On line 199 in tarfile.py comparison should be done without chr() because s[0] 
is an integer.
Also on line 208 there should be no ord() for the same reason.

I think this is fixed in Python 3.3

I'm sorry for not providing a patch but it's late and I do not have mercurial 
installed.

--
components: Library (Lib)
messages: 152550
nosy: canto
priority: normal
severity: normal
status: open
title: Tarfile - Fixed GNU tar header base-256 handling
type: crash
versions: Python 3.2

___
Python tracker 

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



[issue13773] Support sqlite3 uri filenames

2012-02-03 Thread poq

poq  added the comment:

> Can you open a bug report for that?

Opened #13934.

> I think the doc could link to the sqlite.org doc about URIs.

I considered this, but the rest of the sqlite3 module documentation doesn't 
link to the sqlite.org doc pages either. There is only a link to 
http://www.sqlite.org under 'See also'.

--

___
Python tracker 

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



[issue13934] sqlite3 test typo

2012-02-03 Thread poq

New submission from poq :

The test CheckCollationIsUsed in Lib/sqlite3/test/hooks.py never runs because 
it checks the wrong version tuple. Patch attached.

--
components: Tests
files: sqlite3-test-hooks.patch
keywords: patch
messages: 152548
nosy: poq
priority: normal
severity: normal
status: open
title: sqlite3 test typo
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file24412/sqlite3-test-hooks.patch

___
Python tracker 

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



[issue13930] lib2to3 ability to output files into a different directory and alter their names

2012-02-03 Thread Gregory P. Smith

Changes by Gregory P. Smith :


Added file: http://bugs.python.org/file24411/a6cd0518495e.diff

___
Python tracker 

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



[issue13930] lib2to3 ability to output files into a different directory and alter their names

2012-02-03 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

while the initial patch below was against 3.1 I'm only intending to commit this 
to 3.2, 3.3 and 2.7.

Feature backports on lib2to3 are allowed per 
http://mail.python.org/pipermail/python-dev/2011-December/115089.html.

--
nosy: +benjamin.peterson
versions:  -Python 3.1

___
Python tracker 

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



[issue13807] logging.Handler.handlerError() may raise AttributeError in traceback.print_exception()

2012-02-03 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 813a34170ac5 by Vinay Sajip in branch '3.1':
Revert fix for #13807 mistakenly applied in this branch.
http://hg.python.org/cpython/rev/813a34170ac5

--

___
Python tracker 

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



[issue13879] Argparse does not support subparser aliases in 2.7

2012-02-03 Thread Tim Willis

Tim Willis  added the comment:

The documentation appears to be up to date in the current 2.7 repository, so 
this can probably be marked as closed/fixed.

--

___
Python tracker 

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



[issue13124] Add "Running a Build Slave" page to the devguide

2012-02-03 Thread Eric Snow

Eric Snow  added the comment:

No problem, Stefan.  :)  The main motivation was to capture the discussion at 
the time so that something actually came of it.

Adding info to the devguide, essentially the catalog/how-to of core dev 
activities, was meant to simply provide another clear avenue for those that 
wanted to help with Python's core development.  If not a dedicated page, we 
should at least have a link in the "Contributing" section to the (single, 
authoritative) resource we have on setting-up/running a build slave, regardless 
of where that resource resides.

That said, I gladly defer to those that are more involved with the buildbots.  
Incidentally, the second patch is a bit cleaner than the first.

--

___
Python tracker 

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



[issue6210] Exception Chaining missing method for suppressing context

2012-02-03 Thread Ethan Furman

Ethan Furman  added the comment:

> Because Ellipsis is now the default value for __cause__,
> 'raise ... from Ellipsis' is treated the same as 'raise ...'

Not exactly true -- if ... is a new exception then they are the same; if ... is 
a caught exception that is being reraised, __cause__ will be (re)set to 
Ellipsis.

--

___
Python tracker 

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



[issue13463] Fix parsing of package_data

2012-02-03 Thread Nick Wilson

Changes by Nick Wilson :


--
nosy: +njwilson

___
Python tracker 

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



[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread Brian Curtin

Changes by Brian Curtin :


--
resolution:  -> invalid
stage:  -> committed/rejected

___
Python tracker 

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



[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread zxw

zxw  added the comment:

Ok, thanks, that fixed it. I'll probably post some example code for anyone else 
who stumbles across this with the same problem, don't have the time right now 
however.

--
status: open -> closed

___
Python tracker 

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



[issue13889] str(float) and round(float) issues with FPU precision

2012-02-03 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Windows
stage:  -> patch review

___
Python tracker 

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



[issue13889] str(float) and round(float) issues with FPU precision

2012-02-03 Thread Mark Dickinson

Mark Dickinson  added the comment:

General shape of the patch looks good.

I'd suggest using a mask of _MCW_PC | _MCW_RC instead of just _MCW_PC, so that 
the rounding mode is also set correctly.  Probably rarely an issue in practice, 
but it's the same thing that we're doing on Linux.

If this is going near the maintenance branches (2.7, 3.2), we need to be very 
careful.

Have you had the opportunity to test the patch (e.g., run the complete Python 
test suite) both on 32-bit and 64-bit Windows?

--

___
Python tracker 

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Thanks for the patch. Committed with an additional fix in refcounting.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset aa3680d2c24d by Martin v. Löwis in branch 'default':
Issue #13777: Add PF_SYSTEM sockets on OS X.
http://hg.python.org/cpython/rev/aa3680d2c24d

--
nosy: +python-dev

___
Python tracker 

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Michael Goderbauer

Michael Goderbauer  added the comment:

Here is the regenerated patch.

To write a test case I would need a PF_SYSTEM socket to connect to. As far as I 
know Mac OS X doesn't provide a demo socket for this.

--
Added file: http://bugs.python.org/file24410/patch2.patch

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

Obviously I can’t fix past releases.  Sometimes the time machine is not 
available :)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread Stephen Thorne

Stephen Thorne  added the comment:

Yep - 2.7.2 was released 11th June 2011, the fix was committed Aug 1st 2011. So 
it won't be in the current 2.7 release.

--

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

> The changesets are not in the release27-maint branch.
Where did you look?  This looks like a Subversion branch name, but now we’re 
using Mercurial.  If you look a few messages up, you’ll see that a changeset 
was committed to the 2.7 branch and will be included in 2.7.3.

--

___
Python tracker 

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



[issue11104] distutils sdist ignores MANIFEST

2012-02-03 Thread John Dennis

John Dennis  added the comment:

The changesets are not in the release27-maint branch. sdist still does not 
generate a correct archive for release, this is a very serious regression.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue13861] test_pydoc failure

2012-02-03 Thread Éric Araujo

Éric Araujo  added the comment:

Adding Ned, who refactored these tests, to nosy.

--
nosy: +ned.deily

___
Python tracker 

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



[issue13861] test_pydoc failure

2012-02-03 Thread Stefan Krah

Stefan Krah  added the comment:

Eric Araujo  wrote:
> docutils is the first package that???s found in my user site-packages;
> can you tell if your Crypto package is in that same location?

The package is here:

/usr/local/lib/python3.3/site-packages/Crypto/SelfTest/Protocol/test_AllOrNothing.py

The tests are (naturally) run in the cpython repo, but
/usr/local/lib/python3.3/site-packages is in sys.path.

--

___
Python tracker 

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



[issue13933] IDLE:not able to complete the hashlib module

2012-02-03 Thread Ramchandra Apte

New submission from Ramchandra Apte :

No completion appears when I import hashlib in IDLE and type in "hashlib." and 
press Tab to complete.
With any other module it works.

--
components: IDLE, Library (Lib)
messages: 152531
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: IDLE:not able to complete the hashlib module
type: behavior
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue13824] argparse.FileType opens a file and never closes it

2012-02-03 Thread David Layton

David Layton  added the comment:

Eric,

checked that the file exists
But then you’d run into race conditions.  The only sure was to say if a
file can be opened is to open it.

I think you misunderstand me. I am NOT suggesting that you open and
close the file. I am saying that you should not open it in the first place.
If I cannot open the file at the point in my program where I actually want
to open it, then fine, I can decide, in my own code, what to do.

propensity to encourage bad
> coding.
I think the problem is not as bad as you paint it.  A great number of
unclosed file handles may cause problem to some OSes, but that’s it.  On
the plus side, the fact that argparse accepts for its type argument any
callable that can check and convert a string input is simple, clean and
works.  FileType is needed.

  Causing a problem on some OSes and not others is worse than causing a
problem on all OSes as it increases the likelihood of buggy code passing
tests and moving to production.
 I think argparse is wonderful; I just think that by having FileType not
open the file, the number of it's use cases is increased. As it stands now,
I would prefer the just pass the argument as a string argument and handling
the opening myself unless:

   1. I wanted my program to open the file at the very beginning of the
   program (where one traditionally handles arg parsing)
   2. I wanted to exit on the first, and only, attempt to open the file
   3. I really did not care if the file closed properly--which, granted, is
   often the case with tiny scripts

The moment any of these is not true due to a change in requirements, I will
have to refactor my code to use a filename arg. Where as if I start out
with a bog-standard filename and open it myself, I can easily add the
behaviour I want. I just don't see FileType as a big convenience. However,
I do see that changing this would break backwards compatibility and would
not want to see that happen. Perhaps a new FileNameType that does some
basic, perhaps, optional checks would have wider use-cases.

I hope this helps.

David Layton

On Fri, Feb 3, 2012 at 2:37 PM, Éric Araujo  wrote:

>
> Éric Araujo  added the comment:
>
> s/sure was/sure way/
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Also: Can you propose test cases for this socket family?

--

___
Python tracker 

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



[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2012-02-03 Thread Walter Dörwald

Walter Dörwald  added the comment:

See this ancient posting about this problem:

   http://mail.python.org/pipermail/python-dev/2002-August/027661.html

(see point 4.). So I guess somebody did finally complain! ;)

The error attributes are documented in PEP 293. The existence of the attributes 
is documented in Doc/c-api/exceptions.rst, but not their meaning.

--
nosy: +doerwalter

___
Python tracker 

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



[issue13931] os.path.exists inconsistent between 32 bit and 64 bit

2012-02-03 Thread Tim Golden

Tim Golden  added the comment:

This is the Windows x64 file system redirector at work. I can't get 
through to msdn at the moment to get a link, but Google for those
terms.

--
nosy: +tim.golden

___
Python tracker 

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



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-02-03 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The patch fails to apply in configure.in. Can you please regenerate it?

--
nosy: +loewis

___
Python tracker 

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



[issue13932] If some test module fails to import another module unittest reports a very misleading message

2012-02-03 Thread Sébastien Barthélémy

New submission from Sébastien Barthélémy :

If some test module (say, testmath) fails to import some other module, unittest 
reports a very misleading message:

  AttributeError: 'module' object has no attribute 'testmath'

Would it be possible improve the message or, better, to simply make the test as 
failed. (Maybe be by inspecting the ImportError exception message).

Consider the following example (and notice the typo at "import mathhh"):

mkdir -p test
touch test/__init__.py
cat > test/testmath.py <
main(module=None)
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
  File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'testmath'

--
components: Library (Lib)
messages: 152525
nosy: sbarthelemy
priority: normal
severity: normal
status: open
title: If some test module fails to import another module unittest reports a 
very misleading message
versions: Python 2.7

___
Python tracker 

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



  1   2   >