[issue14657] Avoid two importlib copies

2012-04-29 Thread Nick Coghlan

Nick Coghlan  added the comment:

Uploaded new bootstrapping patch that handles the fully explicit import 
machinery.

I also tweaked a couple of things so it plays nicely in terms of building an 
initial version with the checked in importlib.h. Specifically: pythonrun still 
calls _frozen_importlib._install and can tolerate that function returning None. 
Longer term, we'd give the two hooks different names and returning None will 
become a fatal error, but for the moment, the current behaviour makes the patch 
much easier to work with.

Order is still wrong relative to the zipimport machinery and I haven't 
benchmarked the startup time overheads.

--
Added file: 
http://bugs.python.org/file25403/issue14657_bootstrap_from_disk_v2.diff

___
Python tracker 

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



[issue14236] re: Docstring for \s and \S doesn’t mention Unicode

2012-04-29 Thread py.user

py.user  added the comment:

\S is equivalent to [^\s]
like \d with \D

--

___
Python tracker 

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



[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

Here's a patch.

--
assignee: docs@python -> ezio.melotti
keywords: +patch
stage: needs patch -> commit review
Added file: http://bugs.python.org/file25404/issue14558.diff

___
Python tracker 

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



[issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b26471a2a115 by Ezio Melotti in branch '2.7':
#14519: fix the regex used in the scanf example.
http://hg.python.org/cpython/rev/b26471a2a115

New changeset e317d651ccf8 by Ezio Melotti in branch '3.2':
#14519: fix the regex used in the scanf example.
http://hg.python.org/cpython/rev/e317d651ccf8

New changeset 7cc1cddb378d by Ezio Melotti in branch 'default':
#14519: merge with 3.2.
http://hg.python.org/cpython/rev/7cc1cddb378d

--
nosy: +python-dev

___
Python tracker 

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



[issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers

2012-04-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

Fixed, thanks for the report and the suggestions!

--
assignee: docs@python -> ezio.melotti
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
type:  -> enhancement

___
Python tracker 

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



[issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview

2012-04-29 Thread Ramchandra Apte

New submission from Ramchandra Apte :

A code example is not highlighted in the 3.3 docs for memoryview 
(http://docs.python.org/dev/library/stdtypes.html#memoryview)
Only 3.3 is affected by this bug as the code example is for a feature in 3.3.

--
assignee: docs@python
components: Documentation
messages: 159590
nosy: docs@python, ramchandra.apte
priority: normal
severity: normal
status: open
title: a code example not highlighted in 
http://docs.python.org/dev/library/stdtypes.html#memoryview
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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

test_process_time_threads is failing on one of the buildbots:
"""
==
FAIL: test_process_time_threads (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-arm/build/Lib/test/test_time.py",
 line 408, in test_process_time_threads
self.assertGreater(t2 - t1, 0.1)
AssertionError: 0.0804141256118 not greater than 0.1
"""

The test is a bit too optimistic: a thread is looping for 0.2s, and the test 
checks that the process time (user + system) increased of at least 0.1s. If the 
thread is preempted, there's a high chance you won't get even as low as 0.1s.
I see two options: either increase the total running time, to make it really 
likely you'll get a chance to run (or decrase the lower threshold), or use 
times(2), and check the result against that (does Windows have such a syscall?).

--
status: closed -> open

___
Python tracker 

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



[issue14690] Use monotonic time for sched, trace and subprocess modules

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

LGTM.
Juste one nitpick: why do you sometimes import the clock source as get_time() 
and others _time()? _time() looks fine to me.

--

___
Python tracker 

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



[issue12947] Examples in library/doctest.html lack the flags

2012-04-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

Is there a way to add a :keep-doctest-flags: options to literal blocks?

--
stage: test needed -> needs patch
type:  -> enhancement

___
Python tracker 

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



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

2012-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Support lines in zipfile looks contradictory and buggy. This complicates the 
code and makes the behavior of zipfile.ZipExtFile incompatible with the 
interface of other file-like objects. For example, the behavior of the read, 
read1 and peek differ from one described in io module.

If we are working with binary data, conversion of newlines is meaningless (and 
how about newlines in comments?). If we are working with text, the bytes must 
be decoded to str. This will help io.TextIOWrapper.

I suggest two alternatives:

1. Deprecate universal newline support in zipfile. zipfile.ZipExtFile should 
always work with non-modified bytes, and who need the text, let wraps 
zipfile.ZipExtFile with io.TextIOWrapper.

2. Automatically wrap a zipfile.ZipExtFile with io.TextIOWrapper if universal 
newlines mode is enabled. In this case, the data type will change from bytes to 
str. Add modes "t" and "b" to explicitly specify the data type. Add an encoding 
parameter (and other parameters if needed).

--
nosy: +storchaka

___
Python tracker 

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



[issue11352] Update cgi module doc

2012-04-29 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

What is the reason for this one to languish for over a year now? Lack of proper 
patch? It’s marked “high priority”, so let’s get moving.

--
nosy: +hynek, sandro.tosi

___
Python tracker 

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Jakob Simon-Gaarde

New submission from Jakob Simon-Gaarde :

Hi
It seems like the parse_constant keyword parameter for registering a callback 
function is no longer called in Python 2.7.

http://docs.python.org/library/json.html#json.load

I am using Python 2.7.3 on Ubuntu 12.04

I have created and attached a script that shows the problem.
Output in Python 2.6:
Met an int!
Met a constant!
{u'a': None, u'b': None}

Output in Python 2.7:
Met an int!
{u'a': None, u'b': False}

So parse_int callback still works btw.

Best Regards Jakob Simon-Gaarde

--
components: Extension Modules
files: test_parse_constant.py
messages: 159596
nosy: Jakob.Simon-Gaarde
priority: normal
severity: normal
status: open
title: json.joads parse_constant callback not working anymore
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file25405/test_parse_constant.py

___
Python tracker 

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



[issue14236] re: Docstring for \s and \S doesn’t mention Unicode

2012-04-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

Good point.

--

___
Python tracker 

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



[issue14236] re: Docstring for \s and \S doesn’t mention Unicode

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 23d5b457dc71 by Ezio Melotti in branch '3.2':
#14236: fix docs for \S.
http://hg.python.org/cpython/rev/23d5b457dc71

New changeset 9165774a8055 by Ezio Melotti in branch 'default':
#14236: merge with 3.2.
http://hg.python.org/cpython/rev/9165774a8055

--

___
Python tracker 

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue14671] isinstance(obj, object) returns True for _old style_ class instances

2012-04-29 Thread Q

Q  added the comment:

thanks, that's rather convenient

--

___
Python tracker 

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This behavior was changed in changeset f686aced02a3 three year ago. If this 
change is intentional, then you need edit documentation.

--
nosy: +storchaka

___
Python tracker 

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

Hi Jakob,

parse_constant has been changed as of d95e5add3ca4 to be called only on 
"-Infinity, Infinity, NaN":

``parse_constant``, if specified, will be called with one of the
following strings: -Infinity, Infinity, NaN.
This can be used to raise an exception if invalid JSON numbers
are encountered.

And indeed, if you change your example to Infinity, it gets called.

That said, neither the 2.7 nor the dev docs reflect that. So it seems like a 
documentation bug to me.

--
assignee:  -> docs@python
components: +Documentation -Extension Modules
nosy: +docs@python, eric.araujo, georg.brandl, hynek
versions: +Python 3.2, Python 3.3

___
Python tracker 

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
Added file: http://bugs.python.org/file25406/json_parse_constant_doc.patch

___
Python tracker 

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



[issue14315] zipfile.ZipFile() unable to open zip File

2012-04-29 Thread Yuval Greenfield

Yuval Greenfield  added the comment:

If we're modifying zipfile, please consider adding the reviewed patch for 
ZipFile.remove at http://bugs.python.org/issue6818

--
nosy: +ubershmekel

___
Python tracker 

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



[issue10376] ZipFile unzip is unbuffered

2012-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Actually reading from the zip file is buffered (at least 4 KiB of uncompressed 
data at a time).

Can you give tests, scripts and data, which show the problem?

--

___
Python tracker 

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



[issue14671] isinstance(obj, object) returns True for _old style_ class instances

2012-04-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14692] json.joads parse_constant callback not working anymore

2012-04-29 Thread Ezio Melotti

Ezio Melotti  added the comment:

The original changeset is at [0], and the commit message just says "even more 
decoder optimizations".  The official website[1] and the RFC[2] don't list any 
constant, so I guess the definition of what a constant is is not well defined.

[0]: http://code.google.com/p/simplejson/source/detail?spec=svn103&r=103
[1]: http://www.json.org/
[2]: http://tools.ietf.org/html/rfc4627

--
nosy: +rhettinger

___
Python tracker 

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



[issue8767] Configure: Cannot disable unicode

2012-04-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14643] Security page out of date

2012-04-29 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue14313] zipfile should raise an exception for unsupported compression methods

2012-04-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
Added file: 
http://bugs.python.org/file25407/zipfile_unsupported_compression.patch

___
Python tracker 

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



[issue14672] Windows installer: add desktop shortcut(s)

2012-04-29 Thread Daniel Swanson

Daniel Swanson  added the comment:

Never mind. I think I used the start menu to do it myself.

--

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Dov Feldstern

New submission from Dov Feldstern :

Python has its own implementations of various hash functions, that can be used 
as fallbacks when openssl is not available. However, if openssl *is* available 
at build time, then these fallbacks don't get built.

It would be nice if they would get built even if openssl *was* found at build 
time:

  (1) for (perceived?) licensing issues, one might choose to run without 
linking with openssl (see 
http://mail.python.org/pipermail/python-dev/2011-March/109053.html; that 
message requests that a bug be opened about this, but I wasn't able to find it?)

  (2) for "portable" builds: build onto portable or shared storage, and run on 
multiple machines, even if openssl happens not to be available on some of the 
machines.

--
components: Build
messages: 159606
nosy: dov
priority: normal
severity: normal
status: open
title: hashlib fallback modules should be built even if openssl *is* available 
at build time
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



[issue4653] Patch to fix typos in C code

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy:  -mark.dickinson

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> that message requests that a bug be opened about this, but I wasn't able to 
> find it?

Probably because no-one opened an issue.

> build onto portable or shared storage, and run on multiple machines,
> even if openssl happens not to be available on some of the machines.

For portable builds, I would suggest you ship OpenSSL as part of the build.

--
nosy: +gregory.p.smith, pitrou
type:  -> enhancement
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



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

2012-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Deprecate universal newline support in zipfile. zipfile.ZipExtFile
> should always work with non-modified bytes, and who need the text, let 
> wraps zipfile.ZipExtFile with io.TextIOWrapper.

This would be fine with me.

--
nosy: +pitrou
stage: patch review -> needs patch
type: behavior -> enhancement
versions: +Python 3.3 -Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage:  -> needs patch

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-29 Thread Guido van Rossum

Guido van Rossum  added the comment:

I could check it in, but I probably would mess up something (which branches are 
affected?).  Let me know if you want me to.

The priorities after that would be:

1) update docs (the warning about RuntimeError needs to be moderated)
2) convert stress tests to unittests

--

___
Python tracker 

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



[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset c468511fc887 by Mark Dickinson in branch 'default':
Issue #14521: Make result of float('nan') and float('-nan') more consistent 
across platforms.  Further, don't rely on Py_HUGE_VAL for float('inf').
http://hg.python.org/cpython/rev/c468511fc887

--
nosy: +python-dev

___
Python tracker 

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



[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

Now fixed.

--
resolution:  -> fixed

___
Python tracker 

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



[issue14417] dict RuntimeError workaround

2012-04-29 Thread Guido van Rossum

Guido van Rossum  added the comment:

Actually my patch doesn't even apply cleanly.  I suspect the dict refactoring 
for shared keys interfered.  Someone please help!

--

___
Python tracker 

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



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

2012-04-29 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> This would be fine with me.

It may be worth to deprecate PEP 278?  Oh, only ten years have passed
since 2.3, but it seems it was so long ago.

--

___
Python tracker 

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



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

2012-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It may be worth to deprecate PEP 278?  Oh, only ten years have passed
> since 2.3, but it seems it was so long ago.

Well, I don't know if PEPs ever get deprecated. In this case, PEP 3116
is probably the superseder.

--

___
Python tracker 

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



[issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview

2012-04-29 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Is it a sphinx version problem? I could not figure out why that particular code 
is not highlighted. The syntax looks correct.

--
nosy: +orsenthil

___
Python tracker 

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



[issue11352] Update cgi module doc

2012-04-29 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee: docs@python -> orsenthil
nosy: +orsenthil

___
Python tracker 

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



[issue14462] In re's named group the name cannot contain unicode characters

2012-04-29 Thread Matthew Barnett

Matthew Barnett  added the comment:

It doesn't work in regex, but it probably should. IMHO, if it's a valid 
identifier, then it should be allowed.

--

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Actually, the modules are always compiled when in debug mode. Here is a patch 
to always compile them.

--
keywords: +patch
Added file: http://bugs.python.org/file25408/hashlibfallbacks.patch

___
Python tracker 

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



[issue14157] time.strptime without a year fails on Feb 29

2012-04-29 Thread Hynek Schlawack

Changes by Hynek Schlawack :


--
keywords: +needs review
stage: needs patch -> patch review

___
Python tracker 

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



[issue14082] shutil doesn't copy extended attributes

2012-04-29 Thread Hynek Schlawack

Changes by Hynek Schlawack :


--
stage:  -> patch review

___
Python tracker 

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



[issue14662] shutil.move broken in 2.7.3 on OSX (chflags fails)

2012-04-29 Thread Hynek Schlawack

Changes by Hynek Schlawack :


--
components: +Library (Lib) -None
stage: needs patch -> patch review

___
Python tracker 

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



[issue9009] Improve quality of Python/dtoa.c

2012-04-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

Dropping this due to lack of time;  unless anyone else wants to pick it up, it 
should probably be closed as "won't fix".

--
assignee: mark.dickinson -> 
priority: normal -> low

___
Python tracker 

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



[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
status: open -> closed

___
Python tracker 

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



[issue11012] Add log1p(), exp1m(), gamma(), and lgamma() to cmath

2012-04-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

Unassigning.  I'm not planning to work on this in the forseeable future, though 
I'd be happy to review patches.

--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue10433] Document unique behavior of 'getgroups' on OSX

2012-04-29 Thread Hynek Schlawack

Hynek Schlawack  added the comment:

This one LGTM, still applies cleanly against current tip and is languishing for 
a way to long time.

Commit & close?

--
nosy: +hynek
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



[issue14610] configure script hangs on pthread verification and PTHREAD_SCOPE_SYSTEM verification on Ubuntu

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

I'm closing as invalid.
If you decide to fill a bug report to your distribution (or directly to the 
libc in this case), it'd be interesting to post a link to the bug report here.

Thanks.

--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
type: crash -> compile error

___
Python tracker 

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



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

> Anybody working on this one? I’d give it a shot otherwise.

Go ahead.
You could - should? - probably use the new os.fwalk() to walk
directories in a safe maner.

--

___
Python tracker 

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



[issue14694] Option to show leading zeros for bin/hex/oct

2012-04-29 Thread endolith

New submission from endolith :

Suggestion: Add an option to bin/hex/oct functions to format binary output with 
a minimum fixed width, including leading zeros.  Also might be useful for hex 
and oct.

Currently, bin(18) produces '0b10010'

with this change, something like bin(18, foo=8) would produce '0b00010010'


Examples of people wanting this:

http://stackoverflow.com/questions/3258330/converting-from-hex-to-binary-without-losing-leading-0s-python

http://stackoverflow.com/questions/1002116/can-bin-be-overloaded-like-oct-and-hex-in-python-2-6

http://stackoverflow.com/a/1425558/125507

https://www.linuxquestions.org/questions/programming-9/in-python-printing-leading-zero-for-hex-numbers-0-through-f-719426/

--
components: Interpreter Core
messages: 159623
nosy: endolith
priority: normal
severity: normal
status: open
title: Option to show leading zeros for bin/hex/oct
type: enhancement
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



[issue14694] Option to show leading zeros for bin/hex/oct

2012-04-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

-1. str.format already does this quite effectively;  I don't see a real need to 
complicate the bin, hex and oct signatures.

>>> '{:016b}'.format(324)
'000101000100'
>>> '{:016o}'.format(324)
'0504'
>>> '{:016x}'.format(324)
'0144'

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue14694] Option to show leading zeros for bin/hex/oct

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue13698] Mailbox module should support other mbox formats in addition to mboxo

2012-04-29 Thread endolith

endolith  added the comment:

Ok.  I'm not sure what backwards compatibility issues would exist, though.

The only difference is that mboxrd converts
"\nFrom "  → "\n>From "
"\n>From " → "\n>>From "

making the conversion reversible, while mboxo does

"\nFrom "  → "\n>From "
"\n>From " → "\n>From " (no change)

which is ambiguous, and both get converted back to "\nFrom " when converting 
back to text, corrupting the original message.

mboxrd is essentially a bugfix for mboxo rather than a fundamentally different 
format.

--

___
Python tracker 

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



[issue14694] Option to show leading zeros for bin/hex/oct

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
stage:  -> needs patch

___
Python tracker 

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



[issue14626] os module: use keyword-only arguments for dir_fd and nofollow to reduce function count

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

Well, it always boils down to the same problem: should we offer thin wrappers 
around underlying syscalls or offer higher-level functions?
I personally think that offering mere wrappers around syscalls doesn't make 
much sense: Python is a very-high level language, and so should its library be.

Now, I'm in favor of adding optional argument to tune the behavior with regard 
to symlinks, however I'm skeptical about merging regular syscalls and *at() 
syscalls, for the following reasons:
- *at() syscalls are not portable: if it's not supported, what's 
remove(path='toto', dir_fd=fd) supposed to do? Throw an exception?
- it's not clear how one's supposed to check that the functions are available: 
right now, one can do
if hasattr(os, 'unlinkat'):
# use unlinkat()
else:
# fallback to unlink()
How would that work with dir_fd argument?
- some functions have actually really different prototypes:
for example:
rename(, ) -> renameat(, , , )
  trying to coalesce them into a single function will lead to awkward and ugly 
API: some arguments will be exclusive (which is almost always a sign of a bad 
API), and the order sounds really wrong:

stat(path, *, followlinks=True, dirfd=None)
is backwards, it should be
stat(dirfd, path, *, followlinks=True)

since, `path` is relative to `dirfd`.

Actually, the proper way to do this would be to use overloading, but Python 
doesn't support it (and even if it did, I think overloading would probably be a 
bad idea anyway).
- taking for a second the point of view of a user that has never heard of the 
*at() family, if I come across such a function:
chmod(path, mode, *, followlinks=True, dir_fd=None)
I'll probably have to think some time to understand what the hell is the last 
dir_fd argument. Renaming, removing a file is simple and direct, so should the 
API be.
- finally, although useful, the *at() family is a really poor and confusing 
API, which will likely be used by less than 0.1% of the overall Python users. 
Complicating the whole posix module API just to shave off a few functions is 
IMHO a bad idea.

--

___
Python tracker 

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



[issue14688] Typos in sorting.rst

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 295fec2cd5ed by Raymond Hettinger in branch '3.2':
Issue 14688: Fix typo
http://hg.python.org/cpython/rev/295fec2cd5ed

--
nosy: +python-dev

___
Python tracker 

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



[issue14688] Typos in sorting.rst

2012-04-29 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
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



[issue13959] Re-implement parts of imp in pure Python

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset eb5c5c23ca9b by Brett Cannon in branch 'default':
Issue #13959: Re-implement imp.NullImporter in Lib/imp.py.
http://hg.python.org/cpython/rev/eb5c5c23ca9b

--

___
Python tracker 

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



[issue13698] Mailbox module should support other mbox formats in addition to mboxo

2012-04-29 Thread R. David Murray

R. David Murray  added the comment:

If that's really the only difference we might indeed be able to treat it as a 
bug fix.  I'd have to look at a proposed patch to be sure.

--

___
Python tracker 

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



[issue13959] Re-implement parts of imp in pure Python

2012-04-29 Thread Brett Cannon

Brett Cannon  added the comment:

Update time!

With NullImporter dealt with, that leaves get_magic(), get_tag(), reload(), and 
get_suffixes() as things to potentially move to Lib/imp.py. I would also like 
to re-implement PyImport_ExecCodeModuleObject() as it's keeping a lot of C code 
alive just for its personal use.

--

___
Python tracker 

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



[issue13959] Re-implement parts of imp in pure Python

2012-04-29 Thread Éric Araujo

Éric Araujo  added the comment:

1659 lines less than 3.2’s import.c so far!

--

___
Python tracker 

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



[issue9154] Parser module doesn't understand function annotations.

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9f57d66689ca by Mark Dickinson in branch '3.2':
Issue #9154:  Fix parser module to understand function annotations.
http://hg.python.org/cpython/rev/9f57d66689ca

New changeset cee5cb877631 by Mark Dickinson in branch 'default':
Issue #9154: Merge fix from 3.2.
http://hg.python.org/cpython/rev/cee5cb877631

--
nosy: +python-dev

___
Python tracker 

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



[issue14034] Add argparse howto

2012-04-29 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe  added the comment:

addressing the bulk of your comments

this does not address last message, where you want the lines highlighted; it 
will be rather tedious; to me the code snippets are short enough, removing the 
need for highlighting

--
Added file: http://bugs.python.org/file25409/argparse_howto4.patch

___
Python tracker 

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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1255cac63dfc by Victor Stinner in branch 'default':
Issue #14428: Rewrite test_process_time_threads() test
http://hg.python.org/cpython/rev/1255cac63dfc

--

___
Python tracker 

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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread STINNER Victor

STINNER Victor  added the comment:

"The test is a bit too optimistic: a thread is looping for 0.2s, and the test 
checks that the process time (user + system) increased of at least 0.1s. If the 
thread is preempted, there's a high chance you won't get even as low as 0.1s."

Hum, the problem is maybe that the thread is preempted, but the first problem 
is that the test considers that time.process_time() uses seconds.

I rewrote the test to make it more reliable.

--

___
Python tracker 

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



[issue14433] Python 3 interpreter crash on windows when stdin closed in Python shell

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

Martin, is there any reason not to commit your patch?

--

___
Python tracker 

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



[issue14127] add st_*time_ns fields to os.stat(), add ns keyword to os.*utime*(), os.*utimens*() expects a number of nanoseconds

2012-04-29 Thread STINNER Victor

STINNER Victor  added the comment:

Failure on x86 OpenIndiana 3.x:

FAIL: test_stat_attributes (test.test_os.StatAttributeTests)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", 
line 240, in test_stat_attributes
self.check_stat_attributes(self.fname)
  File 
"/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_os.py", 
line 199, in check_stat_attributes
self.assertEqual(floaty, nanosecondy)
AssertionError: 133572199178458 != 133572199178457

http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.x/builds/3494/steps/test/logs/stdio

--

___
Python tracker 

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



[issue9154] Parser module doesn't understand function annotations.

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
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



[issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 925fbcfbbc45 by Sandro Tosi in branch 'default':
Issue #14691: indent the traceback so the example is highlighted
http://hg.python.org/cpython/rev/925fbcfbbc45

--
nosy: +python-dev

___
Python tracker 

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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread Charles-François Natali

Charles-François Natali  added the comment:

> Hum, the problem is maybe that the thread is preempted, but the first
> problem is that the test considers that time.process_time() uses seconds.

Hum, what?
You mean that process_time() doesn't return seconds?

--

___
Python tracker 

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



[issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview

2012-04-29 Thread Sandro Tosi

Sandro Tosi  added the comment:

It's seems like a deja-vu: I thought I saw this problem once, and was already 
fixed - bah, it was tricky (traceback needs to be indented for the code to be 
highlighted), that's why I remember it

--
nosy: +sandro.tosi
resolution:  -> fixed
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



[issue13959] Re-implement parts of imp in pure Python

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset eb68502731dd by Brett Cannon in branch 'default':
Issues #13959, 14647: Re-implement imp.reload() in Lib/imp.py.
http://hg.python.org/cpython/rev/eb68502731dd

--

___
Python tracker 

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



[issue14647] imp.reload() on a package leads to a segfault or a GC assertion failure

2012-04-29 Thread Brett Cannon

Brett Cannon  added the comment:

Fixed by http://hg.python.org/cpython/rev/eb68502731dd

--
assignee:  -> brett.cannon
resolution:  -> fixed
stage: test needed -> 
status: open -> closed

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Dov Feldstern

Dov Feldstern  added the comment:

Thanks for the prompt response!

Yes, this looks good, I made a very similar patch myself and it seemed to work 
correctly (but that was on 2.7, and I didn't know how exactly to fix up the 
tests...).

Thanks again!

--

___
Python tracker 

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



[issue13959] Re-implement parts of imp in pure Python

2012-04-29 Thread Brett Cannon

Brett Cannon  added the comment:

So here is the deal with PyImport_ExecCodeModuleObject(): bootstrapping and 
Barry has made this a little annoying. =)

First off, PyImport_ImportFrozenModuleObject() uses 
PyImport_ExecCodeModuleObject(), so that precludes just directly importing imp 
to handle this function entirely. OK, so that means just trying to chop out the 
path manipulation stuff since that is duplicating code found in imp/importlib.

The problem, though, is that PyImport_ExecCodeModuleWithPathnames() will take 
its pathname argument and try to get a source path from it if it points to some 
.pyc file (PEP 3147 or sourceless .pyc, and if that new path exists then it is 
used instead of the given path. Unfortunately that API was introduced in Python 
3.2, so there is a backwards-compatibility issue in that one can't just rip out 
the code w/o supporting it. But those semantics are the reason the equivalent 
of imp.source_from_cache() continues to exist in Python/import.c.

I see two options here. One is to simply leave the C code in, but that has the 
drawback of duplicated Python and C code. Two is to stick in a call to 
imp.source_from_cache() between PyImport_ExecCodeModuleWithPathnames() and 
PyImport_ExecCodeModuleObject() so the former retains the semantics and the 
latter doesn't pick up the bad habit before 3.3 is released.

--

___
Python tracker 

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



[issue14695] Tools/parser/unparse.py is out of date.

2012-04-29 Thread Mark Dickinson

New submission from Mark Dickinson :

Here's a patch that makes all tests in Tools/parser/test_unparse.py pass on the 
default branch.  (The 'yield from' bits would have to be removed for 3.2.)

--
components: Demos and Tools
files: unparse.patch
keywords: patch
messages: 159645
nosy: mark.dickinson
priority: normal
severity: normal
stage: patch review
status: open
title: Tools/parser/unparse.py is out of date.
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file25410/unparse.patch

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The official way for building certain modules despite auto-configuration is to 
edit Modules/Setup, or Modules/Setup.local. This already supports the exact use 
case, so I'm closing this as "works for me".

--
nosy: +loewis
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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution: works for me -> 
stage: needs patch -> patch review
status: closed -> open

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Antoine: why did you reopen it? Leave *at least* an explanation please.

--

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Antoine: why did you reopen it? Leave *at least* an explanation please.

Ah, sorry. I think it's a reasonable enhancement request, and
furthermore the patch simplifies the setup code. 
Also, it allows us to test the _md5 (etc.) modules in non-debug mode as
well. Perhaps Gregory can tell us what he thinks.

--

___
Python tracker 

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



[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 90b9781ccb5f by Alexander Belopolsky in branch '3.2':
Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
http://hg.python.org/cpython/rev/90b9781ccb5f

New changeset 6e029b6c142a by Alexander Belopolsky in branch 'default':
Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near
http://hg.python.org/cpython/rev/6e029b6c142a

--
nosy: +python-dev

___
Python tracker 

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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

If it's an official feature that these modules are always built, the patch is 
insufficient: it then also needs to adjust the build environment for Windows, 
and the packaging. It potentially also affects packaging for OSX and Linux.

I still think that users with special needs such as (1) and (2) in the original 
message are better served by editig Modules/Setup, as that also allows e.g. to 
make the modules truly builtin.

--

___
Python tracker 

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



[issue14696] parser module doesn't support nonlocal statement

2012-04-29 Thread Mark Dickinson

New submission from Mark Dickinson :

Here's a patch.

--
files: parser_nonlocal.patch
keywords: patch
messages: 159651
nosy: mark.dickinson
priority: normal
severity: normal
stage: patch review
status: open
title: parser module doesn't support nonlocal statement
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file25411/parser_nonlocal.patch

___
Python tracker 

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



[issue14696] parser module doesn't support nonlocal statement

2012-04-29 Thread Mark Dickinson

Mark Dickinson  added the comment:

Better test:  the nonlocal statements should be in a nested scope.

--
Added file: http://bugs.python.org/file25412/parser_nonlocal.patch

___
Python tracker 

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



[issue14696] parser module doesn't support nonlocal statement

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


Removed file: http://bugs.python.org/file25411/parser_nonlocal.patch

___
Python tracker 

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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

There are many sporadic failures on the buildbots:



==
FAIL: test_process_time_threads (test.test_time.TimeTestCase)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_time.py", 
line 441, in test_process_time_threads
self.assertGreaterEqual(t2 - t1, busy)
AssertionError: 0.012497368 not greater than or equal to 
0.01309399966854

--
nosy: +pitrou

___
Python tracker 

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



[issue14696] parser module doesn't support nonlocal statement

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b7e491b9094f by Mark Dickinson in branch '3.2':
Issue #14696: Fix parser module to understand 'nonlocal' declarations.
http://hg.python.org/cpython/rev/b7e491b9094f

New changeset 5acddc7c666d by Mark Dickinson in branch 'default':
Issue #14696: Merge from 3.2
http://hg.python.org/cpython/rev/5acddc7c666d

--
nosy: +python-dev

___
Python tracker 

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



[issue14696] parser module doesn't support nonlocal statement

2012-04-29 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson
components: +Library (Lib)
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



[issue14693] hashlib fallback modules should be built even if openssl *is* available at build time

2012-04-29 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I don't have a problem with always compiling them.

Distro packagers should see that the stand alone versions are not distributed 
with their package that has a dependency on openssl as they'll just be a waste 
of space.  But that is up to the distro package maintainers.

--

___
Python tracker 

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



[issue14697] parser module doesn't support set displays or set comprehensions

2012-04-29 Thread Mark Dickinson

New submission from Mark Dickinson :

>>> parser.tuple2st(parser.expr('{2}').totuple())
Traceback (most recent call last):
  File "", line 1, in 
parser.ParserError: could not validate expression tuple
[70677 refs]
>>> parser.tuple2st(parser.expr('{x**2 for x in [1, 2, 3]}').totuple())
Traceback (most recent call last):
  File "", line 1, in 
parser.ParserError: could not validate expression tuple
[70677 refs]

This seems to be already fixed in Python 2.7.

--
components: Library (Lib)
messages: 159656
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: parser module doesn't support set displays or set comprehensions
type: behavior
versions: Python 3.2, Python 3.3

___
Python tracker 

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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 0bdf0727ee29 by Victor Stinner in branch 'default':
Issue #14428: Make test_process_time_threads() less strict
http://hg.python.org/cpython/rev/0bdf0727ee29

--

___
Python tracker 

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



[issue11352] Update cgi module doc

2012-04-29 Thread STINNER Victor

STINNER Victor  added the comment:

> What is the reason for this one to languish for over a year now?

Maybe because few people are concerned by the cgi module?

> Lack of proper patch?

It would help to have a patch attached to the issue, and a review of the patch.

--

___
Python tracker 

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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset ad3d6010379b by Victor Stinner in branch 'default':
Issue #14428: Remove test_process_time_threads() from test_time
http://hg.python.org/cpython/rev/ad3d6010379b

--

___
Python tracker 

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



[issue7677] improve error message for setup.py upload --sign without --identity

2012-04-29 Thread Éric Araujo

Éric Araujo  added the comment:

We had a look at this bug during a sprint last week.  First, it is reasonable 
to use --sign without --identity, as gpg will fall back to a default identity 
(see the description of --local-user and --default-key in the gpg man page).  
Second, it looks like you run distutils commands from a script or makefile and 
you have a bug there (the “skipped "gn"” message looks suspicious, maybe -sign 
was used instead of --sign and interpreted as -s -i gn).  Finally, even though 
we thing this is not a bug, we agreed that it would be nicer to print a message 
to make clear that distutils2 is not broken but shows the error message from 
gpg on purpose; this may be done during the next sprint.

--
assignee: tarek -> eric.araujo
components:  -Distutils
nosy: +alexis
versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue7677] upload: improve display for error messages from gpg

2012-04-29 Thread Éric Araujo

Changes by Éric Araujo :


--
title: improve error message for setup.py upload --sign without --identity -> 
upload: improve display for error messages from gpg

___
Python tracker 

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



[issue6114] distutils build_ext path comparison only based on strings

2012-04-29 Thread Éric Araujo

Éric Araujo  added the comment:

Two people started working on this during the first Montreal sprint.

--
versions: +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



[issue14428] Implementation of the PEP 418

2012-04-29 Thread STINNER Victor

STINNER Victor  added the comment:

> You mean that process_time() doesn't return seconds?

Yes, dt is not a number of seconds in the following example:

t1=time.process_time(); (...); t2=time.process_time(); dt=t2-t1

> I see two options: either increase the total running time,
> to make it really likely you'll get a chance to run
> (or decrase the lower threshold), or use times(2), and
> check the result against that (does Windows have such a syscall?).

I wrote the test to check if time.process_time() measures the total CPU of the 
process, and not the CPU time of only the current thread.

I'm tired of this PEP, so I just removed the test. I don't think that it is 
really interesting and it looks difficult to write a reliable test.

--

___
Python tracker 

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



[issue14687] Optimize str%tuple for the PEP 393

2012-04-29 Thread STINNER Victor

STINNER Victor  added the comment:

Updated patch:
 - use also PyUnicode_Kind for kind and fmtkind
 - fix compiler warnings
 - initialize data outside the loop
 - avoid duplicate PyUnicode_READ() where it is possible
 - minor code cleanup

--
Added file: http://bugs.python.org/file25413/pyunicode_format-2.patch

___
Python tracker 

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



  1   2   >