[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-05-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

Bumping the target version to 3.4.

This is still a good long term idea, but it's a substantial enough change that 
we really want to land it early in a development cycle so we have plenty of 
time to hammer out any issues.

--
versions: +Python 3.4 -Python 3.3

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



[issue14805] Support display of both __cause__ and __context__

2012-05-14 Thread Nick Coghlan

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

With PEP 415 accepted as the implementation of the raise exc from None 
syntax, it raises the prospect of exceptions with both __cause__ and 
__context__ set to non-None values, and __suppress_context__ set to False.

The initial PEP 415 patch treats this case the same way PEP 409 did: it ignores 
__context__ if *either* __cause__ is not None *or* __suppress_context__ is True.

This issue proposes that at least the default exception display routine and the 
display routine in the traceback module be updated to display the __context__ 
any time __suppress_context__ is False, even if __cause__ is also non-None.

--
components: Interpreter Core, Library (Lib)
messages: 160609
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Support display of both __cause__ and __context__
type: enhancement
versions: Python 3.3

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



[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-14 Thread STINNER Victor

STINNER Victor victor.stin...@gmail.com added the comment:

I created a new repository to optimize str.format and str%args.

--
hgrepos: +125

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



[issue14805] Support display of both __cause__ and __context__

2012-05-14 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
dependencies: +improved PEP 409 implementation

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



[issue14133] improved PEP 409 implementation

2012-05-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

I have accepted the PEP.

Issue 14805 now covers the separate question of allowing both __cause__ and 
__context__ to be displayed in the same traceback.

--

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



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

This whole issue doesn't affect 3.3.

For 2.7/3.2 there are three possible options:
 1) remove constant folding altogether on unicode (this is the solution adopted 
by PyPy);
 2) scan the string up to the index looking for non-BMP chars and disable the 
constant folding if they are found (probably not very efficient);
 3) leave the buggy code there (might lead to obscure failures in remote 
cases);

Any opinions?

--
versions:  -Python 3.1, Python 3.3

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



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

Attached a patch that implements option 1).

--
stage: needs patch - commit review
Added file: http://bugs.python.org/file25575/issue5057-3.diff

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



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Option 2) would have my preference.

--

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



[issue14806] re.match does not match word '{'

2012-05-14 Thread zk

New submission from zk bsn...@gmail.com:

 type(re.match('{', '{'))
type 'NoneType'
 type(re.match('\{', '{'))
type 'NoneType'
 type(re.search('\{', '{'))
type '_sre.SRE_Match'
 type(re.search('{', '{'))
type '_sre.SRE_Match'

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 160615
nosy: zk
priority: normal
severity: normal
status: open
title: re.match does not match word '{'
type: behavior
versions: Python 2.7

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



[issue14806] re.match does not match word '{'

2012-05-14 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

re.match matches only at the beginning of the string.

--
assignee:  - ezio.melotti
components: +Regular Expressions -2to3 (2.x to 3.x conversion tool)
nosy: +ezio.melotti, mrabarnett
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue14801] ssize_t where size_t expected

2012-05-14 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2bbf3ba30435 by Antoine Pitrou in branch '3.2':
Use size_t, not ssize_t (issue #14801).
http://hg.python.org/cpython/rev/2bbf3ba30435

New changeset 64b695a6cc3d by Antoine Pitrou in branch 'default':
Use size_t, not ssize_t (issue #14801).
http://hg.python.org/cpython/rev/64b695a6cc3d

--
nosy: +python-dev

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



[issue14801] ssize_t where size_t expected

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Should be ok now, thank you.

--
nosy: +pitrou
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.3

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



[issue14800] stat.py constant comments + docstrings

2012-05-14 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 2a695cbdf090 by Giampaolo Rodola' in branch 'default':
Issue 14800: add comments explaining stat.py constants + docstring for S_* 
functions.
http://hg.python.org/cpython/rev/2a695cbdf090

--
nosy: +python-dev

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



[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Here's against 2.7 which proved to be a can of worms. I tried to be as 
unobstructive as possible.

Please have a look at it, I'm sure I forgot some parenthesis somewhere.

--
Added file: http://bugs.python.org/file25576/doc-default-args-v2-2.7.diff

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Giampaolo Rodola'

New submission from Giampaolo Rodola' g.rod...@gmail.com:

As per:
http://mail.python.org/pipermail/python-ideas/2012-May/015104.html
Patch is in attachment.

--
components: Library (Lib)
files: filemode.patch
keywords: easy, patch
messages: 160621
nosy: giampaolo.rodola, terry.reedy
priority: normal
severity: normal
status: open
title: Move tarfile.filemode() into stat module
versions: Python 3.3
Added file: http://bugs.python.org/file25577/filemode.patch

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



[issue5057] Unicode-width dependent optimization leads to non-portable pyc file

2012-05-14 Thread Armin Rigo

Armin Rigo ar...@users.sourceforge.net added the comment:

Did anyone ever show that this particular detail, which looks like a completely 
obscure case to me, has any measurable effect on any code whatsoever?  Just 
coming up with numbers, but I'm sure it gives you 5% on the most specially 
tuned micro-benchmark, and nothing at all in all other cases.

Just saying my vote goes for option 1, but I won't argue if people feel that 
it's a good investment of their time :-)

--

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



[issue12098] Child process running as debug on Windows

2012-05-14 Thread Richard Oudkerk

Richard Oudkerk shibt...@gmail.com added the comment:

 - the function generating the flags should be exported (with a private 
 name), so that it can be reused by Lib/test/[test_]support.py. Duplicate 
 code is error-prone, especially when enumerating command-line flags, 
 attribute names...

Failure to build _multiprocessing will mean that multiprocessing cannot be 
imported.  So if the function goes somewhere in multiprocessing then it makes 
running the test suite with multiple processes dependent on the building of 
_multiprocessing.  Not sure if that is much of a problem since one can just run 
the test suite normally.

Also I don't think -i (inspect/interactive) should be passed on: a child 
process's stdin is os.devnull.

BTW, why isn't the use of -u (unbuffered stdout, stderr) reflected in 
sys.flags?

--

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



[issue14806] re.match does not match word '{'

2012-05-14 Thread zk

zk bsn...@gmail.com added the comment:

Oops. Sorry.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14806
___
___
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-05-14 Thread Éric Araujo

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


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

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



[issue14187] add function annotation entry to Glossary

2012-05-14 Thread Éric Araujo

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

Will do.  Chris, I don’t think another entry for “annotation” is needed, given 
Raymond’s previous rejection of the paragraph talking about other languages.

--

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



[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Éric Araujo

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

I think there’s already one report for this.

--

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



[issue14802] Python 3.2 fail to compile with VC11 ARM configuration

2012-05-14 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

Thanks for your report. Unfortunately Python 3.2 won't ever work in this way 
because changing compilers would be a new feature, and bug fix releases like 
3.2 don't receive new features. Yesterday we completed the transition to VS2010 
as a step towards our 3.3 release.

We are open to supporting VS11, but it won't become the standard compiler suite 
we use until VS11 goes RTM. I'm not aware of any release schedule announced 
yet, but I believe we would need VS11 to be released before our first beta 
release, which is at the end of June. Most estimates I've seen don't look 
favorable for us supporting it in 3.3.

Another issue that may hinder this is that myself, and as far as I know, the 
other developers, do not have ARM machines available to them. I'm interested in 
continuing our transition from VS2010 on to VS11 for when it's ready, but 
anything ARM related will likely require someone else to help out, maybe even 
you :)

--
components: +Build, Windows -Interpreter Core
versions: +Python 3.3, Python 3.4 -Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14802
___
___
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-05-14 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

Modified patch adopted in 3.3 (changeset 596b0eaeece8), therefore the current 
patch only applies to 3.2 and 2.7. If this is a new feature, the issue can be 
closed.

--
nosy: +loewis, storchaka
versions:  -Python 3.3

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



[issue14808] Pdb does not stop at a breakpoint set on the line of a function definition

2012-05-14 Thread Xavier de Gaye

New submission from Xavier de Gaye xdeg...@gmail.com:

In the following test both breakpoints are set on the line of a
function definition. However pdb does not stop when entering foo whose
breakpoint has been set with 'break 1' while pdb stops when entering
bar whose breakpoint has been set with 'break bar'. The breakpoint
table display is identical for both breakpoints. This is inconsistent
and confusing.


===   main.py  ==
1  def foo():
2  pass
3
4  def bar():
5  pass
6
7  def main():
8  foo()
9  bar()
10
11  import pdb; pdb.runcall(main)
=
$ python main.py
 /path_to/main.py(8)main()
- foo()
(Pdb) break 1
Breakpoint 1 at /path_to/main.py:1
(Pdb) break bar
Breakpoint 2 at /path_to/main.py:4
(Pdb) break
Num Type Disp Enb   Where
1   breakpoint   keep yes   at /path_to/main.py:1
2   breakpoint   keep yes   at /path_to/main.py:4
(Pdb) continue
 /path_to/main.py(5)bar()
- pass
(Pdb) continue
$
=


The reverse occurs in the following test where pdb stops only at the
execution of the function definition when the breakpoint has been set
with a line number.

===   main.py  ==
 1  x = 1
 2
 3  def foo():
 4  pass
 5
 6  def bar():
 7  pass
 8
 9  x = 2
=
$ python -m pdb main.py
 /path_to/main.py(1)module()
- x = 1
(Pdb) break 3
Breakpoint 1 at /path_to/main.py:3
(Pdb) break bar
Breakpoint 2 at /path_to/main.py:6
(Pdb) break 9
Breakpoint 3 at /path_to/main.py:9
(Pdb) break
Num Type Disp Enb   Where
1   breakpoint   keep yes   at /path_to/main.py:3
2   breakpoint   keep yes   at /path_to/main.py:6
3   breakpoint   keep yes   at /path_to/main.py:9
(Pdb) continue
 /path_to/main.py(3)module()
- def foo():
(Pdb) continue
 /path_to/main.py(9)module()
- x = 2
(Pdb)
=


The following patch fixes both inconsistencies by having pdb stop when
entering a function and at the execution of a definition whatever the
method used to set the breakpoint (line number or function name).

Two test cases are included in the patch.

--
components: Library (Lib)
files: pdb_default.patch
keywords: patch
messages: 160629
nosy: xdegaye
priority: normal
severity: normal
status: open
title: Pdb does not stop at a breakpoint set on the line of a function 
definition
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file25578/pdb_default.patch

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



[issue14778] IrrationalVersionError should include the project name

2012-05-14 Thread Christoph Sieghart

Christoph Sieghart s...@0x2a.at added the comment:

I took a look at the code and I don't think that adding an argument to the 
IrrationalVersionError constructor is the right way to go. 

The exception is raised in places where we don't know for which project we are 
raising the exception (eg in packaging.version.NormalizedVersion).

Wouldn't it be better to make packaging.pypi.xmlrpc.Client just print the
package name with the exception?

I would be glad to contribute a patch.

--
nosy: +sigi

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



[issue14781] Default to year 1 in strptime if year 0 has been specified

2012-05-14 Thread R. David Murray

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

Datetime doesn't support BC.

--
nosy: +r.david.murray
resolution:  - invalid
status: open - closed

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



[issue14782] Tab-completion of callables displays opening paren

2012-05-14 Thread R. David Murray

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

It's issue 449227.

--
nosy: +dieresys, facundobatista, georg.brandl, gpolo, pitrou, r.david.murray, 
rnd0110

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



[issue14778] logging messages about bad version numbers should include the project name

2012-05-14 Thread Éric Araujo

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

BTW there could be an optional argument in the exception constructor for the 
project name, but that does not seem clean to me.

--
title: IrrationalVersionError should include the project name - logging 
messages about bad version numbers should include the project name

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



[issue14778] IrrationalVersionError should include the project name

2012-05-14 Thread Éric Araujo

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

You are right.  When the NormalizedVersion class is used standalone, there is 
no project name to pass, so it is the responsibility of higher-level code (the 
Metadata class I think here) to raise or log messages including the project 
name.

To make a patch, you can use the hg.python.org/distutils2 repo (also mirrored 
on Bitbucket under the python_mirrors user account for easing cloning) or the 
CPython repository.  Thanks!

--
stage:  - needs patch

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



[issue14785] Add sys._debugmallocstats()

2012-05-14 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Updated version of the patch, using test.script_helper.assert_python_ok() and 
adding a NEWS entry

--
Added file: http://bugs.python.org/file25579/add-debug-malloc-stats-v2.patch

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



[issue14799] Tkinter ttk tests hang on linux

2012-05-14 Thread R. David Murray

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

It does not hang for me on Gentoo.  When I run the test suite before a checkin, 
I use -uall, and I've never had test_ttk hang for me.  I did an 'hg pull; hg 
up' before running the command line you give below.

--
nosy: +r.david.murray

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



[issue14802] Python fails to compile with VC11 ARM configuration

2012-05-14 Thread R. David Murray

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


--
title: Python 3.2 fail to compile with VC11 ARM configuration - Python fails 
to compile with VC11 ARM configuration
type: compile error - enhancement
versions:  -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14802
___
___
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-05-14 Thread Martin Morrison

Martin Morrison martin.morri...@gmail.com added the comment:

This solution has some very undesirable properties - namely that Mar 1st is now 
less than Feb 29th!

It seems like the correct follow up fix would be to adjust the date of the 
returned struct_time back to 1900. The struct_time object doesn't have the 
validation issue, so this works fine. This pair of fixes then nicely 
circumvents the intermediate datetime object's checking, while providing a 
consistent end result.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
___
___
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-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

That's a good point, thank you. Hynek, do you want to provide a new patch?

--
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
___
___
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-05-14 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

On it.

I wonder whether it causes trouble that we return an invalid time_struct down 
the road?

--

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



[issue14785] Add sys._debugmallocstats()

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

One other nit: the C API functions shouldn't be included in the limited API.

--

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



[issue12098] Child process running as debug on Windows

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Failure to build _multiprocessing will mean that multiprocessing cannot 
 be imported.  So if the function goes somewhere in multiprocessing then 
 it makes running the test suite with multiple processes dependent on the 
 building of _multiprocessing.  Not sure if that is much of a problem
 since one can just run the test suite normally.

I don't think that's a problem indeed.

 Also I don't think -i (inspect/interactive) should be passed on: a 
 child process's stdin is os.devnull.

Ah, you're right.

 BTW, why isn't the use of -u (unbuffered stdout, stderr) reflected in 
 sys.flags?

Don't know. sys.flags was introduced in issue1816, long after the -u flag 
itself. The code to reflect -u is commented out, perhaps Christian Heimes can 
shed some light on this.

--
nosy: +christian.heimes

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



[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It would be nice to have a comparison of the available alternatives. It's not 
obvious that asking people to type some -C ... boilerplate to get code 
coverage is very user-friendly. Or am I misunderstanding the request?

--
nosy: +pitrou

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

I'm not sure filemode() is the best name for this. On the other hand, I don't 
have any suggestion.
I don't understand why you're using atexit. tearDown() and addCleanup() are 
your friends.
The call_safely thing also looks unwarranted. support.unlink() should be able 
to help you.

--
nosy: +pitrou
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14807
___
___
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-05-14 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

I have added a restoration including a short explanation + a regression test.

--
Added file: http://bugs.python.org/file25580/strptime-restore-1900.diff

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Lars Gustäbel

Changes by Lars Gustäbel l...@gustaebel.de:


--
nosy: +lars.gustaebel

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14807
___
___
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-05-14 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 This is definitely *not* a padding issue.

This is definitely a padding issue. All uncompressed files are located
so that the data starts with a 4-byte boundary (1190+30+15+1=1236, 27486
+30+17+3=27536, etc). This is, probably, allows the use of mmap for the
resources.

 As Martin pointed out, the standard says that things must be in 
 multiples of 4-bytes.

More precisely, the extra field must have at least 4-bytes length to fit
a header. The standard is insufficiently defined in terms of what would
happen if the rest of the field is less than 4 bytes (this is hidden
behind by ellipsis).

   So the record is non-portable.

De jure the record is non-portable. De facto the record is portable
(many other tools supports it). But even if it does not portable, we are
dealing with the expansion of the zip format, which is very easy support
for reading.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14315
___
___
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-05-14 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

Small adjustments to the test as discussed in IRC.

--
assignee:  - hynek
resolution: fixed - 
stage: committed/rejected - patch review
type: enhancement - behavior
Added file: http://bugs.python.org/file25581/strptime-restore-1900-v2.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
___
___
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-05-14 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 83598eb0d761 by Antoine Pitrou in branch '3.2':
Followup to issue #14157: respect the relative ordering of values produced by 
time.strptime().
http://hg.python.org/cpython/rev/83598eb0d761

New changeset d1c0b57aeb1b by Antoine Pitrou in branch 'default':
Followup to issue #14157: respect the relative ordering of values produced by 
time.strptime().
http://hg.python.org/cpython/rev/d1c0b57aeb1b

New changeset cbc9dc1c977e by Antoine Pitrou in branch '2.7':
Followup to issue #14157: respect the relative ordering of values produced by 
time.strptime().
http://hg.python.org/cpython/rev/cbc9dc1c977e

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14157
___
___
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-05-14 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Thanks, this should be fine now.

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

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Terry J. Reedy

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

1. After careful check, I am convince that converted _filemode_table (now 
private) is correct. Ditto for copied filemode function with adjusted docstring.

2. New test_stat.py is nice. I believe there is a new style of actually running 
the tests that somehow collects the list of TestCase subclasses without having 
to hand edit the run_unittest() call when new ones are added. I think it was 
briefly discussed on pydev list, but remenber nothing else. 

I mention this because I wonder if you think stat should have more tests (and 
TestCase classes). If so, a new issue could be opened after this is applied and 
mentioned on mentor list as an entry level issue for newer contributors.

3. I think the back compatibility alias should be wrapped with a deprecation 
warning. I believe the standard method would be something like the following

import warnings
def filemode(mode):
Deprecated in this location; use stat.filemode.
warnings.warn(The undocumented tarfile.filemode function\n
  has been moved to stat and documented there.,
   DeprecationWarning, 2)
return stat.filemode(mode)

Removal could be scheduled for 3.5 if not 3.4. There apparently is a way 
(unknown to me) to add a test that will fail in the future as a reminder.

4. Misc/NEWS entry suggestion:

- Issue 14807: Move undocumented tarfile.filemode() to stat.filemode() and add 
doc entry. Add tarfile.filemode alias with deprecation warning. Schedule alias 
for removal in 3.5.

5. stat module doc entry.

--
type:  - enhancement

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



[issue14809] Add HTTP status codes introduced by RFC 6585

2012-05-14 Thread EungJun Yi

New submission from EungJun Yi semtlen...@gmail.com:

This patch add HTTP status codes introduced by RFC 6585, to http.client and 
http.server.

428 Precondition Required
429 Too Many Requests
431 Request Header Fields Too Large
511 Network Authentication Required

--
components: Library (Lib)
files: rfc6585.patch
keywords: patch
messages: 160651
nosy: EungJun.Yi
priority: normal
severity: normal
status: open
title: Add HTTP status codes introduced by RFC 6585
type: enhancement
versions: Python 3.3
Added file: http://bugs.python.org/file25582/rfc6585.patch

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



[issue14809] Add HTTP status codes introduced by RFC 6585

2012-05-14 Thread Hynek Schlawack

Hynek Schlawack h...@ox.cx added the comment:

I've cross-checked the patch against the RFC and it LGTM. Tests still pass as 
expected.

--
nosy: +hynek
stage:  - patch review

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



[issue13210] Support Visual Studio 2010

2012-05-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Here is a patch to the .vcproj files and the .props files, based on my earlier 
pcbuil10.patch.
Mostly it is about removing redundant settings.  It also adds .props files for 
the pythoncore solution.

It also updates the readme, the env.bat, and adds the vs9to10.py file.
While the latter may be out of date by now, perhaps at least some vs10to9 file 
needs to be in place to support the older compiler?

--
Added file: http://bugs.python.org/file25583/pcbuildpatch.patch

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



[issue14785] Add sys._debugmallocstats()

2012-05-14 Thread Dave Malcolm

Dave Malcolm dmalc...@redhat.com added the comment:

Thanks.  I'm attaching an updated version of the patch, wrapping all new C 
entrypoints within a #ifndef Py_LIMITED_API

I also moved the existing _PyObject_DebugMallocStats() entrypoint to within a 
#ifndef Py_LIMITED_API.  As noted above, it is not documented (and these 
patches change it from accepting void to a FILE*).

--
Added file: http://bugs.python.org/file25584/add-debug-malloc-stats-v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14785
___
___
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-05-14 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

On Mon, May 14, 2012 at 12:31 PM, Serhiy Storchaka
rep...@bugs.python.org wrote:

 Serhiy Storchaka storch...@gmail.com added the comment:

 This is definitely *not* a padding issue.

 This is definitely a padding issue. All uncompressed files are located
 so that the data starts with a 4-byte boundary (1190+30+15+1=1236, 27486
 +30+17+3=27536, etc). This is, probably, allows the use of mmap for the
 resources.

So?  Someone may be using the extra fields to pad things, but for the purpose
of this issue that is completely irrelevant.  We only care about the
proper structure
of the file.  Besides, without clear reference to source code or a
specification any
hypothesis of padding is hearsay.

Did you look at the decoding I sent?  The extra length field length is clearly
reported as a size of one and the contents of the extra field are set to '\x00'.
The extra field of size one is the actual problem, not padding.

 As Martin pointed out, the standard says that things must be in
 multiples of 4-bytes.

 More precisely, the extra field must have at least 4-bytes length to fit
 a header. The standard is insufficiently defined in terms of what would
 happen if the rest of the field is less than 4 bytes (this is hidden
 behind by ellipsis).

How is it insufficiently defined at all?  It says [1]:

  In order to allow different programs and different types
  of information to be stored in the 'extra' field in .ZIP
  files, the following structure should be used for all
  programs storing data in this field:

  header1+data1 + header2+data2 . . .

  Each header should consist of:

Header ID - 2 bytes
Data Size - 2 bytes

  Note: all fields stored in Intel low-byte/high-byte order.

The ellipsis is just a standard convention for indicating a repeating
pattern.  Extra fields which are not multiples of four bytes are not
properly formed.

   So the record is non-portable.

 De jure the record is non-portable. De facto the record is portable
 (many other tools supports it). But even if it does not portable, we are
 dealing with the expansion of the zip format, which is very easy support
 for reading.

Like I said before, I am all for dropping extra fields we can not
interpret.  However,
let us be clear that with respect to the standard we are implementing
that zip files
constructed like this are ill-formed.

[1] http://www.pkware.com/documents/casestudies/APPNOTE.TXT

--

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Giampaolo Rodola'

Giampaolo Rodola' g.rod...@gmail.com added the comment:

Updated patch in attachment.

--
Added file: http://bugs.python.org/file25585/filemode.patch

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



[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Ned Batchelder

Ned Batchelder n...@nedbatchelder.com added the comment:

The difficulty that coverage faces is not measuring python programs started 
from the command line like this, you can use coverage run myprog.py or 
python -m coverage run myprog.py.

The difficulty is when there are subprocesses running python programs.  Read 
http://nedbatchelder.com/code/coverage/subprocess.html for the two current 
hacks used to invoke coverage on subprocesses.  If -C is implemented, it should 
have a PYTHONRUNFIRST environment variable (or the like) to make these hacks 
unnecessary.

--

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



[issue14807] Move tarfile.filemode() into stat module

2012-05-14 Thread Terry J. Reedy

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

Looks good enough to me except for the alias docstring. If someone does 
dir(tarfile) and help(filemode), they should get the message that it is a 
deprecated alias and should not use it.

--

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



[issue14778] logging messages about bad version numbers should include the project name

2012-05-14 Thread Christoph Sieghart

Christoph Sieghart s...@0x2a.at added the comment:

The optional argument approach doesn't seem clean to me either. 

I think the correct approach is - as you wrote - to change the higher level 
code to include the project name in the exception message.

--

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

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

Returning the compressed data from read() is clearly a bug (IMO), so detecting 
that and reporting an exception would be a bug fix.

I still like NotImplementedError more than RuntimeError, though.

--

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



[issue13210] Support Visual Studio 2010

2012-05-14 Thread Martin v . Löwis

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

LGTM. Brian?

--

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



[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2012-05-14 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Good call, Nick.

--

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



[issue14757] INCA: Inline Caching meets Quickening in Python 3.3

2012-05-14 Thread stefan brunthaler

Changes by stefan brunthaler s.bruntha...@uci.edu:


Added file: http://bugs.python.org/file25586/20120514-inca.patch

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

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

 This is definitely a padding issue. All uncompressed files are located
 so that the data starts with a 4-byte boundary (1190+30+15+1=1236, 27486
 +30+17+3=27536, etc). This is, probably, allows the use of mmap for the
 resources.

That can't possibly be the reason. mmap requires 4k (4096) alignment (on 
x86; more than that on SPARC).

Perhaps there is a reason for 4-alignment - but it can't be mmap-

--

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

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

 Like I said before, I am all for dropping extra fields we can not
 interpret.  However,
 let us be clear that with respect to the standard we are implementing
 that zip files  constructed like this are ill-formed.

I would still like to see the zipfile module to be able to detect 
ill-formed zipfiles - certainly not by default. This can be useful
to check zipfiles that somebody produces. As the Python check wouldn't
be complete, one would certainly need to apply other checks as well.

--

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



[issue14778] logging messages about bad version numbers should include the project name

2012-05-14 Thread Christoph Sieghart

Christoph Sieghart s...@0x2a.at added the comment:

I wrote a trivial patch against the CPython repository that adds the name to 
the exception message. Did I forget anything? What kind of test would make 
sense?

--
keywords: +patch
Added file: http://bugs.python.org/file25587/bad_version_number_with_name.patch

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



[issue14778] logging messages about bad version numbers should include the project name

2012-05-14 Thread Christoph Sieghart

Changes by Christoph Sieghart s...@0x2a.at:


Removed file: 
http://bugs.python.org/file25587/bad_version_number_with_name.patch

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



[issue14757] INCA: Inline Caching meets Quickening in Python 3.3

2012-05-14 Thread stefan brunthaler

stefan brunthaler s.bruntha...@uci.edu added the comment:

While looking at the instruction frequency traces, I noticed that INPLACE_* 
instructions were not quickened to optimized instruction derivatives. The 
submitted patch fixes this issue and correctly generates code performing the 
substitution. The performance improvements are noticeably better 
(iterative_count, nbody and threaded_count about 1.25x faster on average.)
The summarized performance numbers make it easy to see where actual performance 
gains* are, and which results seem to be due to measurement error.

*: It seems that the mako benchmark suite suffers a consistent loss. I am going 
to look into this.

--
Added file: http://bugs.python.org/file25588/20120514-inca-perf.txt

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



[issue14778] logging messages about bad version numbers should include the project name

2012-05-14 Thread Christoph Sieghart

Changes by Christoph Sieghart s...@0x2a.at:


Added file: http://bugs.python.org/file25589/bad_version_number_with_name.patch

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



[issue13210] Support Visual Studio 2010

2012-05-14 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

+1 on the patch. It fixes a bunch of things that I entered unnecessarily (like 
explicit .pyd names to fix the warnings), but after staring at the screen for a 
long time I couldn't figure out what I was doing wrong to need them for some 
reason.

I'm not really interested in supporting VS9 or writing a script for it, but if 
someone who wanted to use it came up with a script I don't see why we couldn't 
include it.

--

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



[issue13210] Support Visual Studio 2010

2012-05-14 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

Hm, actually, doing a 64-bit debug build fails with that patch. ctypes, 
_testbuffer, and xxlimited, the projects I originally had trouble with in the 
settings, don't link properly.

--

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



[issue13210] Support Visual Studio 2010

2012-05-14 Thread Brian Curtin

Brian Curtin br...@python.org added the comment:

Correction, both 64-bit debug and release fail.

--

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



[issue6858] This is a python file, apply syntax highlighting

2012-05-14 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware

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



[issue13400] packaging: build command should have options to control byte-compilation

2012-05-14 Thread Éric Araujo

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

FTR I asked Julien to provide his opinion as a user and he agreed that having 
just one --byte-compile/--no-byte-compile option pair seemed better than the 
existing names (where --compile and --optimize are unrelated).

I wanted to avoid --byte-compile=0 to generate pyc, because I expected people 
to interpret it as “disabled” instead of “optimization level 0”.  Thus the idea 
of using letters (and avoiding to use c and o as not all VMs have pyc and pyo 
files).

Note that the new spelling for --compile is the seemingly redundant 
--byte-compile=b, but that does not matter as it will be the default value so 
people won’t type it.

--

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



[issue14624] Faster utf-16 decoder

2012-05-14 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

The patch updated with a little clarified code and added comments.

--
Added file: http://bugs.python.org/file25590/decode_utf16_4.patch

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



[issue1294959] Problems with /usr/lib64 builds.

2012-05-14 Thread Éric Araujo

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

On Mar 29, 2011, at 10:12 PM, Matthias Klose wrote:
 no, it looks for headers and libraries in more directories.  But really, this
 whole testing for paths is wrong. Just use the compiler to search for headers
 and libraries, no need to check these on your own.

Do all compilers provide this info, including Windows ones?  If so, that would 
be a nice feature for distutils2.

Arfrever Frehtes Taifersar Arahesis (Arfrever) on 2012-05-12 19:00
 I currently think that sys.libdir should be only basename of libdir (e.g.
 lib or lib64) to allow to easily use it with something else than 
 sys.prefix.

With the new sysconfig module I don’t think we need to clutter sys with another 
attribute.

--
versions: +Python 3.3 -Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1294959
___
___
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-05-14 Thread Serhiy Storchaka

Serhiy Storchaka storch...@gmail.com added the comment:

 That can't possibly be the reason. mmap requires 4k (4096) alignment (on 
 x86; more than that on SPARC).

This may be the reason to mmap the entire file and then read aligned
binary data.

--

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



[issue14810] Bug in tarfile

2012-05-14 Thread Hans Werner May

New submission from Hans Werner May nc-may...@netcologne.de:

Bug in tarfile:

In extractall, when a file exists in tarball with changetime older than (I 
don't know, in my case it was year 1956) tarfile raises an Overflow exception:

  File /usr/lib64/python2.7/tarfile.py, line 2298, in utime
os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
OverflowError: Python int too large to convert to C long

System: Mageia 1.0
Python version: 2.7.1

--
messages: 160674
nosy: hwm
priority: normal
severity: normal
status: open
title: Bug in tarfile
versions: Python 2.7

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



[issue14805] Support display of both __cause__ and __context__

2012-05-14 Thread Arfrever Frehtes Taifersar Arahesis

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


--
nosy: +Arfrever

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



[issue11959] smtpd cannot be used without affecting global state

2012-05-14 Thread R. David Murray

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

I'm finally getting back around to this.

If asyncore and asynchat are (mostly?) supporting an alternate socket map, why 
is it necessary to copy create_socket?  Shouldn't we be fixing create_socket in 
asyncore instead?

--

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



[issue14766] Non-naive time comparison throws naive time error

2012-05-14 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 28ed782949f9 by R David Murray in branch '3.2':
#14766: Add correct algorithm for when a 'time' object is naive.
http://hg.python.org/cpython/rev/28ed782949f9

New changeset b1e03e863386 by R David Murray in branch '3.2':
#14766: Reflow the altered paragraphs.
http://hg.python.org/cpython/rev/b1e03e863386

New changeset 6ff172db8114 by R David Murray in branch 'default':
Merge #14766: Add correct algorithm for when a 'time' object is naive.
http://hg.python.org/cpython/rev/6ff172db8114

New changeset 5d1b32e33e67 by R David Murray in branch '2.7':
#14766: Add correct algorithm for when a 'time' object is naive.
http://hg.python.org/cpython/rev/5d1b32e33e67

New changeset a002638919d8 by R David Murray in branch '2.7':
#14766: Reflow the altered paragraphs.
http://hg.python.org/cpython/rev/a002638919d8

--
nosy: +python-dev

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



[issue14674] Add link to RFC 4627 from json documentation

2012-05-14 Thread Chris Rebert

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

Draft docs patch. More cross-referencing. Analysis of deviations from RFC based 
on previous docs  the RFC.

Don't know if there are relevant, more precise implementation limitations that 
need to be mentioned.

If backported to 2.x, will need to cover encodings slightly more.

--
keywords: +patch
nosy: +cvrebert
Added file: http://bugs.python.org/file25591/json.rst.patch

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



[issue14766] Non-naive time comparison throws naive time error

2012-05-14 Thread R. David Murray

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

I reformatted the first hunk a bit, hopefully to make it even a little bit 
clearer.  We're still punting the actual definition to the later section, but I 
think that's appropriate.

Thanks for the patch, Greg.

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

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



[issue14805] Support display of both __cause__ and __context__

2012-05-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue14757] INCA: Inline Caching meets Quickening in Python 3.3

2012-05-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


--
nosy: +cvrebert

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



[issue14674] Add link to RFC 4627 from json documentation

2012-05-14 Thread Chris Rebert

Changes by Chris Rebert pyb...@rebertia.com:


Added file: http://bugs.python.org/file25592/json.rst.patch

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



[issue14811] compile fails - UTF-8 character decoding

2012-05-14 Thread Glenn Linderman

New submission from Glenn Linderman v+pyt...@g.nevcal.com:

t33a.py demonstrates a compilation problem.  OK, it has a long line, but making 
it one space longer (add a space after the left parenthesis) makes it work... 
so it must not be line length alone.  Rather, since the error is about a bad 
UTF-8 character starting with \xc3, it seems that the UTF-8 decoder might play 
a role.  I was surprised that I could reduce the test case by removing all the 
lines before and after these 3: the original failure was in a much longer file 
to which I added this line.

Originally detected in 3.2.2, I upgraded to 3.2.3 and the problem still 
occurred.

--
components: Interpreter Core
files: t33a.py
messages: 160679
nosy: v+python
priority: normal
severity: normal
status: open
title: compile fails - UTF-8 character decoding
type: compile error
versions: Python 3.2
Added file: http://bugs.python.org/file25593/t33a.py

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



[issue14803] Enhanced command line features for the runpy module

2012-05-14 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

As Ned notes, to cover *implicit* creation of Python subprocesses an 
environment based solution would be needed to ensure the subprocesses adopt the 
desired settings. The advantage that has over the current workarounds is that 
it can be scoped to only affect the parent process when it is executed rather 
than affecting an entire Python installation.

As Serhiy notes, for *direct* invocation, you could use a custom module, but 
that wouldn't help with the subprocess case. In terms of implementation 
strategy, as with the -m switch, I'd probably bootstrap into runpy as soon as 
-C is encountered anyway to avoid the need for additional complexity in the C 
code.

One thing that would be useful with this is that it would eliminate some of the 
demand for -X options, since anything with a Python level API could just use -C 
instead. To use faulthandler as an example:

Current: python -Xfaulthandler
Alternate: python -C 'import faulthandler; faulthandler.enable()'

While the second is longer, the advantage is that it's the same as the way you 
enable faulthandler from Python, so there's no need to learn a special command 
(and, since its a -X option, the current way doesn't show up in the output of 
python --help).

This would also cleanly resolve the request in issue 6958 to allow 
configuration of the logging module from the command line by allowing you to 
write things like:

   python -C import logging; logging.basicConfig() script.py

The interaction with other logging configuration is obvious (it follows the 
normal rules for multiple configuration attempts) and doesn't require the 
invention of new complex rules.

Warnings ends up in a similar boat. Simple options like -Wall, -Wdefault or 
-Werror are easy to use, but more complex configuration options are tricky. 
With -C you can do whatever you like using the Python API.

Other tricks also become possible without the need for launch scripts, like 
testing import logic and fallbacks by messing with sys.path and sys.modules, or 
patching builtins or other modules.

--
title: Add -C option to run code at Python startup - Enhanced command line 
features for the runpy module

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



[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-05-14 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
title: Enhanced command line features for the runpy module - Add feature to 
allow code execution prior to __main__ invocation

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



[issue14812] Change file associations to not be a default installer feature

2012-05-14 Thread Brian Curtin

New submission from Brian Curtin br...@python.org:

With the addition of #3561, I think we might want to have the file association 
feature follow it in not being a default feature. It seems a bit off that we 
don't want to change the way python reacts on the command line by default, 
but we do want to change the way script.py reacts by default.

--
components: Installation
messages: 160681
nosy: brian.curtin, loewis
priority: normal
severity: normal
status: open
title: Change file associations to not be a default installer feature
type: behavior
versions: Python 3.2

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



[issue14133] improved PEP 409 implementation

2012-05-14 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset b0eb7d2a9542 by Benjamin Peterson in branch 'default':
PEP 415: Implement suppression of __context__ display with an exception 
attribute
http://hg.python.org/cpython/rev/b0eb7d2a9542

--
nosy: +python-dev

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



[issue14133] improved PEP 409 implementation

2012-05-14 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

Thanks for the review/dictating, Nick!

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14133
___
___
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-05-14 Thread Meador Inge

Meador Inge mead...@gmail.com added the comment:

 I would still like to see the zipfile module to be able to detect 
 ill-formed zipfiles - certainly not by default.

Agreed.  We already do produce some informational messages via the 
documented 'ZipFile.debug' attribute.  Just checking that flag and
producing a message to stdout like we do in other cases is one option.
Another, as you suggested already, is to provide a strict flag
that indicates an exception should be thrown upon encountering an 
ill-formed file.

I like the idea of reusing what we already have.  Although, when it 
fails, it doesn't fail loudly.

--

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



[issue14812] Change file associations to not be a default installer feature

2012-05-14 Thread Martin v . Löwis

Changes by Martin v. Löwis mar...@v.loewis.de:


--
versions: +Python 3.3 -Python 3.2

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



[issue14793] broken grammar in Built-in Types doc

2012-05-14 Thread Tshepang Lekhonkhobe

Tshepang Lekhonkhobe tshep...@gmail.com added the comment:

I thought the title was enough? Is it fine to merely repeat it in?

--

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



[issue14793] broken grammar in Built-in Types doc

2012-05-14 Thread Sandro Tosi

Sandro Tosi sandro.t...@gmail.com added the comment:

I think that something on the line Hey, it looks like this phrase misses some 
words, and I've just fixed it would have been nicer - IMO.

--

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



[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Nick Coghlan

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

Reading http://nedbatchelder.com/code/coverage/subprocess.html, it occurred to 
me that there are various tracing and profiling operations that could be 
cleanly handled with significantly less work on the part of the 
tracing/profiling tool authors if the interpreter supported a -C operation 
that was like the existing -c option, but *didn't* terminate the options list.

The interpreter would invoke such commands after the interpreter is fully 
initialised, but before it begins the processing to find and execute __main__.

Then, to use subprocess coverage with coverage.py as an example, you could just 
run a command like:

python -C 'import coverage; coverage.process_startup()' worker.py

Other things you could usefully do in such an invocation is reconfigure 
sys.std(in|out|err) to match the settings used on the invoking side (e.g. to 
ensure Unicode data is tunnelled correctly), configure the logging module with 
a custom configuration, configure the warnings module programmatically, enable 
a memory profiler, etc.

Providing a function that could be called from -C and then uses an atexit() 
handler to do any necessary post-processing may be significantly simpler than 
trying to use runpy.run_(path|module) to achieve a similar effect.

--
messages: 160597
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Add -C option to run code at Python startup

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



[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
stage:  - needs patch
type:  - enhancement
versions: +Python 3.3

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



[issue14803] Add -C option to run code at Python startup

2012-05-14 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
components: +Interpreter Core

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



[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-05-14 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

Committed.
Jon, thanks for your patch and your patience!

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

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



[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Hynek Schlawack

New submission from Hynek Schlawack h...@ox.cx:

After having been called out on wrong default arg notation in one of my patches 
(eg. function:: copyfile(src, dst[, symlinks=False])), I've done a grep -RPi 
\[\w+= Doc/library and fixed the cases I've found – many of them sadly from 
myself (all the symlinks=False ones). ;)

The patch is against tip, I'd back port it to 3.2 if the contents is okay (and 
do it for 2.7 too, there's a lot of this errors there, I suppose docs fixes are 
okay for 2.7?).

--
assignee: docs@python
components: Documentation
files: doc-default-args.diff
keywords: patch
messages: 160599
nosy: docs@python, eric.araujo, ezio.melotti, georg.brandl, hynek
priority: low
severity: normal
stage: patch review
status: open
title: Wrong defaults args notation in docs
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file25573/doc-default-args.diff

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



[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

The patch looks good to me, however in

-.. method:: epoll.poll([timeout=-1[, maxevents=-1]])
+.. method:: epoll.poll(timeout=-1, maxevents=-1)

it seems that maxevents can be passed only if timeout is specified, and this 
information is now lost in the signature.  If this is indeed true, it should be 
written down in the doc.

--

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



[issue14307] Make subclassing SocketServer simpler for non-blocking frameworks

2012-05-14 Thread Kristján Valur Jónsson

Kristján Valur Jónsson krist...@ccpgames.com added the comment:

Btw, I have found that socket.closesocket() is quite able, on Windows, to abort 
an ongoing accept() call.

--

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



[issue14804] Wrong defaults args notation in docs

2012-05-14 Thread Petri Lehtinen

Petri Lehtinen pe...@digip.org added the comment:

Looking at the code of epoll.poll(), it seems that 

   epoll.poll(timeout=-1, maxevents=-1)

is correct and the old 

   epoll.poll([timeout=-1[, maxevents=-1]])

is wrong, as there's no dependency between timeout and maxevents.

--
nosy: +petri.lehtinen

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



  1   2   >