[issue19680] Help missing for exec and print

2013-11-25 Thread Bohuslav Slavek Kabrda

Bohuslav Slavek Kabrda added the comment:

Seems that Ezio was faster :)
Yep, the attached patch does seem to solve the issue.

--

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread Christian Heimes

Christian Heimes added the comment:

Python's stdlib contains other modules that contain code for older versions of 
Python. The platform module even contains lines like os.devnull was added in 
Python 2.4, so emulate it for earlier. asyncio has backward compatibility 
code, too. The only old syntax I'd like to add is the super() thing in the test 
module. They are just tests...

The modified imports and doc test adjustments like

- mean([1, 2, 3, 4, 4])
-2.8
+ mean([1, 2, 3, 4, 4]) == 2.8
+True

would greatly help, though.

--

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



[issue15798] subprocess.Popen() fails if 0, 1 or 2 descriptor is closed

2013-11-25 Thread Gregory P. Smith

Gregory P. Smith added the comment:

adding {0,1,2} to fds_to_keep (populated from pass_fds) is indeed an alternate 
approach.  A variant of an alternate patch doing that attached.

This actually simplifies code.  Is there anything this would hurt that i'm not 
seeing?

I suppose it adds minor overhead to the fork_exec() call by passing more in and 
lookups into the fds_to_keep list now that it will always contain at least 4 
values instead of the previous 1.  I doubt that is matters (I haven't measured 
anything).

--
Added file: 
http://bugs.python.org/file32830/issue15798_alternate-pass_fds-gps01.diff

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

 Here is the patch to tidy up the Lib/test_tracemalloc.py.
 It fixed the typo, and removed unused import and unused variables.

Thanks, I applied your patch.


changeset:   87547:841dec769a04
tag: tip
user:Victor Stinner victor.stin...@gmail.com
date:Mon Nov 25 09:29:45 2013 +0100
files:   Lib/test/test_tracemalloc.py
description:
Cleanup test_tracemalloc.py. Patch written by Vajrasky Kok.

--

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



[issue18874] Add a new tracemalloc module to trace memory allocations

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

 Here is the patch to tidy up the Lib/test_tracemalloc.py.
 It fixed the typo, and removed unused import and unused variables.

Thanks, I applied your patch.

Oh, except:

-data = [allocate_bytes(123) for count in range(1000)]
+[allocate_bytes(123) for count in range(1000)]

If you don't store the result, the memory is immediatly released.

--

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



[issue19762] Incorrect function documentation of _get_object_traceback and _get_traces in _tracemalloc module

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2e2ec595dc58 by Victor Stinner in branch 'default':
Close #19762: Fix name of _get_traces() and _get_object_traceback() function
http://hg.python.org/cpython/rev/2e2ec595dc58

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

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



[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-11-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Is that likely to be in 1.5 or 1.5.1? Not needing to special case this in
ensurepip would be nice :)

--

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



[issue19734] venv and ensurepip are affected by pip environment variable settings

2013-11-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Hmm, this may also indicate a bug in pip's require virtualenv handling.
Why isn't it detecting that sys.prefix and sys.base_prefix are different,
and hence it *is* running in a venv created virtual environment?

--

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2013-11-25 Thread STINNER Victor

New submission from STINNER Victor:

subprocess.Popen has a race condition on Windows with file descriptors: if two 
threads spawn subprocesses at the same time, unwanted file descriptors may be 
inherited, which lead to annoying issues like cannot delete a file because it 
is open by another process. For the issue #19575 for an example of such bug.

Since Windows Vista, a list of handle which should be inherited can be 
specified in CreateProcess() using PROC_THREAD_ATTRIBUTE_HANDLE_LIST with 
STARTUPINFOEX. It avoids the need to mark the handle temporarly inheritable.

For more information, see:
http://www.python.org/dev/peps/pep-0446/#only-inherit-some-handles-on-windows

--
messages: 204314
nosy: Bernt.Røskar.Brenna, haypo, sbt
priority: normal
severity: normal
status: open
title: subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on 
Windows Vista
type: enhancement
versions: Python 3.5

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



[issue19765] test_asyncio: test_create_server() failed on x86 Windows Server 2008 [SB] 3.x

2013-11-25 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1794/steps/test/logs/stdio

==
FAIL: test_create_server (test.test_asyncio.test_events.ProactorEventLoopTests)
--
Traceback (most recent call last):
  File 
E:\home\cpython\buildslave\x86\3.x.snakebite-win2k8r2sp1-x86\build\lib\test\test_asyncio\test_events.py,
 line 563, in test_create_server
self.assertIsInstance(proto, MyProto)
AssertionError: None is not an instance of class 
'test.test_asyncio.test_events.MyProto'

--

--
components: Tests
keywords: buildbot
messages: 204315
nosy: gvanrossum, haypo
priority: normal
severity: normal
status: open
title: test_asyncio: test_create_server() failed on x86 Windows Server 2008 
[SB] 3.x
versions: Python 3.4

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



[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot

2013-11-25 Thread STINNER Victor

New submission from STINNER Victor:

The line from . import exceptions of urllib3 failed:
https://github.com/shazow/urllib3/blob/master/urllib3/__init__.py#L22

It is strange because urllib3/exceptions.py is part of the urllib3 module.

http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/5674/steps/test/logs/stdio

==
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
--
Traceback (most recent call last):
  File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_venv.py, 
line 299, in test_with_pip
self.run_with_capture(venv.create, self.env_dir, with_pip=True)
subprocess.CalledProcessError: Command '['/tmp/tmpd8r2w88y/bin/python', '-Im', 
'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/test/test_venv.py, 
line 305, in test_with_pip
self.fail(msg)
AssertionError: Command '['/tmp/tmpd8r2w88y/bin/python', '-Im', 'ensurepip', 
'--upgrade', '--default-pip']' returned non-zero exit status 1

**Subprocess Output**
Traceback (most recent call last):
  File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/runpy.py, line 160, 
in _run_module_as_main
__main__, fname, loader, pkg_name)
  File /home/buildbot/buildarea/3.x.krah-fedora/build/Lib/runpy.py, line 73, 
in _run_code
exec(code, run_globals)
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__main__.py, 
line 66, in module
main()
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__main__.py, 
line 61, in main
default_pip=args.default_pip,
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__init__.py, 
line 92, in bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File 
/home/buildbot/buildarea/3.x.krah-fedora/build/Lib/ensurepip/__init__.py, 
line 28, in _run_pip
import pip
  File /tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/__init__.py, 
line 11, in module
  File 
/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/vcs/mercurial.py, line 
9, in module
  File /tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/download.py, 
line 22, in module
  File 
/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/__init__.py,
 line 58, in module
  File 
/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/utils.py,
 line 24, in module
  File 
/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/compat.py,
 line 7, in module
  File 
/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/packages/__init__.py,
 line 3, in module
  File 
/tmp/tmpwzs5sx88/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/requests/packages/urllib3/__init__.py,
 line 22, in module
ImportError: cannot import name 'exceptions'

--
components: Tests
keywords: buildbot
messages: 204316
nosy: haypo
priority: normal
severity: normal
status: open
title: test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x 
buildbot
versions: Python 3.4

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



[issue19753] test_gdb failure on SystemZ buildbot

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6ec6facb69ca by Victor Stinner in branch 'default':
Issue #19753: New try to fix test_gdb on System Z buildbot
http://hg.python.org/cpython/rev/6ec6facb69ca

--

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



[issue19509] No SSL match_hostname() in ftp, imap, nntp, pop, smtp modules

2013-11-25 Thread Christian Heimes

Christian Heimes added the comment:

The patch implements check_hostname in order to match SSL certs with the peer's 
hostname in ftp, imap, nntp, pop and smtp library. So far the patch needs more 
tests and doc updates.

I consider the new feature a security fix. Right now everybody with any valid 
TLS/SSL certificate can claim that its certificate is valid for 
'smtp.google.com'.

--
keywords: +patch
nosy: +georg.brandl, larry
Added file: http://bugs.python.org/file32831/check_hostname.patch

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



[issue19654] test_tkinter sporadic failures on x86 Tiger 3.x buildbot

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/7408/steps/test/logs/stdio

patchlevel = 8.4.19

Does it help to know the full version?

--

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



[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2013-11-25 Thread Martin Dengler

Changes by Martin Dengler mar...@martindengler.com:


--
nosy: +mdengler

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



[issue19767] pathlib: iterfiles() and iterdirs()

2013-11-25 Thread Jonas H.

New submission from Jonas H.:

From my personal experience, listing all real files and all subdirectories in 
a directory is a very common use case.

Here's a patch that adds the `iterfiles()` and `iterdirs()` methods as a 
shortcut for `[f for f in p.iterdir() if f.is_dir/file()]` .

--
components: Library (Lib)
files: iterdirs_iterfiles.diff
keywords: patch
messages: 204320
nosy: jonash
priority: normal
severity: normal
status: open
title: pathlib: iterfiles() and iterdirs()
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file32832/iterdirs_iterfiles.diff

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



[issue19768] Not so correct error message when giving incorrect type to maxlen in deque

2013-11-25 Thread Vajrasky Kok

New submission from Vajrasky Kok:

 from collections import deque
 deque('abc', maxlen='a')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: an integer is required

But it's a lie. You can give None to maxlen
 deque('abc', maxlen=None)
deque(['a', 'b', 'c'])

maxlen with None value means unlimited.

You can give boolean value too to maxlen.

 deque('abc', maxlen=True)
deque(['c'], maxlen=1)

But since we use boolean and integer interchangeably in Python, so this should 
not matter in this case.

So, after the patch:
 deque('abc', maxlen='a')
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: maxlen must be integer or None

Don't worry, I only overrode the TypeError one. So overflow error should be 
kept intact.

 deque('abc', maxlen=2**68)
Traceback (most recent call last):
  File stdin, line 1, in module
OverflowError: Python int too large to convert to C ssize_t

I did not override the negative integer error message, because I assume when 
people give negative integer, they are in the mindset of giving integer value 
to maxlen.

 deque('abc', maxlen=-3)
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: maxlen must be non-negative

--
components: Extension Modules
files: fix_error_message_maxlen_deque.patch
keywords: patch
messages: 204321
nosy: rhettinger, vajrasky
priority: normal
severity: normal
status: open
title: Not so correct error message when giving incorrect type to maxlen in 
deque
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: 
http://bugs.python.org/file32833/fix_error_message_maxlen_deque.patch

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



[issue19767] pathlib: iterfiles() and iterdirs()

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

See also issue #11406 which is more generic.

--
nosy: +haypo

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



[issue5639] Support TLS SNI extension in ssl module

2013-11-25 Thread Dima Tisnek

Dima Tisnek added the comment:

Is this really not going into Python2 series?

It's not a Python feature or a language feature, it's a matter of exporting 
OpenSSL feature.

Furthermore it's a matter of security, same as support for session tickets is a 
matter of performance.

SNI was first introduced in 2004, RFC in 2006, libcurl supported it from 2008, 
you had a patch since 2009 and still it's not in?

Are you guys intentionally trying to cripple Python2?

What do you think is likelier outcome, faster Python3 adoption or Python  
labelled insecure?

--
nosy: +Dima.Tisnek

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



[issue5639] Support TLS SNI extension in ssl module

2013-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 It's not a Python feature or a language feature, it's a matter of
 exporting OpenSSL feature.

It's a feature regardless (from our POV), and Python 2.x has been in bug fix 
mode for a long time now. Please understand that this is how our release 
process works.

--

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



[issue19769] test_venv: test_with_pip() failure on AMD64 Windows Server 2008 [SB] 3.x buildbot

2013-11-25 Thread STINNER Victor

New submission from STINNER Victor:

This issue looks like issue #19734, but I'm not sure, so I prefer to open a new 
issue. Don't hesitate to close it as a duplicate of it's the same.

http://buildbot.python.org/all/builders/AMD64%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1752/steps/test/logs/stdio

test_with_pip (test.test_venv.EnsurePipTest) ... FAIL

==
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
--
Traceback (most recent call last):
  File 
E:\home\cpython\buildslave\x64\3.x.snakebite-win2k8r2sp1-amd64\build\lib\test\test_venv.py,
 line 314, in test_with_pip
self.assertEqual(err, )
AssertionError: C:\\Users\\BUILDS~1\\AppData\\Local\\Tem[138 chars]\r\n != ''
- C:\Users\BUILDS~1\AppData\Local\Temp\tmpa0ocjb9d\Scripts\python_d.exe: No 
module named 'pip._vendor.requests.adapters'; 'pip' is a package and cannot be 
directly executed

--
components: Tests
keywords: buildbot
messages: 204325
nosy: haypo, ncoghlan
priority: normal
severity: normal
status: open
title: test_venv: test_with_pip() failure on AMD64 Windows Server 2008 [SB] 
3.x buildbot

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



[issue19732] python fails to build when configured with --with-system-libmpdec

2013-11-25 Thread Stefan Krah

Stefan Krah added the comment:

Matthias Klose rep...@bugs.python.org wrote:
 2.4~rc1:
  - configure.ac should call AC_CANONICAL_HOST, config,guess and
config.sub should be included.

Hmm. configure.ac doesn't use any of the variables set by that macro, and this
appears to work:

./configure --host=arm CC=arm-linux-gnueabi-gcc-4.7

  - there are still symbols which exists only for 32/64 bit archs.
intended?
(arch=@64@)mpd_qsset_i64@Base 2.3
(arch=@64@)mpd_qsset_u64@Base 2.3
(arch=@64@)mpd_sset_i64@Base 2.3
(arch=@64@)mpd_sset_u64@Base 2.3

That's on purpose:  These are low level functions that are supposed to set
static decimals as fast as possible.  A static mpd_t has a guaranteed
minimum allocation of two words for the coefficient. The 32-bit version
needs three words for UINT64_MAX, so they aren't available.

--

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



[issue19732] python fails to build when configured with --with-system-libmpdec

2013-11-25 Thread Matthias Klose

Matthias Klose added the comment:

Am 25.11.2013 12:42, schrieb Stefan Krah:
 
 Stefan Krah added the comment:
 
 Matthias Klose rep...@bugs.python.org wrote:
 2.4~rc1:
  - configure.ac should call AC_CANONICAL_HOST, config,guess and
config.sub should be included.
 
 Hmm. configure.ac doesn't use any of the variables set by that macro, and this
 appears to work:
 
 ./configure --host=arm CC=arm-linux-gnueabi-gcc-4.7

sure, but this should work without explicitly setting CC.

--

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



[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-11-25 Thread Bill Winslow

Bill Winslow added the comment:

I've stumbled upon what appears to be a related issue, but I'm not sure it 
deserves its own bug report.

I compiled 3.4 on my LMDE (so essentially Debian testing) system, and aside 
from not building tkinter, various compression modules, etc., all went well. I 
ran `make test` with no errors, including the success of test_venv. (There were 
many and various warnings about deprecated code and calling str() on bytes 
instances, but I'm pretty sure none of it is related).

I ran `sudo make altinstall` (to not nuke my current 3.3 from the repos), and 
to my surprise, it failed with the following error:




running install_scripts
copying build/scripts-3.4/pydoc3.4 - /usr/local/bin
copying build/scripts-3.4/2to3-3.4 - /usr/local/bin
copying build/scripts-3.4/idle3.4 - /usr/local/bin
copying build/scripts-3.4/pyvenv-3.4 - /usr/local/bin
changing mode of /usr/local/bin/pydoc3.4 to 755
changing mode of /usr/local/bin/2to3-3.4 to 755
changing mode of /usr/local/bin/idle3.4 to 755
changing mode of /usr/local/bin/pyvenv-3.4 to 755
rm /usr/local/lib/python3.4/lib-dynload/_sysconfigdata.py
rm -r /usr/local/lib/python3.4/lib-dynload/__pycache__
/usr/bin/install -c -m 644 ./Misc/python.man \
/usr/local/share/man/man1/python3.4.1
if test xupgrade != xno  ; then \
case upgrade in \
  upgrade) ensurepip=--altinstall --upgrade ;; \
  install|*) ensurepip=--altinstall ;; \
esac; \
 ./python -E -m ensurepip \
  $ensurepip --root=/ ; \
fi
Traceback (most recent call last):
  File /home/bill/py3.4/Python-3.4.0b1/Lib/runpy.py, line 160, in 
_run_module_as_main
__main__, fname, loader, pkg_name)
  File /home/bill/py3.4/Python-3.4.0b1/Lib/runpy.py, line 73, in _run_code
exec(code, run_globals)
  File /home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__main__.py, line 66, in 
module
main()
  File /home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__main__.py, line 61, in 
main
default_pip=args.default_pip,
  File /home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__init__.py, line 92, in 
bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File /home/bill/py3.4/Python-3.4.0b1/Lib/ensurepip/__init__.py, line 28, in 
_run_pip
import pip
  File /tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/__init__.py, 
line 10, in module
  File /tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/util.py, line 
17, in module
  File 
/tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/distlib/version.py,
 line 14, in module
  File 
/tmp/tmprwpsemxj/pip-1.5.rc1-py2.py3-none-any.whl/pip/_vendor/distlib/compat.py,
 line 66, in module
ImportError: cannot import name 'HTTPSHandler'
make: *** [altinstall] Error 1




Note: I will certainly *not* be trying to `sudo make install`.

In any case, the executable and modules were installed fine, so other than 
reporting it here, it's not causing me problems (so far).

--
nosy: +Dubslow

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



[issue17204] argparser's subparsers.add_parser() should accept an ArgumentParser

2013-11-25 Thread Mickaël Falck

Changes by Mickaël Falck lastmi...@gmail.com:


--
nosy: +Mickaël.Falck

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



[issue19585] Frame annotation

2013-11-25 Thread Walter Dörwald

Walter Dörwald added the comment:

Here is a new version of the patch. The annotation is done on the code object 
instead of on the frame object. This avoids two problems: There is no runtime 
overhead, as the decorator returns the original function and no additional 
frames show up in the traceback. Since the variables are only known at runtime, 
the annotation is now a function that does the formatting of the annotation 
message and gets passed the frame object. With this there is no runtime 
overhead when no exception is raised and even if an exception is raise, but the 
traceback is never formatted.

--
Added file: http://bugs.python.org/file32834/code-annotation.diff

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



[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-11-25 Thread Donald Stufft

Donald Stufft added the comment:

It probably can. I just need to figure out how to test it to make sure the PR 
that supposedly fixes it fixes it, and then figure out how to ensure it still 
works into the future.

--

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



[issue19770] NNTP.post broken

2013-11-25 Thread Szymon Sobik

New submission from Szymon Sobik:

post method fails because string methods have bytesrting arguments

ie.
line = line.rstrip(b\r\n) + _CRLF

--
components: Library (Lib)
messages: 204331
nosy: sobczyk
priority: normal
severity: normal
status: open
title: NNTP.post broken
type: behavior
versions: Python 3.2, Python 3.3, Python 3.4

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

This is a tricky one.  I can see the arguments either way, but it just feels 
wrong to have future imports in stdlib code.

I personally don't see anything wrong with the import and doctest changes, 
though.  Sure, someone may come along later and unknowingly break something for 
your backport, but it isn't likely and IMO it's no big deal if it happens, you 
can just fix it when your tests fail.  I also don't mind the super call change 
personally, but that is much more likely to get changed by someone later, since 
I'm sure other people find it uglier than I do :)

Platform kind of operates under its own rules.  I suppose asyncio does as well 
:)

--
nosy: +r.david.murray

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



[issue19770] NNTP.post broken

2013-11-25 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue19767] pathlib: iterfiles() and iterdirs()

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

Beta is out, so this issue must be targeted for 3.5.

--
nosy: +r.david.murray
versions: +Python 3.5 -Python 3.4

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



[issue19769] test_venv: test_with_pip() failure on AMD64 Windows Server 2008 [SB] 3.x buildbot

2013-11-25 Thread Nick Coghlan

Nick Coghlan added the comment:

So, the last part of the error message is just runpy getting confused because 
attempting to import pip.__main__ threw ImportError (it should check the 
ImportError name (see issue 19771).

I'm not sure about the first part though - I'm not sure why the pip wheel would 
lose track of a submodule like that.

--
nosy: +dstufft, larry
priority: normal - high
versions: +Python 3.4

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



[issue19771] runpy should check ImportError.name before wrapping it

2013-11-25 Thread Nick Coghlan

New submission from Nick Coghlan:

Issue 19769 shows that if __main__ in a package throws ImportError, runpy will 
incorrectly report the package as not being directly executable (when it 
actually claims to be executable, it's just broken)

This can be fixed in 3.3+ by checking for an appropriate value in the name 
attribute of the caught exception, and only wrapping it if the failed lookup 
was for the __main__ submodule we're looking for.

The associated test can just use a __main__.py that deliberately raises 
ImportError.

--
components: Library (Lib)
keywords: easy
messages: 204334
nosy: ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: runpy should check ImportError.name before wrapping it
type: behavior
versions: Python 3.3, Python 3.4

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



[issue19770] NNTP.post broken

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

Can you show an example of the failure, including the traceback?  I would think 
that nttplib would be mostly operating on byte objects, and I'm sure Antoine 
tested posting.

--
nosy: +pitrou, r.david.murray

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



[issue19585] Frame annotation

2013-11-25 Thread Nick Coghlan

Nick Coghlan added the comment:

Code objects are shared amongst multiple function objects, so you
can't store mutable state on them.

--

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



[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-11-25 Thread Nick Coghlan

Nick Coghlan added the comment:

That I can help with. Steal the import_fresh_module helper function from 
test.support (or the gist of it anyway - you can likely leave out the stuff 
about deprecated imports):

http://hg.python.org/cpython/file/default/Lib/test/support/__init__.py#l192


Then do:

   pip_nossl = import_fresh_module(pip, blocked=[ssl])

--

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



[issue19494] urllib2.HTTPBasicAuthHandler (or urllib.request.HTTPBasicAuthHandler) doesn't work with GitHub API v3 and similar

2013-11-25 Thread Matej Cepl

Matej Cepl added the comment:

I am trying to work on fixing issue 19494 (HTTPBasicAuthHandler doesn't work 
with Github and other websites which require prior Authorization header in the 
first request).

I have created this testing script calling GitHub v3 API using new 
“authentication handlers” (they are subclasses of HTTPSHandler, not 
HTTPBasicAuthHandler) and hoped that when I manage to make this script working, 
I could rewrite it into patch against cpython code.

However, when I run this script I get this error (using 
python3-3.3.2-8.el7.x86_64)

matej@wycliff: $ python3 test_create_1.py
DEBUG:module:gh_url = https://api.github.com/repos/mcepl/odt2rst/issues/
DEBUG:module:req = urllib.request.Request object at 0x7fee384a9fd0
DEBUG:module:req.type = https
DEBUG:http_request:type = https
Traceback (most recent call last):
  File test_create_1.py, line 80, in module
handler = opener.open(req, json.dumps(create_data).encode('utf8'))
  File /usr/lib64/python3.3/urllib/request.py, line 475, in open
response = meth(req, response)
  File /usr/lib64/python3.3/urllib/request.py, line 587, in http_response
'http', request, response, code, msg, hdrs)
  File /usr/lib64/python3.3/urllib/request.py, line 513, in error
return self._call_chain(*args)
  File /usr/lib64/python3.3/urllib/request.py, line 447, in _call_chain
result = func(*args)
  File /usr/lib64/python3.3/urllib/request.py, line 595, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
matej@wycliff: $

Could anybody suggest what I am doing wrong? I seem to have problem of working 
in between two superclasses (HTTPHandler and AbstractBasicAuthHandler). I guess 
I need to somehow include into opener original HTTPBasicAuthHandler (for error 
handlers). Any ideas how to do it?

--
Added file: http://bugs.python.org/file32835/test_create_1.py

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

If you started at 2.7 you would need less changes.

--
nosy: +pitrou, stevenjd

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



[issue19744] ensurepip should refuse to install pip if SSL/TLS is not available

2013-11-25 Thread Nick Coghlan

Nick Coghlan added the comment:

If the ssl import is actually in a submodule, you may need to list additional 
subpackages in the fresh parameter.

If you're wondering why this isn't in the importlib API - it's because it can 
go wrong in an impressively large number of ways, and we don't have any hope of 
documenting it well enough to make it usable by anyone that either: a) couldn't 
write it themselves; or b) isn't getting coached by someone that could write it 
themselves.

But when you know what you're doing and the modules involved don't break 
horribly when treated this way, it's a very neat trick for testing purposes.

--

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



[issue19770] NNTP.post broken

2013-11-25 Thread Szymon Sobik

Szymon Sobik added the comment:

Traceback (most recent call last):
  File ./nntp_test.py, line 23, in module
s.post(msg)
  File /usr/lib/python3.3/nntplib.py, line 909, in post
return self._post('POST', data)
  File /usr/lib/python3.3/nntplib.py, line 895, in _post
if not line.endswith(_CRLF):
TypeError: endswith first arg must be str or a tuple of str, not bytes

--
Added file: http://bugs.python.org/file32836/nntp_test.py

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

Python's stdlib contains other modules that contain code for older versions of 
Python. The platform module even contains lines like os.devnull was added in 
Python 2.4, so emulate it for earlier.

I never understood why the platform module should be backport compatible. Marc 
Andre Lemburg wrote that it is shipped externally. I don't understand the 
purpose of having a third party platform module since the module is part of the 
stdlib.

--
nosy: +haypo, lemburg

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



[issue19732] python fails to build when configured with --with-system-libmpdec

2013-11-25 Thread Stefan Krah

Stefan Krah added the comment:

Matthias Klose rep...@bugs.python.org wrote:
  ./configure --host=arm CC=arm-linux-gnueabi-gcc-4.7
 
 sure, but this should work without explicitly setting CC.

I can't get it to work without passing CC even with config.guess and
config.sub.  If you want it to work, could you submit a patch?  I've
set up a temporary repo:

hg clone http://bytereef.org:8000/ mpdecimal

Also, do you by any chance know a better solution for ldconfig (I'm
calling it unconditionally during install)?  I vaguely remember
that ldconfig does something different on OpenBSD.

--

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

 I'd like to add most modifications to 3.4 to simplify backporting.

I would prefer to not touch Python 3.4 backport just to simplify backporting. 
For example, I don't expect from __future__ import division in new Python 3.4 
modules, but only on old modules.

If the Python 3.4 evolves, you can use tools like meld to compare your backport 
and the latest version, and merge manually new changes. Or read Mercurial 
history of the Python 3.4 module to get patches.

For example, I maintain the faulthandler like that. I manually merge changes 
when I fix an issue in the CPython version. The version on PyPI is different: 
it uses SIGALRM instead of a thread, use PyInt_xxx() functions on Python 2, etc.

Do we expect many changes in the statistics modules?

--

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



[issue19770] NNTP.post broken

2013-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This won't work. The post() method needs a bytes object, or something which 
when iterating yields bytes data. Perhaps you can try to call as_bytes() on 
your MIMEText object:
http://docs.python.org/dev/library/email.message.html#email.message.Message.as_bytes

--

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



[issue19770] NNTP.post broken

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

as_bytes was added in 3.4.  For earlier python versions, you'll have to create 
a BytesGenerator object and flatten the message using it to get a bytes object 
you can past to post.

--

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



[issue19770] NNTP.post broken

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

It might be worth adding a post_message method, analogous to the send_message 
method I added to smtplib.

--

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



[issue19770] NNTP.post broken

2013-11-25 Thread Szymon Sobik

Szymon Sobik added the comment:

Ok I found this out too on my own.

It might be better to add examples using the MIME* classes to nntplib 
documentation.

--

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

FWIW, I sympathize with Christian's goal here, since I'm gonna have to backport 
pathlib too :-)

However, I think the following changes do make the docstrings less readable:

- mean([1, 2, 3, 4, 4])
-2.8
+ mean([1, 2, 3, 4, 4]) == 2.8
+True

--

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

 However, I think the following changes do make the docstrings less readable:

Doctests are not reliable. IMO it's better to use unittest with testcases. 
unittest is easier to maintain, work with Python 2 and 3, and usually provide 
more useful reports on error.

unittest has more features like functions to skip a test on a specific platform.

--

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



[issue19765] test_asyncio: test_create_server() failed on x86 Windows Server 2008 [SB] 3.x

2013-11-25 Thread Guido van Rossum

Guido van Rossum added the comment:

Can you try this fix?

diff -r 8d0206f97439 Lib/test/test_asyncio/test_events.py
--- a/Lib/test/test_asyncio/test_events.py  Sun Nov 24 22:41:35 2013 -0800
+++ b/Lib/test/test_asyncio/test_events.py  Mon Nov 25 07:48:29 2013 -0800
@@ -559,7 +559,7 @@
 client = socket.socket()
 client.connect(('127.0.0.1', port))
 client.sendall(b'xxx')
-test_utils.run_briefly(self.loop)
+test_utils.run_until(self.loop, lambda: proto is not None, 10)
 self.assertIsInstance(proto, MyProto)
 self.assertEqual('INITIAL', proto.state)
 test_utils.run_briefly(self.loop)

(I can also just commit that and the test_unix_events.py fix for AIX and hope 
for the best.)

--

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



[issue19743] test_gdb failures

2013-11-25 Thread Dave Malcolm

Dave Malcolm added the comment:

FWIW, I feel that it's worth just expecting failures with an *optimized* build: 
with an optimizing compiler, there's likely to always be some program counter 
location where the debugger is going to get confused for some variables.  Given 
umpteen different compiler variants, debugger variants etc, this is never going 
to be perfect.

So IMHO we should run the test on a --pydebug build, but accept that there will 
be some failures when optimization is on.

--

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



[issue19732] python fails to build when configured with --with-system-libmpdec

2013-11-25 Thread Stefan Krah

Stefan Krah added the comment:

Apparently the build failed because only arm-linux-gnueabi-gcc-4.7 was installed
but not arm-linux-gnueabi-gcc.

But the cross build succeeds with the original 2.4-rc1, except that 
arm-linux-gnueabi-ar
isn't picked up:

$ ./configure --host=arm-linux-gnueabi
checking for arm-linux-gnueabi-gcc... arm-linux-gnueabi-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gnueabi-gcc accepts -g... yes
checking for arm-linux-gnueabi-gcc option to accept ISO C89... none needed
checking system as reported by uname -s... Linux
checking how to run the C preprocessor... arm-linux-gnueabi-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for size_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for __uint128_t... no
checking size of size_t... 4
checking size of __uint128_t... 0
checking for x64 gcc inline assembler... no
checking for x87 gcc inline assembler... no
checking for -O2... yes
checking for glibc _FORTIFY_SOURCE/memmove bug... undefined
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libmpdec/Makefile
config.status: creating tests/Makefile
config.status: creating libmpdec/mpdecimal.h
config.status: creating config.h
$ make
cd libmpdec  make
make[1]: Entering directory `/home/stefan/tmp/mpdecimal-2.4-rc1/libmpdec'
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c basearith.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c context.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c constants.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c convolute.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c crt.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c mpdecimal.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c mpsignal.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c difradix2.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c fnt.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c fourstep.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c io.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c memory.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c numbertheory.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c sixstep.c
arm-linux-gnueabi-gcc -Wall -W -Wno-unknown-pragmas -DCONFIG_32 -DANSI -O2 
-fpic  -c transpose.c
ar rc libmpdec.a basearith.o context.o constants.o convolute.o crt.o 
mpdecimal.o mpsignal.o difradix2.o fnt.o fourstep.o io.o memory.o 
numbertheory.o sixstep.o transpose.o
ranlib libmpdec.a
arm-linux-gnueabi-gcc   -shared -Wl,-soname,libmpdec.so.2 -o libmpdec.so.2.4.0 
basearith.o context.o constants.o convolute.o crt.o mpdecimal.o mpsignal.o 
difradix2.o fnt.o fourstep.o io.o memory.o numbertheory.o sixstep.o transpose.o 
-lm
make[1]: Leaving directory `/home/stefan/tmp/mpdecimal-2.4-rc1/libmpdec'

--

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



[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

Updated patch for 3.3, and a new patch for 3.4.  In 3.4, set_payload raises an 
error if non-ascii-surrogateescape text is passed in as the argument (ie: there 
are non-ascii unicode characters in the string) and no charset is specified 
with which to encode them.  In an ideal world it would instead default to 
utf-8, but because there may exist code that passes in unicode and then encodes 
it later by calling set_charset, we can't go that route in 3.4.  In 3.5, after 
the few people who may be in that boat have fixed their code to include the 
charset on set_payload, we can in fact make it default to utf-8.

I had to fix a couple 3.4 test, one of which was no longer valid because I've 
now defined the previously undefined behavior of set_payload when passed 
unicode, and one of which was just wrong but I didn't notice because of this 
bug.

--
Added file: http://bugs.python.org/file32837/support_8bit_charset_cte.patch

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



[issue19063] Python 3.3.3 encodes emails containing non-ascii data as 7bit

2013-11-25 Thread R. David Murray

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


Added file: http://bugs.python.org/file32838/support_8bit_charset_cte.patch

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



[issue19772] str serialization of Message object may mutate the payload and CTE.

2013-11-25 Thread R. David Murray

New submission from R. David Murray:

Currently the string generator will downcast 8bit body parts to 7bit by 
encoding them using a 7bit CTE.  This is good.  However, the way it does it is 
to modify the Message object accordingly.  This is not good.  Except for 
filling in required missing bits of data (such as MIME borders), serializing a 
Message should not mutate it.  (And, for the curious, I am the one who made 
this mistake when I wrote the code :)

--
components: Library (Lib), email
keywords: easy
messages: 204356
nosy: barry, r.david.murray, vajrasky
priority: normal
severity: normal
stage: needs patch
status: open
title: str serialization of Message object may mutate the payload and CTE.
type: behavior
versions: Python 3.3, Python 3.4

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



[issue19765] test_asyncio: test_create_server() failed on x86 Windows Server 2008 [SB] 3.x

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

 Can you try this fix?

If you are asking to me: again, I don't own a Windows 2008 copy. Just commit 
and then watch buildbots :-)

--

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



[issue19537] Fix misalignment in fastsearch_memchr_1char

2013-11-25 Thread Stefan Krah

Stefan Krah added the comment:

 (gdb) p sizeof(PyASCIIObject)
 $1 = 22

If the only issue is that the size should be 24 instead of 22,
could we perhaps add an unused uint16_t to the struct just
for this architecture?

--
nosy: +skrah

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



[issue19773] Failed to build python 2.6.9 Solaris 10

2013-11-25 Thread lambrecht

New submission from lambrecht:

u1662805@methpr:/home/u1662805echo $PATH
/usr/sbin:/usr/bin:/usr/local/bin:/etc:/EXP_SYS/etc/ga/scripts:/EXP_SYS/etc:/EXP_SYS/UTI:/METHPR/EXP_SYS/etc:/METHPR/EXP_SYS/uti:/opt/VRTSvxfs/sbin:/EXP_SYS/etc/ga/scripts:/usr/openwin/bin:/usr/ccs/bin
u1662805@methpr:/home/u1662805make
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
building '_ssl' extension
gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/usr/local/ssl/include -I. 
-I/METHPR/tmp/Python-2.6.9/./Include -I. -I/METHPR/tmp/Python-2.6.9/./Include 
-I. -IInclude -I./Include -I/usr/local/include 
-I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c 
/METHPR/tmp/Python-2.6.9/Modules/_ssl.c -o 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_ssl.o
/METHPR/tmp/Python-2.6.9/Modules/_ssl.c: In function `_get_peer_alt_names':
/METHPR/tmp/Python-2.6.9/Modules/_ssl.c:702: warning: assignment discards 
qualifiers from pointer target type
/METHPR/tmp/Python-2.6.9/Modules/_ssl.c: In function `PySSL_cipher':
/METHPR/tmp/Python-2.6.9/Modules/_ssl.c:1095: warning: assignment discards 
qualifiers from pointer target type
gcc -shared 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_ssl.o 
-L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o 
build/lib.solaris-2.10-sun4v-2.6/_ssl.so
*** WARNING: renaming _ssl since importing it failed: ld.so.1: python: fatal: 
libssl.so.1.0.0: open failed: No such file or directory
building '_hashlib' extension
gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I/usr/local/ssl/include -I. 
-I/METHPR/tmp/Python-2.6.9/./Include -I. -I/METHPR/tmp/Python-2.6.9/./Include 
-I. -IInclude -I./Include -I/usr/local/include 
-I/METHPR/tmp/Python-2.6.9/Include -I/METHPR/tmp/Python-2.6.9 -c 
/METHPR/tmp/Python-2.6.9/Modules/_hashopenssl.c -o 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_hashopenssl.o
gcc -shared 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_hashopenssl.o
 -L/usr/local/ssl/lib -L/usr/local/lib -lssl -lcrypto -o 
build/lib.solaris-2.10-sun4v-2.6/_hashlib.so
*** WARNING: renaming _hashlib since importing it failed: ld.so.1: python: 
fatal: libssl.so.1.0.0: open failed: No such file or directory
building '_curses' extension
gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude 
-I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include 
-I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c 
-o 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.o
/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c: In function 
`PyCursesWindow_ChgAt':
/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:708: warning: implicit 
declaration of function `mvwchgat'
/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:712: warning: implicit 
declaration of function `wchgat'
gcc -shared 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.o
 -L/usr/local/lib -lncurses -o build/lib.solaris-2.10-sun4v-2.6/_curses.so
*** WARNING: renaming _curses since importing it failed: ld.so.1: python: 
fatal: relocation error: file build/lib.solaris-2.10-sun4v-2.6/_curses.so: 
symbol _unctrl: referenced symbol not found
building '_curses_panel' extension
gcc -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -I. -I/METHPR/tmp/Python-2.6.9/./Include -I. -IInclude 
-I./Include -I/usr/local/include -I/METHPR/tmp/Python-2.6.9/Include 
-I/METHPR/tmp/Python-2.6.9 -c /METHPR/tmp/Python-2.6.9/Modules/_curses_panel.c 
-o 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_curses_panel.o
gcc -shared 
build/temp.solaris-2.10-sun4v-2.6/METHPR/tmp/Python-2.6.9/Modules/_curses_panel.o
 -L/usr/local/lib -lpanel -lncurses -o 
build/lib.solaris-2.10-sun4v-2.6/_curses_panel.so
*** WARNING: renaming _curses_panel since importing it failed: No module 
named _curses

Failed to find the necessary bits to build these modules:
_bsddb _tkinter   bsddb185
gdbm   linuxaudiodev  ossaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


Failed to build these modules:
_curses_curses_panel  _hashlib
_ssl

running build_scripts

--
components: Build
messages: 204359
nosy: lambrechtphilippe
priority: normal
severity: normal
status: open
title: Failed to build python 2.6.9 Solaris 10
versions: Python 2.6

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



[issue19773] Failed to build python 2.6.9 Solaris 10

2013-11-25 Thread lambrecht

Changes by lambrecht philippe.lambre...@socgen.com:


--
type:  - compile error

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



[issue19773] Failed to build python 2.6.9 Solaris 10

2013-11-25 Thread Christian Heimes

Christian Heimes added the comment:

Python 2.6 is out of commission and will not receive update anymore. You have 
to fix the issues yourself or update to Python 2.7. I'm sorry for any 
inconvenience.

The _hashlib and _ssl errors look like a broken installation of openssl.

--
nosy: +christian.heimes
resolution:  - out of date
stage:  - committed/rejected

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



[issue19773] Failed to build python 2.6.9 Solaris 10

2013-11-25 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
status: open - closed

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



[issue19679] smtpd.py (SMTPChannel): get rid of conn attribute

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

Are you referring to implementing rfc 3463 and rfc 5248 insofar as they are 
applicable?  That seems useful.  I don't see anything in the RFC about the 'xab 
x.y.z text' form of the message, though.  Where is that documented?  IMO these 
messages should only be emitted if we got an ELHO...actually I would expect 
there to be an extension keyword associated with this, but I don't see one in 
the RFC.

The conn argument is a separate issue.  (And probably should not change for 
backward compatibility reasons.  Also, it doesn't have to be a socket, although 
it would indeed be unusual if it wasn't.)

--

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



[issue19773] Failed to build python 2.6.9 Solaris 10

2013-11-25 Thread STINNER Victor

STINNER Victor added the comment:

/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:708: warning: implicit 
declaration of function `mvwchgat'
/METHPR/tmp/Python-2.6.9/Modules/_cursesmodule.c:712: warning: implicit 
declaration of function `wchgat'

There errors are already reported as #13552.

--
nosy: +haypo

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



[issue19748] test_time failures on AIX

2013-11-25 Thread David Edelsohn

David Edelsohn added the comment:

The valid range is 00:00:00 UTC, January 1, 1970 to 03:14:07 UTC, January 19, 
2038.

--

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



[issue19765] test_asyncio: test_create_server() failed on x86 Windows Server 2008 [SB] 3.x

2013-11-25 Thread Antoine Pitrou

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


--
nosy: +sbt

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



[issue19585] Frame annotation

2013-11-25 Thread Walter Dörwald

Walter Dörwald added the comment:

Do you have an example where code objects are shared? We could attach the 
annotation formatter to the function object, but unfortunately the function 
object is now accessible in the traceback.

Note the co_annotation is not the annotation string, rather it is a function 
that does the formatting of the annotation.

--

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



[issue19691] Weird wording in RuntimeError doc

2013-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The mention was already there in 1994 (2ec96140a36b), under the following form:

+\begin{excdesc}{RuntimeError}
+  Raised when an error is detected that doesn't fall in any of the
+  other categories.  The associated value is a string indicating what
+  precisely went wrong.  (This exception is a relic from a previous
+  version of the interpreter; it is not used any more except by some
+  extension modules that haven't been converted to define their own
+  exceptions yet.)
+\end{excdesc}

It was changed slightly from being a relic to mostly a relic in 1997 
(238a8b6096e1):

 \begin{excdesc}{RuntimeError}
   Raised when an error is detected that doesn't fall in any of the
   other categories.  The associated value is a string indicating what
-  precisely went wrong.  (This exception is a relic from a previous
-  version of the interpreter; it is not used any more except by some
-  extension modules that haven't been converted to define their own
-  exceptions yet.)
+  precisely went wrong.  (This exception is mostly a relic from a
+  previous version of the interpreter; it is not used very much any
+  more.)
 \end{excdesc}

--

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



[issue19678] smtpd.py: channel should be passed to process_message

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

I think this is reasonable.  A patch would be welcome.

You could use inspect.  When I had to do something similar I just did the call 
inside a try/except, caught TypeError and retried without the extra argument.  
See the __init__ of email.feedparser.FeedParser.  I don't know which approach 
is better; although, with the new signature support in 3.4 perhaps inspecting 
the signature is better.

Another approach would be to designate a new method name for the new signature, 
and use hasattr to decide which to call.  That's actually a bit more consistent 
with the way the SMTPChannel works.

--
versions: +Python 3.5 -Python 3.4

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



[issue19537] Fix misalignment in fastsearch_memchr_1char

2013-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What is sizeof(PyUnicodeObject)?

--

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-25 Thread Eric Snow

Eric Snow added the comment:

The concern, as far as I understand it, is that any change might introduce 
regressions or even new bugs in the next beta.  Something like swapping out the 
parser generator implementation isn't a bug fix, but it isn't a new language 
(incl. stdlib) feature either.

I don't have a problem with the change.  Furthermore, it likely doesn't matter 
since there probably won't be any grammar changes during the beta that would 
trigger the tool.

--

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



[issue19739] Legit compiler warnings in new pickle code on 32-bit Windows

2013-11-25 Thread Zachary Ware

Zachary Ware added the comment:

This appears to be back with slightly different line numbers:

..\Modules\_pickle.c(718): warning C4293: '' : shift count negative or too 
big, undefined behavior
..\Modules\_pickle.c(719): warning C4293: '' : shift count negative or too 
big, undefined behavior
..\Modules\_pickle.c(720): warning C4293: '' : shift count negative or too 
big, undefined behavior
..\Modules\_pickle.c(721): warning C4293: '' : shift count negative or too 
big, undefined behavior
..\Modules\_pickle.c(1647): warning C4146: unary minus operator applied to 
unsigned type, result still unsigned

Seems to have been caused by 14f2776686b3.

--
nosy: +zach.ware
resolution: fixed - 
stage: committed/rejected - 
status: closed - open

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



[issue8881] socket.getaddrinfo() should return named tuples

2013-11-25 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2013-11-25 Thread Yury Selivanov

Yury Selivanov added the comment:

This broke a lot of our code, I think that priority needs to be raised to 
urgent.

--
nosy: +yselivanov

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



[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes

2013-11-25 Thread Leslie P. Polzer

Leslie P. Polzer added the comment:

Sorry for the confusion, the second comment (#msg203622) should actually have 
been a separate ticket.

Since you'd like to preserve conn I will just change the title of this ticket.

--
title: smtpd.py (SMTPChannel): get rid of conn attribute - smtpd.py 
(SMTPChannel): implement enhanced status codes

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



[issue17204] argparser's subparsers.add_parser() should accept an ArgumentParser

2013-11-25 Thread paul j3

paul j3 added the comment:

http://stackoverflow.com/a/20167038/901925
is an example of using `_parser_class` to produce different behavior in the 
subparsers.

parser = ArgumentParser()
parser.add_argument('foo')
sp = parser.add_subparsers(dest='cmd')
sp._parser_class = SubParser # use different parser class for subparsers
spp1 = sp.add_parser('cmd1')
spp1.add_argument('-x')
spp1.add_argument('bar')
spp1.add_argument('vars',nargs='*')

In this case the SubParser class implements a `parse_intermixed_known_args` 
method that handles that `nargs='*'` argument.

http://bugs.python.org/issue14191

It shouldn't be hard to add `parser_class` as a documented optional argument to 
`add_subparsers`.

--

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



[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2013-11-25 Thread HCT

HCT added the comment:

my projects are total broken by this, so my temporary solution is to down grade 
to 3.3.2

somehow we don't have any test to check this before releasing 3.3.3

--

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



[issue19750] test_asyncio.test_unix_events constructor failures on AIX

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 871d496fa06c by Guido van Rossum in branch 'default':
asyncio: Change mock pipe to mock socket. Hope to fix issue 19750.
http://hg.python.org/cpython/rev/871d496fa06c

--
nosy: +python-dev

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



[issue19739] Legit compiler warnings in new pickle code on 32-bit Windows

2013-11-25 Thread Christian Heimes

Changes by Christian Heimes li...@cheimes.de:


--
nosy: +christian.heimes

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



[issue19765] test_asyncio: test_create_server() failed on x86 Windows Server 2008 [SB] 3.x

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 368b74823c76 by Guido van Rossum in branch 'default':
asyncio: Hopeful fix for issue 19765.
http://hg.python.org/cpython/rev/368b74823c76

--
nosy: +python-dev

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



[issue19691] Weird wording in RuntimeError doc

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 313d9bb253bf by Antoine Pitrou in branch '2.7':
Issue #19691: remove outdated mention about RuntimeError
http://hg.python.org/cpython/rev/313d9bb253bf

--
nosy: +python-dev

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



[issue19655] Replace the ASDL parser carried with CPython

2013-11-25 Thread Brett Cannon

Brett Cannon added the comment:

Let's just go with Eli's latest idea and just save it for 3.5 since it won't 
make any visible improvement in 3.4.

--

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



[issue19691] Weird wording in RuntimeError doc

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6aeaaa614a19 by Antoine Pitrou in branch '3.3':
Issue #19691: remove outdated mention about RuntimeError
http://hg.python.org/cpython/rev/6aeaaa614a19

New changeset f4de1c5e381d by Antoine Pitrou in branch 'default':
Issue #19691: remove outdated mention about RuntimeError
http://hg.python.org/cpython/rev/f4de1c5e381d

--

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



[issue19691] Weird wording in RuntimeError doc

2013-11-25 Thread Antoine Pitrou

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


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

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



[issue19739] Legit compiler warnings in new pickle code on 32-bit Windows

2013-11-25 Thread Zachary Ware

Zachary Ware added the comment:

The attached patch fixes the warnings and doesn't appear to break anything 
obvious.

The first 4 are fixed by reverting Alexandre's change from '#if SIZEOF_SIZE_T' 
to 'if (sizeof(size_t)'.

The last one is different from the original 5th warning, and is fixed using the 
same trick that has been used in Modules/audioop.c; that is, use '(-0x7fffL 
- 1)' rather than '-0x8000L', which MSVC can't seem to handle.

--
keywords: +patch
Added file: http://bugs.python.org/file32839/issue19739.diff

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



[issue19742] pathlib group unittests can fail

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b58b58948c27 by Antoine Pitrou in branch 'default':
Issue #19742: fix a test_pathlib failure when a file owner or group isn't in 
the system database
http://hg.python.org/cpython/rev/b58b58948c27

--
nosy: +python-dev

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



[issue19742] pathlib group unittests can fail

2013-11-25 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It should be fixed now (i.e. the test is skipped).

--

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



[issue19742] pathlib group unittests can fail

2013-11-25 Thread Antoine Pitrou

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


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

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



[issue19774] strptime incorrect for weekday '0' when using week number format

2013-11-25 Thread Steve J Borba

New submission from Steve J Borba:

OS: Windows 7 Professional (64-bit)
Hardware: Intel

datetime.strptime returns an incorrect value when calculating a date using a 
week number format, such as %Y-%W-%w (Year-Week-Weekday). The value returned 
for weekday '0' of a given week is consistently 7 days greater than it should 
be. The following code illustrates:

from datetime import datetime
for i in range(0,53):
if i == 0:
yr=input(Enter a valid year: )
print(Wk#\tBeginning of week\tEnd of week)
BegWk = datetime.strptime((yr + - + str(i) + -0),%Y-%W-%w)
EndWk = datetime.strptime((yr + - + str(i) + -6),%Y-%W-%w)
print(str(i) + \t + str(BegWk) + \t +str(EndWk))

Here is a clip (7 lines) of the output from the code above:
Enter a valid year: 2013
Wk# Beginning of week   End of week
0   2013-01-06 00:00:00 2013-01-05 00:00:00
1   2013-01-13 00:00:00 2013-01-12 00:00:00
2   2013-01-20 00:00:00 2013-01-19 00:00:00
3   2013-01-27 00:00:00 2013-01-26 00:00:00
4   2013-02-03 00:00:00 2013-02-02 00:00:00
5   2013-02-10 00:00:00 2013-02-09 00:00:00
6   2013-02-17 00:00:00 2013-02-16 00:00:00

The value returned for the first column of each week is exactly 7 days higher 
than the correct result.

--
components: Library (Lib)
messages: 204382
nosy: Steve.J.Borba
priority: normal
severity: normal
status: open
title: strptime incorrect for weekday '0' when using week number format
type: behavior
versions: Python 3.3

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



[issue19739] Legit compiler warnings in new pickle code on 32-bit Windows

2013-11-25 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f8ac01a762c1 by Alexandre Vassalotti in branch 'default':
Issue #19739: Try to fix compiler warnings on 32-bit Windows.
http://hg.python.org/cpython/rev/f8ac01a762c1

--
nosy: +python-dev

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



[issue19679] smtpd.py (SMTPChannel): implement enhanced status codes

2013-11-25 Thread Leslie P. Polzer

Leslie P. Polzer added the comment:

I am indeed referring to the enhanced status codes proposed in RFC 3463. This 
would just entail adding information to the status codes, converting them from 
the format simple status code human-readable string to simple status 
code enhanced status code human-readable string.

In this it doesn't seem necessary to differentiate by HELO/EHLO; neither is it 
demanded by the standard nor does it result in an incompatible form of 
traditional HELO status messages. HELO clients should just interpret the first 
three digits and regard the rest as part of the human readable informal section.

--

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



[issue19763] Make it easier to backport statistics to 2.7

2013-11-25 Thread Georg Brandl

Georg Brandl added the comment:

As Victor says, I'm not keen on those examples in the stdlib that do this, I'd 
rather get rid of all of them.

And yes, doctests are only useful if they are written in the simplest possible 
way.  Otherwise unittest style tests should be preferred.

--

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



[issue19775] Provide samefile() on Path objects

2013-11-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

It would probably be useful to provide samefile() on Path objects - basically 
doing the same thing as os.path.samefile().

--
components: Library (Lib)
messages: 204386
nosy: pitrou
priority: normal
severity: normal
status: open
title: Provide samefile() on Path objects
type: enhancement
versions: Python 3.5

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



[issue19776] Provide expanduser() on Path objects

2013-11-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Something like expanduser() may be useful on Path objects.

--
components: Library (Lib)
messages: 204387
nosy: pitrou
priority: low
severity: normal
status: open
title: Provide expanduser() on Path objects
type: enhancement
versions: Python 3.5

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



[issue19777] Provide a home() classmethod on Path objects

2013-11-25 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Similar to Path.cwd(), perhaps a Path.home() to create a new Path object 
pointing to the current user's home directory may be useful.

--
components: Library (Lib)
messages: 204388
nosy: pitrou
priority: low
severity: normal
status: open
title: Provide a home() classmethod on Path objects
type: enhancement
versions: Python 3.5

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



[issue19766] test_venv: test_with_pip() failed on AMD64 Fedora without threads 3.x buildbot

2013-11-25 Thread Ned Deily

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


--
nosy: +ncoghlan

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which restores optimization for frame headers. Unfortunately it 
breaks test_optional_frames.

--

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-25 Thread Larry Hastings

Larry Hastings added the comment:

Isn't it a little late to be changing the pickle protocol, now that we've hit 
feature-freeze?  If you want to check something like this in you're going to 
have to make a good case for it.

--

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-25 Thread Serhiy Storchaka

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


Added file: http://bugs.python.org/file32840/pickle_frame_headers.patch

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



[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This doesn't change the pickle protocol. This is just an implementation detail.

--

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



[issue19626] test_email and Lib/email/_policybase.py failures with -OO

2013-11-25 Thread R. David Murray

R. David Murray added the comment:

Lacking feedback in the negative, I'm closing this.

--
status: open - closed

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



  1   2   >