[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4a17784f2fee by Georg Brandl in branch '2.6':
#8040: port versionswitcher patch to 2.6.
http://hg.python.org/cpython/rev/4a17784f2fee

--

___
Python tracker 

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e02d49db3f5b by Georg Brandl in branch '3.2':
#8040: fix jQuery incompatibility
http://hg.python.org/cpython/rev/e02d49db3f5b

--

___
Python tracker 

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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-28 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

The following syntax is broken:
if $PYTHON = not-found; then

...
checking for python3.4... python3.4
python3.4: can't open file '=': [Errno 2] No such file or directory
checking for a BSD-compatible install... /usr/bin/install -c
...

You probably want to use 'if test $PYTHON = not-found'.

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

___
Python tracker 

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Georg Brandl

Georg Brandl added the comment:

OK, with the latest patch it seems to work fine for me. I've run the autobuild 
for 2.7/3.3/3.4 and put custom built versions of 2.6/3.2 on dinsdale, so 
everything should look and work fine.

I've also added todo items to PEP 101, in order to make sure the version list 
in version_switcher.js is properly updated on new feature versions.

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



[issue8040] documentation pages should link to other versions of the same page

2012-10-28 Thread Georg Brandl

Georg Brandl added the comment:

Thanks Yury for the work!

--

___
Python tracker 

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



[issue16344] Traceback Internationalization Proposal

2012-10-28 Thread Georg Brandl

Georg Brandl added the comment:

Has this been discussed on python-dev before?  I see that your proposal is in 
PEP form; it would be a good idea to post it to python-dev since this is not a 
change that can be done without a PEP.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue16340] Decoding error due to byte-compiling venv scripts at install time

2012-10-28 Thread Konstantin Zemlyak

Changes by Konstantin Zemlyak :


--
title: Decoding error at install time when byte-compiling venv scripts -> 
Decoding error due to byte-compiling venv scripts at install time

___
Python tracker 

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



[issue16239] PEP8 arithmetic operator examples

2012-10-28 Thread Ezio Melotti

Ezio Melotti added the comment:

Thanks!

FTR, this is the changeset: http://hg.python.org/peps/rev/16dd63848921

--
stage: patch review -> committed/rejected

___
Python tracker 

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



[issue16344] Traceback Internationalization Proposal

2012-10-28 Thread Mariano Reingart

Mariano Reingart added the comment:

This has been discussed in python-ideas two years ago (I've resurrected the 
thread there)

Sadly I didn't have time for this before, but as in 15 days we have a sprint on 
cpython at PyCon Argetina 2012, maybe it would be a good idea discuss this 
again.

Sorry if I've made any mistake, this is my second patch here, and my C skills 
are rusty as I've mentioned in the other issue.

--

___
Python tracker 

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



[issue16344] Traceback Internationalization Proposal

2012-10-28 Thread Mariano Reingart

Mariano Reingart added the comment:

BTW, I'd write a draft PEP for this (attached), the online version is at 


Just let me know if it has to be uploaded/discussed elsewere

--
Added file: http://bugs.python.org/file27757/pep_i18n_traceback.txt

___
Python tracker 

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



[issue16345] dict.fromkeys() assumes 'self' is empty

2012-10-28 Thread Armin Rigo

New submission from Armin Rigo:

The implementation of dict.fromkeys() assumes that the new dictionary is empty. 
 That's not the case if we tweak __new__.  Attached example shows 
'dictresize(mp, 0)' being called with 'mp' being dictionary of 10 items.  This 
causes an infinite uninterruptible loop.

--
components: Interpreter Core
files: x.py
messages: 174009
nosy: arigo
priority: normal
severity: normal
status: open
title: dict.fromkeys() assumes 'self' is empty
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27758/x.py

___
Python tracker 

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



[issue16345] dict.fromkeys() assumes 'self' is empty

2012-10-28 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +benjamin.peterson, ezio.melotti
stage:  -> needs patch
type:  -> behavior
versions:  -Python 3.1

___
Python tracker 

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



[issue14570] Document json "sort_keys" parameter properly

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Per Chris Jerdonek, here's a combined patch that also makes the docs changes 
comply with the antiquated line length limit.

--
Added file: http://bugs.python.org/file27759/issue14570.diff

___
Python tracker 

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



[issue16345] dict.fromkeys() assumes 'self' is empty

2012-10-28 Thread Alex Gaynor

Changes by Alex Gaynor :


--
nosy: +alex

___
Python tracker 

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



[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Here's a revised patch against the default branch (3.4 I presume?).

--
Added file: http://bugs.python.org/file27760/subprocess.rst-default.diff

___
Python tracker 

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



[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-10-28 Thread Chris Rebert

Changes by Chris Rebert :


Removed file: http://bugs.python.org/file27197/subprocess.rst-3.3.patch

___
Python tracker 

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



[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Just to keep the ball rolling, in case it ends up being the solution ultimately 
chosen, here is a patch against 2.7 to document pipes.quote(). The text is 
yanked straight from shlex.quote(), the differences being:
- qualify shlex.split() references
- print function -> print statement
- add deprecation note (currently backdated to when `pipes` was added to the 
std lib; mentions what happens in 3.3)

--
versions: +Python 3.4, Python 3.5
Added file: http://bugs.python.org/file27761/pipes.rst.diff

___
Python tracker 

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



[issue16346] readline problem

2012-10-28 Thread Mathieu Dutour Sikiric

New submission from Mathieu Dutour Sikiric:

Dear all,

I tried to install Python 2.7.3 in a home directory for simplicity. On the 
Ubuntu platform that I had, the readline-dev was not installed.
So, I I tried to install the readline package either by "pip install readline" 
or "python setup.py install" and what I got was following behavior:
--
.
.
.
  File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 
1118, in write_pkg_file

self._write_field(file, 'Metadata-Version', version)

  File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 
1145, in _write_field

file.write('%s: %s\n' % (name, self._encode_field(value)))

  File "/home/dutour/opt/Python-2.7.3/lib/python2.7/distutils/dist.py", line 
1154, in _encode_field

if isinstance(value, unicode):

RuntimeError: maximum recursion depth exceeded while calling a Python object
--
So, the install went into an infinite loop and crashed.
Instead the correct error message that should have been shown at some point is 
missing .h file.

I am a beginner on Python, I asked on h...@python.org and Matthew Dixon Cowles 
indicated me that I should report the problem here.

--
components: Build
messages: 174012
nosy: mathieu37
priority: normal
severity: normal
status: open
title: readline problem
type: compile error
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



[issue16344] Traceback Internationalization Proposal

2012-10-28 Thread Ezio Melotti

Ezio Melotti added the comment:

I'm -1 on the idea for the following reasons:

* any "serious" developer is expected to know English, and novice developers 
should be encouraged to learn it, rather than being confined to a localized 
environment;
* even if the error messages are translated, all the keywords and names would 
still be in English, and the result will be even more confusing;
* even if the feature might be useful for a small subset of people, I think 
it's not big enough and the feature shouldn't be included in Python by default 
(OTOH I'm not sure how easy it is to provide it as an external module);
* translating and maintaining translations of all the error messages requires 
lot of work and we will be forced to either commit patches without translations 
or to hold them until all the translations are available;
* I personally prefer to use English for "technical" stuff, because either the 
translations keep many English word or they end up translating them with 
something improbable and result in something that is even more cryptic;
* a set of available languages should be defined and maintained;
* googling and/or reporting localized errors doesn't work too well, and the 
mechanism proposed in the PEP to restore the language is somewhat cumbersome 
IMHO;
* people might come across a localized version of Python and have to know how 
to restore the language before being able to use it;
* this will also make debugging more difficult if it happens in places where 
the user can't easily change the language (e.g. server logs);

--

___
Python tracker 

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



[issue16346] readline problem

2012-10-28 Thread Ezio Melotti

Changes by Ezio Melotti :


--
assignee:  -> eric.araujo
components: +Distutils, Distutils2
nosy: +alexis, eric.araujo, tarek
type: compile error -> behavior

___
Python tracker 

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



[issue16340] Decoding error due to byte-compiling venv scripts at install time

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 06a5fe86d87c by Vinay Sajip in branch '3.3':
Issue #16340: exclude venv/scripts from byte-compilation at installation time 
on Windows.
http://hg.python.org/cpython/rev/06a5fe86d87c

New changeset e8619f015ab9 by Vinay Sajip in branch 'default':
Issue #16340: Merged fix from 3.3.
http://hg.python.org/cpython/rev/e8619f015ab9

--
nosy: +python-dev

___
Python tracker 

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



[issue16340] Decoding error due to byte-compiling venv scripts at install time

2012-10-28 Thread Vinay Sajip

Vinay Sajip added the comment:

I've made the msi.py change. Perhaps I should also catch the exception in the 
venv script-copying code? Leaving issue open for now.

--

___
Python tracker 

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



[issue13238] Add shell command helpers to subprocess module

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Even more libraries in this vein:
http://plumbum.readthedocs.org/en/latest/
http://amoffat.github.com/sh/

--

___
Python tracker 

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



[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f9d11ca3ccd1 by Andrew Svetlov in branch '3.3':
Issue #14616: Mention shlex.quote in subprocess docs.
http://hg.python.org/cpython/rev/f9d11ca3ccd1

New changeset 72672cf5d850 by Andrew Svetlov in branch 'default':
Merge issue #14616: Mention shlex.quote in subprocess docs.
http://hg.python.org/cpython/rev/72672cf5d850

--
nosy: +python-dev

___
Python tracker 

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



[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d9ca966cd116 by Andrew Svetlov in branch '2.7':
Issue #14616: Document pipes.quote and mention this one in subprocess docs.
http://hg.python.org/cpython/rev/d9ca966cd116

--

___
Python tracker 

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



[issue14616] subprocess docs should mention pipes.quote/shlex.quote

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I have applied all patches. Thanks, Chris.

--
resolution:  -> fixed
stage:  -> 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



[issue14700] Integer overflow in classic string formatting

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 21fb1767e185 by Mark Dickinson in branch '2.7':
Issue #14700: Fix buggy overflow checks for large precision and width in 
new-style and old-style formatting.
http://hg.python.org/cpython/rev/21fb1767e185

--

___
Python tracker 

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



[issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text

2012-10-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Shouldn't this patch be attached to the referenced issue 9769 instead of 
creating a new issue?  Even the issue title is nearly the same:

9769:  PyUnicode_FromFormatV() doesn't handle non-ascii text correctly
16343: PyUnicode_FromFormatV() doesn't support utf-8 text

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue14700] Integer overflow in classic string formatting

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 102df748572d by Mark Dickinson in branch '3.2':
Issue #14700: Fix buggy overflow checks for large precision and width in 
new-style and old-style formatting.
http://hg.python.org/cpython/rev/102df748572d

New changeset 79ea0c84152a by Mark Dickinson in branch '3.3':
Issue #14700: merge tests from 3.2.
http://hg.python.org/cpython/rev/79ea0c84152a

New changeset 22c8e6d71529 by Mark Dickinson in branch 'default':
Issue #14700: merge tests from 3.3.
http://hg.python.org/cpython/rev/22c8e6d71529

--

___
Python tracker 

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



[issue14700] Integer overflow in classic string formatting

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed in 2.7 and 3.2;  extra tests ported to 3.3 and default.  Reclosing.

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



[issue7098] g formatting for decimal types should always strip trailing zeros.

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Closing as invalid.

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

___
Python tracker 

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



[issue8613] Decimal module flags undetermined when a signal is trapped.

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Unassigning.

--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue16096] Get rid of dangerous integer overflow tricks

2012-10-28 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue2813] No float formatting in PyString_FromFormat

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Okay, I've failed to take this forward.  Reclosing as out of date.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue16347] configure.ac patch

2012-10-28 Thread Antonio Cavallo

New submission from Antonio Cavallo:

I've noticed that linux distros have a set of patch to fix a hardcoded lib in 
their makefiles:

eg. Makefile.pre.in:

INCLUDEDIR=¬@includedir@
CONFINCLUDEDIR=¬$(exec_prefix)/include
SCRIPTDIR=¬…$(prefix)/lib<== HARDCODED


This is due to the fact on the 64 bit they split lib and lib64 directories.

I understand that removing such hardcoded values will be a very long task 
(multiple places where lib is hardcoded). 

To make it into incremental steps I think a good idea would be to introduce two 
simple modification into the configure.ac script: they are transparent (eg. 
won't affect in anyway the current code) but will provide the base 
infrastructure to build upon.

Please find patch attached (mercurial ref 3fb84c1da8c5 / 79960)

I'm using a build infrastructure for testing the whole patch set (I've applied 
them in full in the past) at 
https://build.opensuse.org/project/packages?project=home%3Acavallo71%3Aopt-python-interpreters.
This tracks 2.7 but the patches should be easily ported in 3.x as well.

I hope this helps,
Antonio

PS. Would be possible to remove "tabs" from cofigure.ac?

--
components: Build, Cross-Build
files: autoconfigure.dif
messages: 174028
nosy: cavallo71, doko, georg.brandl, larry, skrah, trent
priority: normal
severity: normal
status: open
title: configure.ac patch
versions: Python 2.7
Added file: http://bugs.python.org/file27762/autoconfigure.dif

___
Python tracker 

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



[issue16347] configure.ac patch

2012-10-28 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis

___
Python tracker 

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



[issue16341] In examples, "except:" should use new syntax

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

+1. 
Patch for 2.7 is attached.

--
keywords: +patch
nosy: +asvetlov
Added file: http://bugs.python.org/file27763/issue16341.diff

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-28 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +antocuni

___
Python tracker 

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



[issue16341] In examples, "except:" should use new syntax

2012-10-28 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
stage:  -> patch review

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

I've been convinced by the python-dev discussion that Antonio was right: it's 
complex_new that's in error rather than the cmath functions.  Even so, it would 
be unsafe to change the behaviour in the maintenance releases.

Attaching a new patch that disallows 'float'-type returns from the __complex__ 
method.

--
Added file: http://bugs.python.org/file27764/issue16290v2.patch

___
Python tracker 

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



[issue9530] integer undefined behaviors

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

It looks as though all the issues found by John's tool have now been fixed, 
with the exception of the ctypes issue.  There's a separate issue open for 
that, so I'm closing this issue as fixed.

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Unassigning, since I don't plan to work on this any time soon.

--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-10-28 Thread Stefan Krah

Stefan Krah added the comment:

FWIW, Solaris 9 has EOL status:

http://www.oracle.com/technetwork/server-storage/solaris10/overview/index-138972.html

I suspect we might as well close this issue, since the motivation to work
on it will be pretty low in general.

--

___
Python tracker 

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-10-28 Thread Trent Nelson

Changes by Trent Nelson :


--
nosy: +trent

___
Python tracker 

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



[issue14570] Document json "sort_keys" parameter properly

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 40aedc7da30f by Andrew Svetlov in branch '3.2':
Issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/40aedc7da30f

New changeset 090484ccba7d by Andrew Svetlov in branch '3.3':
Merge issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/090484ccba7d

New changeset 27ce005372a5 by Andrew Svetlov in branch 'default':
Merge issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/27ce005372a5

--
nosy: +python-dev

___
Python tracker 

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



[issue14570] Document json "sort_keys" parameter properly

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Thanks, Chris!
I have pushed the patch for 3.2-3.4
It cannot be applied to 2.7, please make separate patch for this version.

--
nosy: +asvetlov

___
Python tracker 

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Thanks, Stefan.  Closing.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Please publish patch for the issue.

--
nosy: +asvetlov

___
Python tracker 

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-10-28 Thread Trent Nelson

Trent Nelson added the comment:

Snakebite's got a Solaris 9 SPARC instance up and running.  It's available via 
the s9 alias.

Regarding EOL, this indicates October 2014 for 9: 
http://en.wikipedia.org/wiki/Solaris_(operating_system)#Version_history

If it's as simple as suggested, I don't mind taking ownership of this.  I'm 
going to run into it anyway as soon as I set up a Solaris 9 slave.

--

___
Python tracker 

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



[issue16348] Decimal.remainder_near documentation incorrect.

2012-10-28 Thread Mark Dickinson

New submission from Mark Dickinson:

The documentation for Decimal.remainder_near is incorrect.  It states:

"If both are equally close, the one chosen will have the same sign as self."

That's incorrect:  instead, the chosen remainder has the property that it makes 
the corresponding quotient even rather than odd.  E.g.,

>>> Decimal(25).remainder_near(Decimal(10))
Decimal('5')
>>> Decimal(35).remainder_near(Decimal(10))
Decimal('-5')

--
assignee: docs@python
components: Documentation
messages: 174039
nosy: docs@python, mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: Decimal.remainder_near documentation incorrect.
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0

2012-10-28 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16310] zipfile: allow surrogates in filenames

2012-10-28 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16340] Decoding error due to byte-compiling venv scripts at install time

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset adefc83c1128 by Vinay Sajip in branch '3.3':
Closes #16340: Handle exception while copying script to venv.
http://hg.python.org/cpython/rev/adefc83c1128

New changeset fb969187ecc2 by Vinay Sajip in branch 'default':
Closes #16340: Merged fix from 3.3.
http://hg.python.org/cpython/rev/fb969187ecc2

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



[issue14570] Document json "sort_keys" parameter properly

2012-10-28 Thread Chris Rebert

Chris Rebert added the comment:

Patch for 2.7. This assumes that changing the parameter notation is permissible.

--
Added file: http://bugs.python.org/file27765/issue14570-2.7.diff

___
Python tracker 

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



[issue16349] Document whether it's safe to use bytes for struct format string

2012-10-28 Thread Thomas Kluyver

New submission from Thomas Kluyver:

At least in CPython, format strings can be given as bytes, as an alternative to 
str. E.g.

>>> struct.unpack(b'>hhl', b'\x00\x01\x00\x02\x00\x00\x00\x03')
(1, 2, 3)

Looking at the source code [1], this appears to be consciously accounted for. 
But it doesn't seem to be mentioned in the documentation. I think the docs 
should either say it's a possibility, or warn that it's an implementation 
detail.

[1] http://hg.python.org/cpython/file/cde4b66699fe/Modules/_struct.c#l1340

--
components: Library (Lib)
messages: 174042
nosy: takluyver
priority: normal
severity: normal
status: open
title: Document whether it's safe to use bytes for struct format string

___
Python tracker 

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



[issue16348] Decimal.remainder_near documentation incorrect.

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a doc patch.

--
keywords: +patch
Added file: http://bugs.python.org/file27766/issue16348.patch

___
Python tracker 

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



[issue9742] Python 2.7: math module fails to build on Solaris 9

2012-10-28 Thread Stefan Krah

Stefan Krah added the comment:

Right, they distinguish between EOL and "Extended Support Phase":

http://www.oracle.com/technetwork/server-storage/solaris10/overview/general-137378.html

--

___
Python tracker 

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



[issue14570] Document json "sort_keys" parameter properly

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7784008e9ade by Andrew Svetlov in branch '2.7':
Issue #14570: Document json sort_keys parameter properly.
http://hg.python.org/cpython/rev/7784008e9ade

--

___
Python tracker 

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



[issue14570] Document json "sort_keys" parameter properly

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed, thanks again!

--
resolution:  -> fixed
stage: patch review -> 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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e59e274551e0 by Hynek Schlawack in branch 'default':
#1492704: Ensure and document backward compatibility of the change
http://hg.python.org/cpython/rev/e59e274551e0

--

___
Python tracker 

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



[issue16309] "PYTHONPATH=" different from no PYTHONPATH at all

2012-10-28 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16309] "PYTHONPATH=" different from no PYTHONPATH at all

2012-10-28 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I would to see some unittest if possible.

--

___
Python tracker 

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



[issue16316] Support xz compression in mimetypes module

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a3ba5fe9bfd3 by Nadeem Vawda in branch 'default':
Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
http://hg.python.org/cpython/rev/a3ba5fe9bfd3

--
nosy: +python-dev

___
Python tracker 

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



[issue16316] Support xz compression in mimetypes module

2012-10-28 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
resolution:  -> fixed
stage: patch review -> 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



[issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux

2012-10-28 Thread Andy Salnikov

Andy Salnikov added the comment:

I never submitted any patch to Python, but unless somebody more
experienced wants to contribute I can try.

--

___
Python tracker 

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



[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Brett Cannon

Brett Cannon added the comment:

Just to double-check I didn't screw up, I ran ``make distclean; ./configure; 
make -j8`` and the problem persists.

It is *only* files compiled through setup.py and not by the Makefile. I do not 
have OPT set, but I do have CFLAGS defined. But even if I explicitly unset 
CFLAGS, OPT,CPPFLAGS, LDFLAGS, and use a different shell the problem persists.



Something compiled by the Makefile:

/Users/bcannon/Developer/bin/clang -c -Wno-unused-result -DNDEBUG -g -fwrapv 
-O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I 
/Users/bcannon/Developer/include 
-I/Users/bcannon/Developer/Cellar/readline/6.2.2/include -I 
/Users/bcannon/Developer/include 
-I/Users/bcannon/Developer/Cellar/readline/6.2.2/include  -DPy_BUILD_CORE -o 
Python/frozen.o Python/frozen.c



Something compiled by setup.py:

/Users/bcannon/Developer/bin/clang -Wno-unused-result -g -O0 -Wall 
-Wstrict-prototypes -Wno-unused-value -Wno-empty-body -Qunused-arguments 
-Wno-unused-value -Wno-empty-body -Qunused-arguments -I./Include -I. 
-I/Users/bcannon/Developer/include 
-I/Users/bcannon/Developer/Cellar/readline/6.2.2/include 
-I/Users/bcannon/Developer/repo/cpython/py3.3/Include 
-I/Users/bcannon/Developer/repo/cpython/py3.3 -c 
/Users/bcannon/Developer/repo/cpython/py3.3/Modules/sha512module.c -o 
build/temp.macosx-10.8-x86_64-3.3/Users/bcannon/Developer/repo/cpython/py3.3/Modules/sha512module.o
/Users/bcannon/Developer/repo/cpython/py3.3/Modules/sha512module.c:535:12: 
warning: implicit declaration of function '_PyUnicode_CheckConsistency' is 
invalid in C99 [-Wimplicit-function-declaration]
assert(_PyUnicode_CheckConsistency(retval, 1));
   ^
/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) 
: (void)0)
^
1 warning generated.

--

___
Python tracker 

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



[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Brett Cannon

Brett Cannon added the comment:

I managed to fix it, but I did such a large swath of fixes that I need a little 
time to narrow down what did it. Report back later.

--

___
Python tracker 

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



[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a2b7a3e1ce66 by Brett Cannon in branch '3.3':
Issue #16342: Lib/_sysconfigdata.py is no longer put into Lib, so
http://hg.python.org/cpython/rev/a2b7a3e1ce66

--
nosy: +python-dev

___
Python tracker 

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



[issue16342] setup.py not compiling with NDEBUG in non-debug builds

2012-10-28 Thread Brett Cannon

Brett Cannon added the comment:

Well that was extremely frustrating to find out. Turns out a copy of 
Lib/_sysconfigdata.py was lingering in my checkout and .hgignore was hiding 
that fact from me. Fixed .hgignore, deleted the wayward file, and everything is 
now fine.

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



[issue16329] mimetypes does not support webm type

2012-10-28 Thread R. David Murray

R. David Murray added the comment:

Interesting.  So we have two choices: leave it to the platform mime types file 
to define because it is not even on track to be an official IANA standard, or 
include it with a comment that it is a de-facto standard.

The question, I guess, is how fluid the definition is likely to be.  It doesn't 
seem like the filetype mapping for the existing definitions is going to change, 
and since we don't (currently) have content-detection of any sort, the impact 
of a change in the definitions to users of our code seems minimal.  So I guess 
I'd be OK with adding it as a de-facto standard, though I'm not entirely 
comfortable with it.  But that would represent a change in policy, so others 
may want to weigh in.

--

___
Python tracker 

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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-10-28 Thread Nadeem Vawda

New submission from Nadeem Vawda:

>From issue 5210:

amaury.forgeotdarc wrote:
> Hm, I tried a modified version of your first test, and I found another
> problem with the current zlib library;
> starting with the input:
> x = x1 + x2 + HAMLET_SCENE# both compressed and uncompressed data
>
> The following scenario is OK:
> dco.decompress(x) # returns HAMLET_SCENE
> dco.unused_data   # returns HAMLET_SCENE
>
> But this one:
> for c in x:
> dco.decompress(x) # will return HAMLET_SCENE, in several pieces
> dco.unused_data   # only one character, the last of (c in x)!
>
> This is a bug IMO: unused_data should accumulate all the extra uncompressed 
> data.

Ideally, I would prefer to raise an EOFError if decompress() is called
after end-of-stream is reached (for consistency with BZ2Decompressor).
However, accumulating the data in unused_data is closer to being backward-
compatible, so it's probably the better approach to take.

--
components: Library (Lib)
files: zlib_unused_data_test.py
messages: 174056
nosy: amaury.forgeotdarc, nadeem.vawda
priority: normal
severity: normal
stage: needs patch
status: open
title: zlib.Decompress.decompress() after EOF discards existing value of 
unused_data
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file27767/zlib_unused_data_test.py

___
Python tracker 

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



[issue5210] zlib does not indicate end of compressed stream properly

2012-10-28 Thread Nadeem Vawda

Nadeem Vawda added the comment:

This bug (zlib not providing a way to detect end-of-stream) has already
been fixed - see issue 12646.

I've opened issue 16350 for the unused_data problem.

--
resolution:  -> out of date
stage: test needed -> committed/rejected
status: open -> closed
superseder:  -> zlib.Decompress.decompress/flush do not raise any exceptions 
when given truncated input streams

___
Python tracker 

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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-10-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, accumulating the data will be backward-compatible.

But what if add a special flag for zlib.decompress, which makes bz2 and lzma 
compatible decoder?  I.e.:

1) unconsumed_tail is always empty (the unconsumed data accumulated in internal 
buffer, no need manually add it to next chunk of data).  Or even non-existent.
2) EOFError raised if decompress() is called after end-of-stream is reached.

Of course, it is a new feature.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-10-28 Thread Nadeem Vawda

Nadeem Vawda added the comment:

Interesting idea, but I'm not sure it would be worth the effort. It would
make the code and API more complicated, so it wouldn't really help users,
and would be an added maintenance burden.

--

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This patch adds a function named gc.get_stats() which returns a list of 
dictionaries containing per-generation statistics:

>>> import pprint, gc
>>> pprint.pprint(gc.get_stats())
[{'collected': 0, 'collections': 12, 'uncollectable': 0},
 {'collected': 0, 'collections': 1, 'uncollectable': 0},
 {'collected': 0, 'collections': 0, 'uncollectable': 0}]

--
components: Library (Lib)
files: gc_get_stats.patch
keywords: patch
messages: 174060
nosy: benjamin.peterson, gregory.p.smith, pitrou
priority: low
severity: normal
stage: patch review
status: open
title: Add a function to get GC statistics
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27768/gc_get_stats.patch

___
Python tracker 

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



[issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input

2012-10-28 Thread Mark Dickinson

Mark Dickinson added the comment:

I created http://projects.scipy.org/numpy/ticket/2235 to track this.  Closing 
this issue.

--
status: open -> closed

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Christian Heimes

Christian Heimes added the comment:

What are the possible performance implications of the statistics?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

You mean negative implications? None :-)

--

___
Python tracker 

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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-10-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch for your suggestion.

--
keywords: +patch
Added file: http://bugs.python.org/file27769/zlib_accum_unused_data.patch

___
Python tracker 

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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-10-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue16350] zlib.Decompress.decompress() after EOF discards existing value of unused_data

2012-10-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Actually the current code contains a bug.  If memory allocation for unused_data 
fails then unused_data will become NULL and using this properties can crash.  
The patch fixes this.

--

___
Python tracker 

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



[issue16323] Wrong C API documentation for locale encoding

2012-10-28 Thread Berker Peksag

Berker Peksag added the comment:

> Hum, this is not correct. There are three valid values:
>  - NULL: strict
>  - "strict": strict
>  - "surrogateescape": use PEP 383

Thanks for the correction, Victor. Here's the updated patch.

--
Added file: http://bugs.python.org/file27770/issue16323_v2.patch

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why dictionaries and not struct sequences?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, I understand. GC callbacks receive a dict.

For avoid confusion with gc.DEBUG_STATS and to conform with callbacks argument 
name, may be better to name this function as gc.get_infos([generation])?

--

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I.e. gc.get_info([generation]).  Returns the info for specified generation or 
total if the parameter omitted.

--

___
Python tracker 

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



[issue16351] Add a function to get GC statistics

2012-10-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Why dictionaries and not struct sequences?

Because it's much simpler like that.

> For avoid confusion with gc.DEBUG_STATS and to conform with callbacks
> argument name, may be better to name this function as
> gc.get_infos([generation])?

Well, this is really about statistics, not general information.
Furthermore, it is not related to the callbacks functionality.
As for the generation parameter, I don't think it's useful: the result
list is only 3 elements long.

--

___
Python tracker 

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-28 Thread Vinay Sajip

Vinay Sajip added the comment:

Is there any common use case other than logging? For example, logging could be 
covered by an additional command-line argument for unittest.main(), e.g.

--logconfig /path/to/logging-config.json

which would cause unittest.main() to load the JSON in the specified file 
(expected to be a suitable dict) and pass it to logging.config.dictConfig().

That would handle a perhaps not uncommon use case without the user having to 
write any code, but rather just provide a suitable logging configuration.

--
nosy: +vinay.sajip

___
Python tracker 

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



[issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text

2012-10-28 Thread Mariano Reingart

Mariano Reingart added the comment:

I thought #9769 was closed (in fact, that patch was already applied).
Now, PyUnicode_FromFormatV() doesn't handle non-ascii text at all.
Maybe I misread the part telling to open a new issue in the comments, sorry for 
that.

--

___
Python tracker 

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



[issue16343] PyUnicode_FromFormatV() doesn't support utf-8 text

2012-10-28 Thread Chris Jerdonek

Chris Jerdonek added the comment:

Issue 9769 is still open.  It looks like there was some disagreement in the 
comments between Alexander and Victor as to whether a new issue should be 
created (since Victor had a different idea when first opening the issue), but 
it looks like Victor deferred to Alexander in his final comment.

I will close this issue as a duplicate, and if you could repost your patch on 
the other issue, that would be great.  The discussion there is relevant to your 
patch.

--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

___
Python tracker 

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



[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2012-10-28 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue1492704] distinct error type if shutil.copyfile() fails because of src and dst are the same file

2012-10-28 Thread Éric Araujo

Éric Araujo added the comment:

Thank you!

--

___
Python tracker 

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



[issue16341] In examples, "except:" should use new syntax

2012-10-28 Thread Éric Araujo

Éric Araujo added the comment:

I’m of two minds about this.  On one hand this syntax avoids silent bugs and is 
compatible with 3.x, on the other hand if people use the 2.7 docs and use 
Python 2.4 or 2.5 the examples won’t work.  Raymond, what’s your opinion?

--
nosy: +eric.araujo, rhettinger

___
Python tracker 

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



[issue16239] PEP8 arithmetic operator examples

2012-10-28 Thread Éric Araujo

Éric Araujo added the comment:

One idiom is not covered by the examples:  value = seq[something+1]
IMO it feels weird to put spaces in an index/slice notation.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue16239] PEP8 arithmetic operator examples

2012-10-28 Thread Guido van Rossum

Guido van Rossum added the comment:

That example doesn't feel strong enough to me to include in the style guide. I 
am fine with leaving that up to the individual contributor to decide.

--

___
Python tracker 

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



[issue16341] In examples, "except:" should use new syntax

2012-10-28 Thread Ezio Melotti

Ezio Melotti added the comment:

The patch LGTM, and there are only 21 changes.

--
nosy: +ezio.melotti
type:  -> enhancement

___
Python tracker 

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



[issue8745] zipimport is a bit slow

2012-10-28 Thread Catalin Iacob

Changes by Catalin Iacob :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-28 Thread Piotr Dobrogost

Piotr Dobrogost added the comment:

@Vinay
I don't see other use cases but maybe guys behind py.test, where there is such 
a feature could come up with other use cases.
The solution with passing config dict in a new command line parameter seems to 
be enough as long as logging is concerned. However it's not as versatile as 
custom initialization code of course.

--

___
Python tracker 

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



[issue9769] PyUnicode_FromFormatV() doesn't handle non-ascii text correctly

2012-10-28 Thread Mariano Reingart

Mariano Reingart added the comment:

(moved from issue #16343)

Working in an internationalization proposal 
 (issue #16344)
I've stopped at this problem (#9769) where multi byte encodings (like utf-8) is 
not supported by PyUnicode_FromFormatV()

Beside my proposal, I think utf-8 should be supported for consistency with the 
other unicode functions, like PyUnicode_FromString() or even 
unicode_fromformat_arg()

Attached is a patch that:
- enhanced the iterator to detect multibyte sequences, with sanity checks about 
start & continuation bytes
- replaced unicode_write_cstr with PyUnicode_DecodeUTF8Stateful
- tests

Hope it helps, this is my first patch for cpython and my C skills are a bit 
rusty, so excuse me if there is any newbie glitch

--
nosy: +reingart
Added file: http://bugs.python.org/file27771/pyunicode_fromformat_utf8.patch

___
Python tracker 

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



[issue16344] Traceback Internationalization Proposal

2012-10-28 Thread Mariano Reingart

Mariano Reingart added the comment:

"serious" developers? sorry but I think that is a unfortunate phrase that goes 
against the Python Diversity Statement
What about young pupil? 
What about non-programmers (i.e. accountants)? 
In some places (like my country, public schools), English is not teach formally 
until the University.

And I don't think non-English speakers are just a subset of users.
Come on, English is not even the top native tongue (that is Chinese Mandarin). 
English can be one of the most spoken languages, but even that metric only 
reach 1/7th of the total world population. Other languages like Spanish or 
Portuguese are also rising.

http://en.wikipedia.org/wiki/Language#Linguistic_diversity

BTW, as the draft says, Python is the offender here, as other error messages 
are already translated (including the OS ones, even inside Python!):

C:\Python32>python
Python 3.2.2 (default, Sep  4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on 
win 32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.listdir("J:\\")
Traceback (most recent call last):
  File "", line 1, in 
WindowsError: [Error 3] El sistema no puede encontrar la ruta especificada: 
'J:\\*.*'

PostgreSQL already translates error messages too:

C:\Program Files\PostgreSQL\9.0\bin>psql
psql (9.0.3)
Digite «help» para obtener ayuda.

Mariano=> SELECT * FROM nowhere;
ERROR:  no existe la relación «nowhere»
LÍNEA 1: SELECT * FROM nowhere;
  ^

And Bash too:

reingart@desktop:~/cpython$ ls /nowhere
ls: no se puede acceder a /nowhere: No existe el archivo o el directorio


Of course, there is no need to translate keywords or libraries (as SQL 
sentences and bash command are not translated, just messages are), I don't see 
why this could cause confusion, instead that, I think python would become more 
consistent with other tools and thus more easy to use.

The mechanism to restore the language is the common one (used by almost every 
other application that support i18n):
>>> locale.setlocale(locale.LC_MESSAGES, "C")
It should be not difficult for "serious" programmers to handle that :-)
If that is a concern, it could be implemented a command line parameter, a 
environment variable or a shortcut in locale module.

Anyway, people will not necessarily be faced by default with the localized 
version, an if for example, a teacher has to jump to an student machine, surely 
it could use it as messages will be probably in the spoken language of the 
country (BTW, probably most of the operating system components will be 
localized, not only Python)
For advanced users or logging, it could be disabled at all!

Finally, you're correct about that translation is not easy job, and this 
proposal (traceback internationalization) is just the tip of the iceberg (even 
more work will be needed in other aspects to get a full localization).
If PostgreSQL and other tools could do that, why Python could not?

--

___
Python tracker 

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



[issue16312] New command line option supported by unittest.main() for running initialization code before tests

2012-10-28 Thread Michael Foord

Michael Foord added the comment:

I always solve the logging problem with test-development-production 
configuratins and ensuring that running tests imports the logging setup. I've 
never wanted / needed to configure logging from the command line.

--

___
Python tracker 

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



  1   2   >