[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Jeremy Kloth

Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com:


--
nosy: +jkloth

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +brian.curtin, tim.golden

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Tim Golden

Tim Golden added the comment:

I was surprised that GetVersionEx would lie. But sure enough. Here:

http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c471de52-611f-435d-ab44-56064e5fd7d5/windows-81-preview-getversionex-reports-629200

(Including a heartfelt comment by long-time Python developer Tim Roberts)

--

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



[issue19137] pprint wrongly formats set and frozenset subclasses

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fcd889046ee1 by Serhiy Storchaka in branch '2.7':
Issue #19137: The pprint module now correctly formats empty set and frozenset
http://hg.python.org/cpython/rev/fcd889046ee1

New changeset 65943dc15afc by Serhiy Storchaka in branch '3.3':
Issue #19137: The pprint module now correctly formats instances of set and
http://hg.python.org/cpython/rev/65943dc15afc

New changeset 2d21239a5205 by Serhiy Storchaka in branch 'default':
Issue #19137: The pprint module now correctly formats instances of set and
http://hg.python.org/cpython/rev/2d21239a5205

--
nosy: +python-dev

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



[issue19132] Add compact mode to pprint

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ae0306c8f7a3 by Serhiy Storchaka in branch 'default':
Issue #19132: The pprint module now supports compact mode.
http://hg.python.org/cpython/rev/ae0306c8f7a3

--
nosy: +python-dev

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



[issue19137] pprint wrongly formats set and frozenset subclasses

2013-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue19132] Add compact mode to pprint

2013-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


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

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Tim Golden

Tim Golden added the comment:

I've just installed a Win 8.1 VM and can (unsurprisingly) confirm the
report: The ver command shows 6.3.9600 while GetVersionEx and
consequently sys.getwindowsversion report 6.2.9200

We do use GetVersionEx in a few other places (timemodule.c,
unicodeobject.c, install.c) but they're limited to checking that we're
running at least XP or at least Vista which will continue work as such.

I'm not really sure what to propose: we could simply sit back and say
We're telling you what Windows tells us. It's unappealing, but I'm not
sure there's a clear alternative.

--

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Tim Golden

Tim Golden added the comment:

platform.platform  platform.uname are also affected although they already use 
ver-parsing in some circumstances so could presumably fallback to that 
approach here as well.

--
nosy: +lemburg

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



[issue19078] Allow reversed(memoryview), like memoryview

2013-10-02 Thread Stefan Krah

Stefan Krah added the comment:

 Stefan, what do you think about Claudiu's patch? Should a test be added to 
 test_buffer as well?

I think the patch is good. We can add more tests when (if?) multi-dimensional
support is added to memoryview.

In that case we should probably do the same as NumPy and return a list of
subviews. So testing against tolist() like in the test case will only work
for one-dimensional views.

I can't commit right now (the machine with my ssh-key won't have Internet
access for some time), so if someone has time to do it ...

--

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



[issue19139] In venv, __VENV_NAME__ is the prompt, not the name

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7f913c6ada03 by Vinay Sajip in branch 'default':
Closes #19139: Changed usage of __VENV_NAME__ and added __VENV_PROMPT__.
http://hg.python.org/cpython/rev/7f913c6ada03

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue19001] test_gdb fails on Fedora buildbot

2013-10-02 Thread Stefan Krah

Stefan Krah added the comment:

Well, I got tired of the OS gdb with an almost transcendental version
number and installed gdb from gnu.org.

The problem seems to have disappeared.

--

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(One explanation is they did it for the enjoyment of non-Windows programmers)

--
nosy: +pitrou

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



[issue19144] test_inspect: failure without threads

2013-10-02 Thread Stefan Krah

New submission from Stefan Krah:

On the Fedora 16 buildbot:

==
ERROR: test_qualname_source (test.test_inspect.TestMain)
--
Traceback (most recent call last):
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_inspect.py, line 
2414, in test_qualname_source
module = importlib.import_module('concurrent.futures')
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/importlib/__init__.py, 
line 95, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File frozen importlib._bootstrap, line 1613, in _gcd_import
  File frozen importlib._bootstrap, line 1594, in _find_and_load
  File frozen importlib._bootstrap, line 1561, in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 607, in _check_name_wrapper
  File frozen importlib._bootstrap, line 1056, in load_module
  File frozen importlib._bootstrap, line 926, in load_module
  File frozen importlib._bootstrap, line 274, in _call_with_frames_removed
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/concurrent/futures/__init__.py,
 line 8, in module
from concurrent.futures._base import (FIRST_COMPLETED,
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/concurrent/futures/_base.py,
 line 8, in module
import threading
  File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/threading.py, line 
4, in module
import _thread
ImportError: No module named '_thread'

--
messages: 198828
nosy: skrah
priority: normal
severity: normal
status: open
title: test_inspect: failure without threads

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



[issue19078] Allow reversed(memoryview), like memoryview

2013-10-02 Thread Nick Coghlan

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


--
assignee:  - ncoghlan

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



[issue19078] Allow reversed(memoryview), like memoryview

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0dc604d58949 by Nick Coghlan in branch 'default':
Close #19078: memoryview now supports reversed
http://hg.python.org/cpython/rev/0dc604d58949

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue18690] memoryview not considered a sequence

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

There's no ducktyping for this due to the Sequence/Mapping confusion so it's a 
simple missing explicit registration.

--
assignee:  - ncoghlan
nosy: +ncoghlan

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



[issue18690] memoryview not considered a sequence

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 95badf936353 by Nick Coghlan in branch 'default':
Close #18690: register memoryview with Sequence ABC
http://hg.python.org/cpython/rev/95badf936353

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue17839] base64 module should use memoryview

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

binascii already only supports simple C contiguous buffers, expanding it and 
the base64 module to handle anything else should be a separate RFE.

--
dependencies:  -Allow memoryview.cast() for empty views

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



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-02 Thread R. David Murray

R. David Murray added the comment:

I have no idea, frankly :)

I guess my point is that the tool chain was not designed with cross compilation 
in mind, so sorting out how to make it work and writing a howto is something 
that needs to be done.  The patches that have already been applied address a 
narrow need felt and fixed by the Debian folk, dealing with cross compiling 64 
bit vs 32 bit, if I understand correctly.  I don't know if it is a general 
cross compile fix, but in theory it should at least have moved us closer.

Now, that said, as far as build order goes, what we do in general is to check 
in the sources that are built by the tools.  If you get your sources out of a 
tarball, make shouldn't try to rebuild those.  If you are working from a 
checkout, try 'make touch' before the make, to update the timestamps the way 
they would be in a release tarball.

--

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



[issue17839] base64 module should use memoryview

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

However, _input_type_check should enforce that (as binascii does), so I'll add 
that before committing.

--
assignee:  - ncoghlan

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



[issue19132] Add compact mode to pprint

2013-10-02 Thread R. David Murray

R. David Murray added the comment:

Sorry I missed this on the review, but you are missing versionchanged tags (or 
versionadded, whichever you prefer :) and a what's new entry.

--

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



[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2013-10-02 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Could anyone review this patch, please?

--

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Remi Pointel

Remi Pointel added the comment:

Hi,

sorry to reopen this bug but it seams that your commit was not ok:

test_qualname_source (__main__.TestMain) ... ERROR

==
ERROR: test_qualname_source (__main__.TestMain)
--
Traceback (most recent call last):
  File Lib/test/test_inspect.py, line 2414, in test_qualname_source
module = importlib.import_module('concurrent.futures')
  File /home/remi/dev/cpython/Lib/importlib/__init__.py, line 95, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File frozen importlib._bootstrap, line 1613, in _gcd_import
  File frozen importlib._bootstrap, line 1594, in _find_and_load
  File frozen importlib._bootstrap, line 1561, in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 607, in _check_name_wrapper
  File frozen importlib._bootstrap, line 1056, in load_module
  File frozen importlib._bootstrap, line 926, in load_module
  File frozen importlib._bootstrap, line 274, in _call_with_frames_removed
  File /home/remi/dev/cpython/Lib/concurrent/futures/__init__.py, line 17, in 
module
from concurrent.futures.process import ProcessPoolExecutor
  File /home/remi/dev/cpython/Lib/concurrent/futures/process.py, line 53, in 
module
from multiprocessing.queues import SimpleQueue, Full
  File /home/remi/dev/cpython/Lib/multiprocessing/queues.py, line 22, in 
module
import _multiprocessing
ImportError: No module named '_multiprocessing'

--
Ran 164 tests in 1.285s

FAILED (errors=1)
Traceback (most recent call last):
  File Lib/test/test_inspect.py, line 2456, in module
test_main()
  File Lib/test/test_inspect.py, line 2452, in test_main
TestBoundArguments, TestGetClosureVars, TestUnwrap, TestMain
  File /home/remi/dev/cpython/Lib/test/support/__init__.py, line 1696, in 
run_unittest
_run_suite(suite)
  File /home/remi/dev/cpython/Lib/test/support/__init__.py, line 1671, in 
_run_suite
raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File Lib/test/test_inspect.py, line 2414, in test_qualname_source
module = importlib.import_module('concurrent.futures')
  File /home/remi/dev/cpython/Lib/importlib/__init__.py, line 95, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File frozen importlib._bootstrap, line 1613, in _gcd_import
  File frozen importlib._bootstrap, line 1594, in _find_and_load
  File frozen importlib._bootstrap, line 1561, in _find_and_load_unlocked
  File frozen importlib._bootstrap, line 607, in _check_name_wrapper
  File frozen importlib._bootstrap, line 1056, in load_module
  File frozen importlib._bootstrap, line 926, in load_module
  File frozen importlib._bootstrap, line 274, in _call_with_frames_removed
  File /home/remi/dev/cpython/Lib/concurrent/futures/__init__.py, line 17, in 
module
from concurrent.futures.process import ProcessPoolExecutor
  File /home/remi/dev/cpython/Lib/concurrent/futures/process.py, line 53, in 
module
from multiprocessing.queues import SimpleQueue, Full
  File /home/remi/dev/cpython/Lib/multiprocessing/queues.py, line 22, in 
module
import _multiprocessing
ImportError: No module named '_multiprocessing'

Remi.

--
resolution: fixed - 
status: closed - open

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Martin v . Löwis

Martin v. Löwis added the comment:

tim.peters: looking at the implementation of the proposed annoying functions 
with names like IsWindows8Point1OrGreater, it turns out that they all go back 
to VerifyVersionInfoW, which is available since W2k (but still doesn't tell the 
actual version).

tim.golden: a work-around is documented in 

http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx

Put

supportedOS Id={1f676c76-80e1-4239-95bb-83d0f6d0da78}/

into the manifest of python.exe, and it should report the correct version. Of 
course

a) this would fail for somebody embedding Python (unless they have that in 
their exe's manifest), and
b) we don't know the Id of upcoming windows versions, so the binaries produced 
today might still lie on future Windows releases.

It seems possible to query the compatibility using QueryActCtxW and 
CompatibilityInformationInActivationContext, but I couldn't find a way to put 
the compatibility into a new activation context (which would allow to claim 
compatibility dynamically).

--
nosy: +loewis

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



[issue19143] Finding the Windows version getting messier

2013-10-02 Thread Martin v . Löwis

Martin v. Löwis added the comment:

According to

http://stackoverflow.com/questions/17399302/how-can-i-detect-windows-8-1-in-a-desktop-application

another strategy is to directly read the version out of the registry, from

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
(values CurrentVersion, CurrentBuild)

Not sure where to get service pack information from, though.

--

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e54edaf60d4 by Brett Cannon in branch 'default':
Try to fix issue #19134 again
http://hg.python.org/cpython/rev/2e54edaf60d4

--

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Brett Cannon

Brett Cannon added the comment:

OK, went for a more thorough check for the failure by just trying to import and 
catching the ImportError instead of trying to be fancy. The FreeBSD buildbot 
was having the same failure but it seems stuck waiting for some lock, so I 
can't verify the fix at the moment.

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

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



[issue19144] test_inspect: failure without threads

2013-10-02 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
assignee:  - brett.cannon
nosy: +brett.cannon
resolution:  - duplicate
status: open - closed
superseder:  - test_inspect.py failed if module _multiprocessing not available

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



[issue19134] test_inspect.py failed if module _multiprocessing not available

2013-10-02 Thread Remi Pointel

Remi Pointel added the comment:

It's ok now, thanks:

test_qualname_source (__main__.TestMain) ... skipped 'multiprocessing required 
to test __qualname__ for source files'

--

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



[issue17839] base64 module should use memoryview

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

After working through this, I found that the modern base64 API just relies on 
the checks in binascii. All that checks for is:

1. Can the data by exported using PyBUF_SIMPLE?
2. Is it C contiguous?

It completely ignores the number of dimensions and the format information. I 
added tests to at least capture this behaviour, even though it seems a little 
dubious to me.

For the legacy API, I didn't relax the input checks that far - the legacy API 
will still complain if there is more than 1 dimension and if the format code 
isn't one of 'c', 'b' or 'B'. That's already substantially more permissive than 
what it supported in previous versions.

Just running the full test suite now, will push after that finishes.

--

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



[issue17839] base64 module should use memoryview

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d90f25e1a705 by Nick Coghlan in branch 'default':
Close #17839: support bytes-like objects in base64 module
http://hg.python.org/cpython/rev/d90f25e1a705

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

With issue 17839 fixed, the error from invoking the base64 codec through the 
method API is now substantially more sensible:

 bZXhhbXBsZQ==\n.decode(base64_codec)
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: decoder did not return a str object (type=bytes)

--

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

I just wanted to note something I realised in chatting to Armin Ronacher 
recently: in both Python 2.x and 3.x, the encode/decode method APIs are 
constrained by the text model, it's just that in 2.x that model was effectively 
basestring-basestring, and thus still covered every codec in the standard 
library. This greatly limited the use cases for the codecs.encode/decode 
convenience functions, which is why the fact they were undocumented went 
unnoticed.

In 3.x, the changed text model meant the method API become limited to the 
Unicode codecs, making the function based API more important.

--

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

We should fix the docs for the earlier versions as well.

--
versions: +Python 2.7, Python 3.3

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-10-02 Thread Nick Coghlan

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


--
Removed message: http://bugs.python.org/msg198847

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



[issue7475] codecs missing: base64 bz2 hex zlib hex_codec ...

2013-10-02 Thread Nick Coghlan

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


--
versions:  -Python 2.7, Python 3.3

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



[issue17827] Document codecs.encode and codecs.decode

2013-10-02 Thread Nick Coghlan

Nick Coghlan added the comment:

We should fix the docs for the earlier versions as well.

--
versions: +Python 2.7, Python 3.3

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-02 Thread Vajrasky Kok

New submission from Vajrasky Kok:

 from itertools import repeat
 repeat(2, -10).__length_hint__()
0
 repeat(2, times=-10).__length_hint__()
18446744073709551606
 repeat(2, times=-10)
repeat(2, -10)
 repeat(2, -10)
repeat(2, 0)

Hereby, I attached two alternatives of patch to make the behaviour consistent.

The first one makes the negative number parameter/keyword ALWAYS means endless.

--
components: Library (Lib)
files: fix_itertools_repeat_negative_number_means_endless.patch
keywords: patch
messages: 198849
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Inconsistent behaviour in itertools.repeat when using negative times
type: behavior
versions: Python 3.4
Added file: 
http://bugs.python.org/file31943/fix_itertools_repeat_negative_number_means_endless.patch

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-02 Thread Vajrasky Kok

Vajrasky Kok added the comment:

The second patch makes the negative number parameter/keyword ALWAYS means 0.

--
Added file: 
http://bugs.python.org/file31944/fix_itertools_repeat_negative_number_means_0.patch

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-02 Thread Benjamin Peterson

Changes by Benjamin Peterson benja...@python.org:


--
assignee:  - rhettinger
components: +Extension Modules -Library (Lib)
nosy: +rhettinger

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



[issue19105] pprint doesn't use all width

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

Without patch:

 pprint.pprint([[0, 0, 0]]*3, width=21)
[[0,
  0,
  0],
 [0,
  0,
  0],
 [0,
  0,
  0]]

With patch:

 pprint.pprint([[0, 0, 0]]*3, width=21)
[[0, 0, 0],
 [0, 0, 0],
 [0,
  0,
  0]]

--
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file31945/pprint_all_width.patch

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Guido van Rossum

Changes by Guido van Rossum gu...@python.org:


--
stage:  - patch review
type:  - enhancement
versions: +Python 3.4, Python 3.5

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Guido van Rossum

New submission from Guido van Rossum:

The traceback module is driving me nuts.  It has some handy helpers to extract 
info about a traceback or a full stack without formatting them, but (a) these 
are _internal, and (b) they don't return the frame object as part of the 
information, so code that wants to do additional stuff (e.g. print the values 
of local variables) cannot use them. (I guess in a sense the two problems 
cancel each other out. :-)

Here's a proposed fix.  (I know it is lacking tests.)

It adds extract_tb_ex() and extract_stack_ex() functions that return a list of 
5-tuples filename, line number, function name, text, frame).

I'm also reworking the lowest-level internal function, 
_extract_tb_or_stack_iter(), to take an iterator instead of a starting point 
and a function to get the info and the next starting point.  The old design 
feels unpythonic to me -- the task at hand so clearly feels like it should wrap 
an iterator!

Finally, I'm adding some important info to a few docstrings: when the limit 
clips the number of frames, you get the *oldest* frames from a traceback, but 
the *newest* frames from a stack. That makes sense when you think about it, but 
I still think it's worth mentioning.

Feedback?

--
messages: 198852
nosy: akuchling, benjamin.peterson, gvanrossum
priority: normal
severity: normal
status: open
title: Improvements to traceback module

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



[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is the patch good to you Benjamin? I'm not very experienced in 2to3 machinery.

--

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



[issue19142] Cross-compile fails trying to execute foreign pgen on build host

2013-10-02 Thread Trevor Bowen

Trevor Bowen added the comment:

Ok, thanks for the tips.  I'm new to developing on Python itself.  I'll start 
simple by trying to develop a set of patches for the 2.7.5 source tar-ball, 
which I usually use to build Python. If that succeeds, I'll look into pushing 
it into the related source files.  So far, I'm anticipating modifying these 
files: configure, Makefile.pre.in, and setup.py. ... Thanks!

--

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



[issue19132] Add compact mode to pprint

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I had added a what's new entry.

--

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



[issue19147] pydoc3 fcntl.flock documentation gives wrong man page section for flock

2013-10-02 Thread Andrew Parker

New submission from Andrew Parker:

On my Linux system the docs for fcntl.flock gives me man 3 flock for more 
details:

$ pydoc3 fcntl.flock
Help on built-in function flock in fcntl:

fcntl.flock = flock(...)
flock(fd, operation)

Perform the lock operation op on file descriptor fd.  See the Unix 
manual page for flock(3) for details.  (On some systems, this function 
is
emulated using fcntl().)

However, at least for Fedora 19 and RHEL 6, that should be man 2 flock or 
See the manual page for flock(2) for details:

$ man 3 flock | wc -l
No manual entry for flock in section 3
0
$ man 2 flock | wc -l
85

Note that http://docs.python.org/3/library/fcntl.html#fcntl.flock and 
http://docs.python.org/2/library/fcntl.html#fcntl.flock both have it right.

--
assignee: docs@python
components: Documentation
messages: 198856
nosy: Andrew.Parker, docs@python
priority: normal
severity: normal
status: open
title: pydoc3 fcntl.flock documentation gives wrong man page section for flock
versions: Python 2.6, Python 2.7, Python 3.3

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You forgot a patch.

--
nosy: +serhiy.storchaka

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



[issue19132] Add compact mode to pprint

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6e7b1aadea2f by Serhiy Storchaka in branch 'default':
Issue #19132: Add versionchanged tags.
http://hg.python.org/cpython/rev/6e7b1aadea2f

--

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Sigh. Here it is.

--
keywords: +patch
Added file: http://bugs.python.org/file31946/TB.patch

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



[issue19020] Regression: Windows-tkinter-idle, unicode, and 0xxx filename

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tcl is weak typed language and all Tcl values formally are strings. 123 is 
the 123 integer, the 123 string, and Tcl list containing one element 123 
(which can be a number, a string, a list, etc). Actually for optimization Tcl 
uses different specialized types internally and Tkinter uses it for converting 
Tcl values to Python values (when wantobject is true). When wantobject is 
false, tkinter always returns string. If Tkinter encounters unknown to it Tcl 
type, it returns Tcl_Obj. Tcl introduces new types in new versions and Tcl 
function which returned string or Tcl list in old version can return new type 
in new version.

So any Tkinter method which supposed return a list, can return a tuple, a 
string, or a Tcl_Obj.

splitlist() splits a string, a tuple or a Tcl_Obj to Python tuple.

'' - ()
'abc' - ('abc',)
'abc def' - ('abc', 'def')
'abc {def ghi}' - ('abc', 'def ghi')

It always returns a tuple (of strings if an argument is a string). If an 
argument already is a tuple, splitlist() just returns it. If an argument is Tcl 
list, splitlist() returns a tuple which contains it's elements.

split() is more intelligent. It try guess a structure of data and splits list 
to subelements while it is possible.

'' - ''
'abc' - 'abc'
'abc def' - ('abc', 'def')
'abc {def ghi}' - ('abc', ('def', 'ghi'))

If an argument is a tuple, split() recursively splits it's elements. When an 
argument is TclObj, split() returns a string if Tcl list has 0 or 1 element, 
otherwise it returns the same value as splitlist().

--

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



[issue19021] AttributeError in Popen.__del__

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a regression in 3.4 due to changes in shutdown procedure. This code 
correctly works in 3.3. There are more than a dozen places in the stdlib which 
rely upon accessibility of builtins. I wrote patches for all these cases, but 
third-party code will be broken.

I think we should restore guarantees about builtins.

--
versions:  -Python 2.7, Python 3.3

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Claudiu.Popa

Changes by Claudiu.Popa pcmantic...@gmail.com:


--
nosy: +Claudiu.Popa

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



[issue19147] pydoc3 fcntl.flock documentation gives wrong man page section for flock

2013-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 43064ded64cb by Ned Deily in branch '2.7':
Issue #19147: Fix docstring for fcntl.flock to refer to correct man section.
http://hg.python.org/cpython/rev/43064ded64cb

New changeset 735d8b856928 by Ned Deily in branch '3.3':
Issue #19147: Fix docstring for fcntl.flock to refer to correct man section.
http://hg.python.org/cpython/rev/735d8b856928

New changeset 1cb0c05d71af by Ned Deily in branch 'default':
Issue #19147: merge from 3.3
http://hg.python.org/cpython/rev/1cb0c05d71af

--
nosy: +python-dev

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



[issue19147] pydoc3 fcntl.flock documentation gives wrong man page section for flock

2013-10-02 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report!

--
nosy: +ned.deily
resolution:  - fixed
stage:  - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 2.6

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



[issue16129] No good way to set 'PYTHONIOENCODING' when embedding python.

2013-10-02 Thread Bastien Montagne

Bastien Montagne added the comment:

No one to check the patch? It’s rather small, should not take much time… And we 
really need a solution for this issue, so better to try to get this settled 
before 3.4 freeze! ;)

--

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

The preferred behavior is that a negative number always means 0.

That is what lists do:

 [1] * (-5)
[]

--

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



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-02 Thread Stefan Behnel

Stefan Behnel added the comment:

What about this: by default, we assume all runtimes to have the same major 
version as the Python runtime that executes the benchmark runner. If that's not 
the case, users must override it explicitly with a command line option, say, 
--pyversions 2:3 for a reference 2.x and a comparison 3.x version of Python 
(i.e. in the order the programs appear on the command line).

Does that sound ok?

I'd like to avoid a trial-and-fallback approach as that would mean that any 
wrapper scripts would still have to support being called twice and handling the 
-c option in one way or another.

--

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



[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-10-02 Thread Brett Cannon

Brett Cannon added the comment:

If you want to propose a patch to add specifying the version on the 
command-line to avoid inferring the version I would be fine with that.

--
stage:  - needs patch

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



[issue19146] Improvements to traceback module

2013-10-02 Thread STINNER Victor

STINNER Victor added the comment:

 It adds extract_tb_ex() and extract_stack_ex() functions ...

I don't like _ex suffixes, it's not future proof if we need to add another 
function later.

You may rename them using _iter suffix and return an iterator instead of a 
list. Such idea was also proposed for os.listdir() = os.scandir() / 
os.iterdir(). See the discussion in #11406. The caller can write 
tuple(extract_stack_iter()), as I do with dict.items() to sort a dictionary.

 Feedback?

I like unit tests :-) The patch should also document new functions.
You may only need the most recent frames.

--
nosy: +haypo

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



[issue19141] Windows Launcher fails to respect PATH

2013-10-02 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +vinay.sajip

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



[issue19148] Minor issues with Enum docs

2013-10-02 Thread Esa Peuha

New submission from Esa Peuha:

I noticed a couple of issues with the Enum documentation. First, there are some 
markup bugs which should be fixed by the attached file. Second, I think If the 
only change desired is no aliases allowed is very bad English and should be 
reworded; I would go with If you only want to disallow aliases but maybe 
other people have better ideas.

--
assignee: docs@python
components: Documentation
files: enum.diff
keywords: patch
messages: 198869
nosy: Esa.Peuha, docs@python
priority: normal
severity: normal
status: open
title: Minor issues with Enum docs
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31947/enum.diff

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



[issue18037] 2to3 passes through string literal which causes SyntaxError in 3.x

2013-10-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

That seems fine.

--

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:


 I don't like _ex suffixes, it's not future proof if we need to add
 another function later.


Me neither, but you can't change a function that returns a list of 4-tuples
into a function that returns a list of 5-tuples without breaking existing
code. IIRC for struct and time tuples we created a hack in C where we
return something that behaves like an N-tuple but has some extra attributes
-- but I don't think collections.namedtuple supports that.

 You may rename them using _iter suffix and return an iterator instead of
 a list.

I already thought of that, but that doesn't work: the iterator version
would return the stack in the wrong order (note the .reverse() call in the
code).

 Such idea was also proposed for os.listdir() = os.scandir() /
 os.iterdir(). See the discussion in #11406. The caller can write
 tuple(extract_stack_iter()), as I do with dict.items() to sort a dictionary.

 I like unit tests :-) The patch should also document new functions.


I'll take care of that when we've agreed on the new API.

 You may only need the most recent frames.


Not sure what you mean by that.

--

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Claudiu.Popa

Claudiu.Popa added the comment:

 I already thought of that, but that doesn't work: the iterator version
 would return the stack in the wrong order (note the .reverse() call in the 
 code).


Then, couldn't this:

   stack = list(_extract_stack_iter(_get_stack(f), limit=limit))
   stack.reverse()
   return stack


be rewritten as this, knowing the fact that _extract_stack_iter returns an 
iterable?

  return reversed(_extract_stack_iter(_get_stack(f), limit=limit))

And in this case, extract_stack_ex could become extract_stack_iter or something 
like that.

--

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



[issue19148] Minor issues with Enum docs

2013-10-02 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

No, reversed() doesn't work on iterators.

--

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Me neither, but you can't change a function that returns a list of 4-tuples
 into a function that returns a list of 5-tuples without breaking existing
 code. IIRC for struct and time tuples we created a hack in C where we
 return something that behaves like an N-tuple but has some extra attributes
 -- but I don't think collections.namedtuple supports that.

It do.

class tb_entity(namedtuple('tb_entity', 'filename lineno name line')):
def __new__(cls, filename, lineno, name, line, frame=None):
self = super().__new__(cls, filename, lineno, name, line)
self.frame = frame
return self

--

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



[issue19141] Windows Launcher fails to respect PATH

2013-10-02 Thread Vinay Sajip

Vinay Sajip added the comment:

The current version of py.exe *does* do a PATH search for a shebang of 
#!/usr/bin/env python (see #17903).

The whole *point* of py.exe is to invoke Pythons which are *not* available on 
the PATH.

The behaviour of py.exe is as documented in PEP 397, other than the 
PATH-searching for /usr/bin/env python which is a more recent addition.

People are supposed to put shebang lines in their scripts, else PEP 397 is not 
of much use to them. Scripts installed via setuptools/pip (e.g. into a 
virtualenv) have correct shebang lines prepended to them.

Note that the environment variables and some py.ini settings are *alternative* 
ways of specifying intent. The choosing of 2.x vs. 3.x is also mentioned in the 
PEP and was suggested as the best default for the largest user population - 
that of 2.x users potentially transitioning to 3.x.

Is there some deviation from PEP 397 (other than /usr/bin/env python - PATH 
search) that you are trying to draw attention to? Or is purely a documentation 
fix sufficient? Otherwise, I will be closing this as wontfix, as the basic 
behaviour was thrashed out when PEP 397 was discussed.

--
nosy: +mhammond

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



[issue17442] code.InteractiveInterpreter doesn't display the exception cause

2013-10-02 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +pitrou
stage:  - patch review
versions:  -Python 3.2

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



[issue19146] Improvements to traceback module

2013-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Nice. However it will take up a lot more space, because now there's an instance 
dict. (And adding __slots__ to a namedtuple subclass doesn't work.) I'll have 
to think about whether I care about the extra space.

--

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



[issue19141] Windows Launcher fails to respect PATH

2013-10-02 Thread Graham Wideman

Graham Wideman added the comment:

Hi Vinay, thanks for commenting.  And of course for your efforts on py.exe (and 
no doubt the debate process.) 

I am trying to draw attention to the situation where the script has no shebang 
line, and there is no other explicit configuration info for py.exe. (No py.ini 
file, no py.exe envt variables, no py.exe-specific command-line args).

In that case, the next thing py.exe should check, in my view, is the user's 
PATH, where they may well have defined which python version they prefer (even 
if they are unaware of PEP 397 and Launcher).  This rationale is parallel to 
the one in #17903 that you pointed to.

Currently, py.exe ignores PATH in that case, and falls back to looking through 
all installed pythons and picking the latest 2.x if available.

 The choosing of 2.x vs. 3.x is also mentioned in the PEP 
The discussion of that issue would be illuminating, but I couldn't find it. 
Could you point to where this is mentioned in PEP-0397?

Thanks again.

--

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



[issue19149] python bug report

2013-10-02 Thread Martin

New submission from Martin:

Hello! My name is Martin, a member of Free Software in Comahue National
University of Neuquén, Argentina. We have detected an error in the compiler
for Python 2.7 using Ubuntu 12.04: I write the code, without realizing I
leave a comment with syntax error in that line (do not put the # of
comments), compile and get error of sistaxis in that line. Fix the error
adding # to comment, I do compile again and it shows me various errors that
take over the Python compiler and I am forced to close it. Hope your
response with a possible solution to this problem, my idea is to continue
using this version of Python. Thank yo

--
messages: 198878
nosy: Grupobetatesting
priority: normal
severity: normal
status: open
title: python bug report

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



[issue19150] python bug report

2013-10-02 Thread Martin

New submission from Martin:

Hello! My name is Martin, a member of Free Software in Comahue National 
University of Neuquén, Argentina. We have detected an error in the compiler for 
Python 2.7 using Ubuntu 12.04: I write the code, without realizing I leave a 
comment with syntax error in that line (do not put the # of comments), compile 
and get error of sistaxis in that line. Fix the error adding # to comment, I do 
compile again and it shows me various errors that take over the Python compiler 
and I am forced to close it. Hope your response with a possible solution to 
this problem, my idea is to continue using this version of Python. Thank yo

--
components: IDLE
files: Captura de pantalla de 2013-10-02 23:52:10.png
messages: 198879
nosy: Grupobetatesting
priority: normal
severity: normal
status: open
title: python bug report
type: compile error
versions: Python 2.7
Added file: http://bugs.python.org/file31948/Captura de pantalla de 2013-10-02 
23:52:10.png

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



[issue19149] python bug report

2013-10-02 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - python bug report

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



[issue19150] IDLE shell fails: ModifiedInterpreter instance has no attribute 'interp'

2013-10-02 Thread Ned Deily

Ned Deily added the comment:

Can you give a step-by-step sequence of commands to reproduce the problem?  One 
thing that looks somewhat suspicious is that there seem to be multiple IDLE 
*Python Shell windows open.  Normally there should only be one.

--
nosy: +ned.deily
title: python bug report - IDLE shell fails: ModifiedInterpreter instance has 
no attribute 'interp'

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



[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2013-10-02 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Improved the patch which makes negative number *always* means 0. Added comment 
and put more test.

--
Added file: 
http://bugs.python.org/file31949/fix_itertools_repeat_negative_number_means_0_v2.patch

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



[issue19150] IDLE shell fails: ModifiedInterpreter instance has no attribute 'interp'

2013-10-02 Thread Martin

Martin added the comment:

I have three shell windows open because everytime i run the code corrected, it 
opens a new shell, I try to close them but there is one that keeps open, unless 
I kill it by terminal (kill) I attach a photo of compiling the line of code, 
closing leftover shell ... What I do is compile with three lines that should be 
comments, it makes syntax error for not to have commented lines, I comment them 
(#) and when I want to recompile, errors appears in the main shell.

--
resolution:  - invalid
Added file: http://bugs.python.org/file31950/Captura de pantalla de 2013-10-03 
02:27:12.png

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