[issue16901] In http.cookiejar.FileCookieJar() the .load() and .revert() methods don't work

2013-06-18 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue9740] Support for HTTP 1.1 persistent connections throughout the standard library

2013-06-18 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



[issue14000] Subprocess stdin.flush does not flush

2013-06-18 Thread Jian Wen

Jian Wen added the comment:

The following code shows how to use pts.

#!/usr/bin/env python

import os
import pty
import shlex
import time

_args = /usr/bin/ssh example.com
args = shlex.split(_args)

pid, child_fd = pty.fork()

if pid == 0:
# Child
os.execv(/usr/bin/ssh, args)

else:
# Parent
while True:
os.write(child_fd, '# keep alive\n')
os.read(child_fd, 1024)

time.sleep(2)

--
nosy: +Jian.Wen

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



[issue18251] test_subprocess_jy fails when Argument has embedded quote

2013-06-18 Thread Sowmya

New submission from Sowmya:

test_subprocess_jy fails with below error:
test test_subprocess_jy failed -- Traceback (most recent call last):
  File 
\'L:\\apps\\ascii\\jython\\70files\\current\\win\\Lib\\test\\test_subprocess_jy.py\',
 line 13, in testDefaultEnvIsInherited
p1 = Popen([sys.executable, \'-c\',
  File \'L:\\apps\\ascii\\jython\\70files\\current\\win\\Lib\\subprocess.py\', 
line 755, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
  File \'L:\\apps\\ascii\\jython\\70files\\current\\win\\Lib\\subprocess.py\', 
line 1269, in _execute_child
raise OSError(e.getMessage() or e)
OSError: Argument has embedded quote, use the explicit CMD.EXE call.


Solution : This testcase needs to be changed to suit the changes mentioned in 
Oracle 7u21 - 
(http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime).
 Python  code  needs to be modified to use Cmd.exe while running commands 
that contains quotes in it

--
files: test_subclasses_jy.py
messages: 191389
nosy: sowmyalakkappa
priority: normal
severity: normal
status: open
title: test_subprocess_jy fails when Argument has embedded quote
type: enhancement
versions: Python 2.6
Added file: http://bugs.python.org/file30632/test_subclasses_jy.py

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91

New submission from icedream91:

I used Python 3.3.2 to try this problem: http://projecteuler.net/problem=23 , 
and I got a correct answer.

When I wanted to check how long it took, I found something strange:
When I ran 23.py directly, it showed that it took about 13s. But if I use 
timeit module, it showed that it only took about 9s! I have tried these for 
some times, in both Ubuntu 12.10 and Windows 8, I don't understand why timeit 
will make the same code run faster.


Thanks.

--
components: Benchmarks
files: 23.py
messages: 191390
nosy: icedream91
priority: normal
severity: normal
status: open
title: timeit makes code run faster?
versions: Python 3.3
Added file: http://bugs.python.org/file30633/23.py

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91

Changes by icedream91 icedrea...@gmail.com:


Removed file: http://bugs.python.org/file30633/23.py

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91

icedream91 added the comment:

I used Python 3.3.2 to try this problem: http://projecteuler.net/problem=23 , 
and I got a correct answer.

When I wanted to check how long it took, I found something strange:
When I ran 23.py directly, it showed that it took about 13s. But if I use 
timeit module, it showed that it only took about 9s! I have tried these for 
some times, in both Ubuntu 12.10 and Windows 8, I don't understand why timeit 
will make the same code run faster.


Thanks.

--
Added file: http://bugs.python.org/file30634/23.py

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



[issue18253] make standard library PEP8 compliant

2013-06-18 Thread Friedrich Spee von Langenfeld

New submission from Friedrich Spee von Langenfeld:

The modules in the standard library aren´t PEP( compliant. I´ve written a 
script to change this. It uses autopep8.py (must be in the path) and is written 
for Windows users.

--
components: Library (Lib)
files: autopepframework.py
messages: 191392
nosy: Friedrich.Spee.von.Langenfeld
priority: normal
severity: normal
status: open
title: make standard library PEP8 compliant
type: enhancement
Added file: http://bugs.python.org/file30635/autopepframework.py

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I think if you use timeit then the code is wrapped inside a function before it 
is compiled.  This means that your code can mostly use faster local lookups 
rather than global lookups.

--
nosy: +sbt

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



[issue18254] Accessing attr dict at definition time of a class from a metaclass results in changed type.

2013-06-18 Thread Archard Lias

New submission from Archard Lias:

Accessing (just iterating or accessing in any way) the dict_proxy to the 
attribute dictionary in the `MessageMeta` metaclass, results in a change of 
type in any metaclass inheriting class definitions.

Reproducible in CPython versions (tested so far):
3.2.2
3.2.3

Works as of, or at least behaves as I subjectively intended to use it (only 
version tested)
3.3.2

--
components: Interpreter Core
files: bugreport_cpython3.2.3.py
messages: 191394
nosy: archardlias
priority: normal
severity: normal
status: open
title: Accessing attr dict at definition time of a class from a metaclass 
results in changed type.
versions: Python 3.2
Added file: http://bugs.python.org/file30636/bugreport_cpython3.2.3.py

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



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Jonas Borgström

Jonas Borgström added the comment:

Patch updated to include tests and versionchanged tags

--
Added file: http://bugs.python.org/file30637/hmac2.patch

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



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

Thanks for your update.

As far as I can tell you haven't signed our contributor agreement yet. Can you 
please do so?

http://www.python.org/psf/contrib/
http://www.python.org/psf/contrib/contrib-form/

--
stage: needs patch - patch review

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread icedream91

icedream91 added the comment:

I did some tests, Richard Oudkerk (sbt) is right. Thanks a lot.

--

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



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Jonas Borgström

Jonas Borgström added the comment:

Of course. I've now signed and filed the agreement.

--

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



[issue18240] hmac unnecessarily restricts input to bytes

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

It may take a day or two until your signature makes it through red tape. I'll 
get back to you. :)

--

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



[issue18251] test_subprocess_jy fails when Argument has embedded quote

2013-06-18 Thread R. David Murray

R. David Murray added the comment:

It looks like this bug belongs on the jython tracker at bugs.jython.org.  (By 
the way, it isn't clear if the problem is in the jython code or the test; the 
stdlib Popen works as expected on Windows.)

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

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



[issue18253] make standard library PEP8 compliant

2013-06-18 Thread R. David Murray

R. David Murray added the comment:

Sorry, but this is not the kind of change that we make to the codebase.  It has 
too many unintended consequences.  (Large portions of the stdlib pre-date PEP8, 
and thus are not PEP8 compliant.)  We fix some thing when we modify the code 
involved, but other things (such as API names) will at this point never get 
fixed, sad to say.

--
nosy: +r.david.murray
resolution:  - rejected
stage:  - committed/rejected
status: open - closed

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread R. David Murray

R. David Murray added the comment:

By the way, this kind of question is more suited to the python-list mailing 
list (where you will in the general case get a faster answer anyway :)

--
nosy: +r.david.murray
stage:  - committed/rejected
status: open - closed

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



[issue18162] Add index attribute to IndexError

2013-06-18 Thread Brett Cannon

Brett Cannon added the comment:

Do you mean sometimes there sometimes not because old code won't set it (yet) 
or because you don't think it will always be appropriate to set the attribute 
and thus people won't set it when available?

--

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Is -Werror=statement-after-declaration the right solution anyway? This errors 
out on just one of the incompatibilities between C89 and C99, although it is 
one that is easy to get wrong accidentally.

Gcc (and clang) also support '-std=c89' that forces the compiler to support 
only that standard. Not that switching to that flag would get us closer to 
closing this issue :-)

BTW. To make things more fun: both sysconfig and distutils.sysconfig contain 
code to parse the Makefile, and those two sets of code are not equivalent 
(distutils.sysconfig lets you override values using the environment, sysconfig 
does not). 

The attached crude hack fixes this particular issue, but I'm far from convinced 
that is is the right solution for two reasons: first of all it is a hack, 
second of all it drops the -Werror flag when building CPython's extensions.

A better solution would be the introduction of a new variable in the Makefile 
that contains those CFLAGS that should only be used during the build of Python 
itself, all those flags can then be ignored by the Makefile parsers in 
distutils.sysconfig and sysconfig. The disadvantage is that is introduces even 
more complexity in the Makefile.

--
Added file: http://bugs.python.org/file30638/issue18211-hack.txt

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
stage: committed/rejected - 

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



[issue18252] timeit makes code run faster?

2013-06-18 Thread Richard Oudkerk

Changes by Richard Oudkerk shibt...@gmail.com:


--
stage:  - committed/rejected

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I had a patch that only changed distutils.sysconfig.get_config_var('CFLAGS') 
when not building python, but then noticed that this doesn't work: the setup.py 
file for stdlib extensions fetches information from the toplevel sysconfig 
file, not distutils.sysconfig and uses that to override some information (look 
for make CC=altcc).

There are two problems there, for which I'll file separate issues:

1) setup.py shouldn't use sysconfig but distutils.sysconfig

2) the block of code that I mentioned earlier is not necessary at all, the 
comment is plain wrong (tested by removing the compiler update and running 
'make CC=no-such-file')

V2 of the hack triggers the change of BASECFLAGS only when not building the 
stdlib, but that doesn't work right now because of the issues mentioned earlier.

--
Added file: http://bugs.python.org/file30639/issue18211-hack-v2.txt

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



[issue18255] CPython setup.py problems

2013-06-18 Thread Ronald Oussoren

New submission from Ronald Oussoren:

While working on a fix for #18211 I noticed two problems with the setup.py 
that's used to build the stdlib extensions.

1) setup.py uses sysconfig instead of distutils.sysconfig. The sematics of the 
two modules a slighty different.

2) The block of code starting with the this text is not necessary because 
distutils.sysconfig (which is used by the build_ext command) already does the 
right thing for environment variables:


# When you run make CC=altcc or something similar, you really want
# those environment variables passed into the setup.py phase.  Here's
# a small set of useful ones.

--
components: Build
files: setup-update.txt
messages: 191406
nosy: ronaldoussoren
priority: normal
severity: normal
stage: patch review
status: open
title: CPython setup.py problems
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30640/setup-update.txt

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

The setup.py issues are in #18255.

--
dependencies: +CPython setup.py problems

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



[issue18162] Add index attribute to IndexError

2013-06-18 Thread R. David Murray

R. David Murray added the comment:

I am in favor of adding meaningful attributes to stdlib exceptions.  I've 
always considered the lack of such an API a wart in Python, though an 
understandable one (since exceptions started out as simple strings).  But yeah, 
while I hate to say it, this is probably mini-PEP material :(.

--
nosy: +r.david.murray

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



[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

Here is a simplified version of the C function. It uses y* or es# ascii to 
parse the argument.

The check for trailing data ensures that the user gets an error message if she 
tries to load a PEM string with multiple certs. She might expect that 
add_ca_cert(pem) loads all PEM certs from the string while in fact 
PEM_read_bio_X509() only loads the first cert. The new patch make the check 
optional.

I still need to find a good name for the option, though...

--
Added file: http://bugs.python.org/file30641/sslctx_add_cert4.patch

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



[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 The check for trailing data ensures that the user gets an error
 message if she tries to load a PEM string with multiple certs. She
 might expect that add_ca_cert(pem) loads all PEM certs from the
 string while in fact PEM_read_bio_X509() only loads the first cert.

I don't think it is useful. Just make the behaviour well-documented.
(there is no security risk in loading too few CA certs)

--

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



[issue18256] thread_pthread.h fixes for AIX

2013-06-18 Thread David Edelsohn

New submission from David Edelsohn:

Recent releases of AIX do not need to call pthread_init(). The function is 
provided in libpthread.a for backward compatibility, but not declared in any 
header. This patch adds a declaration, or it can be removed completely because 
AIX 4.x no longer is supported.

The patch also adds uses of error to two functions to silence warnings, in a 
similar manner to other functions in the file.

diff -r f6f70f1ab124 Python/thread_pthread.h
--- a/Python/thread_pthread.h   Mon Jun 17 22:02:14 2013 +0200
+++ b/Python/thread_pthread.h   Tue Jun 18 11:54:50 2013 -0700
@@ -170,6 +170,7 @@
 PyThread__init_thread(void)
 {
 #if defined(_AIX)  defined(__GNUC__)
+extern void pthread_init(void);
 pthread_init();
 #endif
 }
@@ -444,6 +445,7 @@
 pthread_lock *thelock = (pthread_lock *)lock;
 int status, error = 0;
 
+(void) error; /* silence unused-but-set-variable warning */
 dprintf((PyThread_free_lock(%p) called\n, lock));
 
 /* some pthread-like implementations tie the mutex to the cond
@@ -530,6 +532,7 @@
 pthread_lock *thelock = (pthread_lock *)lock;
 int status, error = 0;
 
+(void) error; /* silence unused-but-set-variable warning */
 dprintf((PyThread_release_lock(%p) called\n, lock));
 
 status = pthread_mutex_lock( thelock-mut );

--
components: Build
messages: 191410
nosy: David.Edelsohn
priority: normal
severity: normal
status: open
title: thread_pthread.h fixes for AIX
type: compile error
versions: Python 3.3, Python 3.4, Python 3.5

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



[issue18228] AIX locale parsing failure

2013-06-18 Thread David Edelsohn

Changes by David Edelsohn dje@gmail.com:


--
versions: +Python 2.7, Python 3.3

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



[issue18228] AIX locale parsing failure

2013-06-18 Thread David Edelsohn

Changes by David Edelsohn dje@gmail.com:


--
versions:  -Python 2.7, Python 3.3

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



[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-18 Thread David Edelsohn

Changes by David Edelsohn dje@gmail.com:


--
versions: +Python 2.7, Python 3.3, Python 3.4

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



[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-18 Thread David Edelsohn

David Edelsohn added the comment:

This needs to be backported to Python 2.7 as well.

--

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



[issue18238] test_signal.py wait_helper hangs on AIX

2013-06-18 Thread STINNER Victor

STINNER Victor added the comment:

 This needs to be backported to Python 2.7 as well.

signal.sigwaitinfo() was added to Python 3.3 (and doesn't exist in Python 2).

--
resolution:  - fixed
status: open - closed

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



[issue18255] CPython setup.py problems

2013-06-18 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/issue18255
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18255] CPython setup.py problems

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

So much for obviously correct changes...

1) fix typo in import statement (from sysconfig import import ...)

2) setup.py uses sysconfig.get_path and that's not present in 
distutils.sysconfig.

(Sigh..., why are there two modules with almost but not entirely equal 
functionality and APIs?)

--
Added file: http://bugs.python.org/file30642/setup-update-v2.txt

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



[issue18211] -Werror=statement-after-declaration problem

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I just noticed the patch is not good enough: python-config --cflags still 
prints the -Werror flag because it is now a shell script and doesn't use 
sysconfig data at all.

--

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



[issue18257] Two copies of python-config

2013-06-18 Thread Ronald Oussoren

New submission from Ronald Oussoren:

Changeset c0370730b364 introduced a shell-script implementation of 
python-config (see issue #16235). The older python implementation is still 
present in $(srcdir)/Misc and generated by Makefile.pre.in.

--
messages: 191416
nosy: doko, ronaldoussoren
priority: normal
severity: normal
stage: needs patch
status: open
title: Two copies of python-config
type: behavior
versions: Python 3.4

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



[issue18257] Two copies of python-config

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Also, the shell-script version of python-config uses the -f option of readlink 
and that option is not supported on OSX 10.8 (or older versions, I haven't 
looked at the 10.9 beta yet)

Furthermore the entire readlink command is not present in HP-UX (and possibly 
other enterpricy unix flavors)

--
components: +Demos and Tools

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



[issue11192] test_socket error on AIX

2013-06-18 Thread alef

alef added the comment:

Same error with Python 2.7.3 on AIX 6.1

--
versions: +Python 2.7

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



[issue11192] test_socket error on AIX

2013-06-18 Thread David Edelsohn

Changes by David Edelsohn dje@gmail.com:


--
nosy: +David.Edelsohn

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



[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

I'm pondering about the error case cert already in hash table. There should 
be a way to distinguish the error from other errors. I see three ways to handle 
the case:

1) introduce SSLCertInStoreError exeption
2) ignore the error and do nothing
3) ignore the error and return True if a cert was added or False if the cert is 
already in the store

I like 3).

--

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



[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le mardi 18 juin 2013 à 17:30 +, Christian Heimes a écrit :
 Christian Heimes added the comment:
 
 I'm pondering about the error case cert already in hash table. There
 should be a way to distinguish the error from other errors.

I don't know if you've seen it, but SSLError has library and reason
attributes (they are little known). See SSLErrorTests.

  I see three ways to handle the case:
 
 1) introduce SSLCertInStoreError exeption
 2) ignore the error and do nothing
 3) ignore the error and return True if a cert was added or False if
 the cert is already in the store
 
 I like 3).

Yes, sounds reasonable.

--

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



[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

Yes, I have seen them. In fact OpenSSL has library, function and reason.

if ((ERR_GET_LIB(errcode) == ERR_LIB_X509)  
(ERR_GET_REASON(errcode) == X509_R_CERT_ALREADY_IN_HASH_TABLE)) {}

I'm going for 3)

--

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



[issue18138] ssl.SSLContext.add_cert()

2013-06-18 Thread Christian Heimes

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


Added file: http://bugs.python.org/file30643/sslctx_add_cert5.patch

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



[issue17177] Deprecate imp

2013-06-18 Thread Brett Cannon

Brett Cannon added the comment:

Going to temporarily re-open to remind me to add better deprecation docs for 
imp.load_module() to point to specific loader in importlib.machinery.

Should also add example usage as well.

--
status: closed - open

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



[issue17883] Fix buildbot testing of Tkinter

2013-06-18 Thread Jeremy Kloth

Jeremy Kloth added the comment:

It seems that the changes committed by Ezio are causing the AMD64 Windows 
buildbot to hang in test_ttk_guionly.

A note that this buildbot is running as a service so no desktop is available.  
The same test however is working (skipped successfully) on the 3.3 branch, if 
that helps.

--
nosy: +jkloth

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



[issue15795] Zipfile.extractall does not preserve file permissions

2013-06-18 Thread anatoly techtonik

Changes by anatoly techtonik techto...@gmail.com:


--
nosy: +techtonik

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



[issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering

2013-06-18 Thread Łukasz Langa

Łukasz Langa added the comment:

Hello, Edward. First of all, thank you for correctly pointing out the problem. 
We'll integrate your patch but first I'd like to have a unit test that 
specifically shows why the secondonary `for` loop you introduced is necessary. 
Currently if we change this:

for index, base in enumerate(mro[i + 1:], i + 1):
if not issubclass(base, needle):
break

to this:

index = i + 1

the tests still pass.

--

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



[issue15795] Zipfile.extractall does not preserve file permissions

2013-06-18 Thread anatoly techtonik

anatoly techtonik added the comment:

There should be an easy way to restore file attributes.

--

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



[issue17883] Fix buildbot testing of Tkinter

2013-06-18 Thread Zachary Ware

Zachary Ware added the comment:

Jeremy, can you give me the output of a test run with issue17883-tmp-test.diff 
applied?  (Or just what a `python -m test -v test_ttk_guionly` gives with 
..\tcltk\bin on the PATH)

--

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



[issue17934] Add a frame method to clear expensive details

2013-06-18 Thread Antoine Pitrou

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


--
dependencies: +PEP 442 implementation

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



[issue18255] CPython setup.py problems

2013-06-18 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis added the comment:

distutils.sysconfig module is theoretically deprecated in favor of sysconfig 
module. It is better to fix sysconfig module than to switch back to 
distutils.sysconfig module.

--
nosy: +Arfrever

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



[issue18058] Define is_package for NamespaceLoader

2013-06-18 Thread Thomas Heller

Thomas Heller added the comment:

Brett, can these changes be merged into 3.3 also?

--
nosy: +theller

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



[issue18058] Define is_package for NamespaceLoader

2013-06-18 Thread Brett Cannon

Brett Cannon added the comment:

No because it would mean new functionality in a bugfix release.

--

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



[issue18256] thread_pthread.h fixes for AIX

2013-06-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f2e373ddfa00 by Antoine Pitrou in branch '3.3':
Issue #18256: Compilation fix for recent AIX releases.  Patch by David Edelsohn.
http://hg.python.org/cpython/rev/f2e373ddfa00

New changeset 7081859c1e20 by Antoine Pitrou in branch 'default':
Issue #18256: Compilation fix for recent AIX releases.  Patch by David Edelsohn.
http://hg.python.org/cpython/rev/7081859c1e20

New changeset a5ef439f3c9e by Antoine Pitrou in branch '2.7':
Issue #18256: Compilation fix for recent AIX releases.  Patch by David Edelsohn.
http://hg.python.org/cpython/rev/a5ef439f3c9e

--
nosy: +python-dev

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



[issue18256] thread_pthread.h fixes for AIX

2013-06-18 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Fixed, thank you!

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

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



[issue18248] fficonfig.py.in wrong for AIX

2013-06-18 Thread Antoine Pitrou

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


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge
stage:  - patch review
versions:  -Python 3.5

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



[issue1159] os.getenv() not updated after external module uses C putenv()

2013-06-18 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The problem is the 'putenv' and 'getenv' appear to be parallel, and seem to be 
documented as being parallel
Set the environment variable named key to the string value.
Return the value of the environment variable key if it exists,
but they are not. Getenv actually looks up the key in the internal os.environ 
copy while putenv puts to the actual external environment.

This tripped-up someone today on python-list, who did putenv(key, val); 
getenv(key) and wondered why putenv seemed to have no effect.

I think the solution for this should be to document the asymmetry by adding ' 
in os.environ' after 'key' in the getenv doc.

--
putenv should not also update os.environ because one can already do that with 
os.environ[key] = value (as recommended) and because the latter uses putenv 
*if available* to also update the external environment *if possible*. Note that 
at the time this system was designed, not all systems supported putenv (and 
perhaps not 'true' getenv either).

getenv(key) is not the same as os.environ[key] because the former has an 
optional 'default' parameter that defaults to None. So aside from 
back-compatibility, I do not think the behavior of existing code should change.

A new parameter might be possible. To implement it, one would have to augment 
the underlying, undocumented, C-coded (for CPython) os-specific module --  
posix, nt, os2, ce -- to define a new os-specific getenv function that 
parallels the os-specific putenv function.

Adding os.environ.update (or .synchronize) to resynchronize os.environ with the 
external environment would also require a new os-specific function. Currently, 
the original os.environ is imported as a *data* attribute of the os-specific 
module.

However, neither of these changes are needed for python code that used 
os.environ as intended. I don't think we should necessarily cater to badly 
written C libraries that modify the enviroment in a way that cannot be easily 
intercepted or controlled. So after making a doc change, I would be inclined to 
close this pending a python-ideas discussion that supported a new feature.

--
assignee:  - docs@python
components: +Documentation
nosy: +docs@python, terry.reedy
versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6

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



[issue18248] fficonfig.py.in wrong for AIX

2013-06-18 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

LGTM. I checked in Makefile.am, and the list of platform-specific files is the 
same.

--

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



[issue18258] Fix test discovery for test_codecmaps*.py

2013-06-18 Thread Zachary Ware

New submission from Zachary Ware:

The test package is almost to the point where I can run `PCbuild\python_d.exe 
-m unittest discover Lib/test/ test_*.py` and get a useful result, the only 
thing that still blows up is multibytecodec_support.py.  I had not previously 
noticed this problem due to the way support.open_urlresource works, requiring 
the 'urlfetch' resource if and only if the requested file has not already been 
fetched before and stored in the Lib/test/data dir.  
multibytecodec_support.TestBase_Mapping blows things up because it uses 
__init__ instead of setUp to try opening the needed file, which causes 
ResourceDenied to be raised at class creation time rather than test run time, 
which unittest can't handle.  The attached patch fixes this (at the expense of 
opening and closing the file once per test method, rather than once per class) 
as well as converting the test_codecmaps* scripts from test_main to 
unittest.main.

--
components: Tests
files: test_codecmaps_discovery.diff
keywords: patch
messages: 191434
nosy: brett.cannon, ezio.melotti, zach.ware
priority: normal
severity: normal
status: open
title: Fix test discovery for test_codecmaps*.py
type: enhancement
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file30644/test_codecmaps_discovery.diff

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



[issue17883] Fix buildbot testing of Tkinter

2013-06-18 Thread Jeremy Kloth

Jeremy Kloth added the comment:

(Note that the buildbot is 64-bit so the paths need to be tcltk64)

The test_ttk_guionly passed successfully *from the command-line*.  It is 
currently hung in that test from the buildbot scheduler *as a service*.

I do not know of a simple way to test changes via the buildbot service.

--

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



[issue18258] Fix test discovery for test_codecmaps*.py

2013-06-18 Thread Zachary Ware

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


--
type: enhancement - behavior

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



[issue3329] API for setting the memory allocator used by Python

2013-06-18 Thread STINNER Victor

STINNER Victor added the comment:

Update the patch to follow the API described in the PEP 445 (2013-06-18 
22:33:41 +0200).

--
Added file: http://bugs.python.org/file30645/py_setallocators-7.patch

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



[issue18184] Add range check for %c in PyUnicode_FromFormat

2013-06-18 Thread STINNER Victor

STINNER Victor added the comment:

Both patches look good to me. Do you feel motivated to check if all formating 
methods have a test? Here is a list of format methods:

PyUnicode_Format():
- 3.3, 3.4: formatchar() raises OverflowError if x  MAX_UNICODE
- 2.7: formatchar() raises OverflowError if x  0x10 (or x  0x, in 
narrow mode)

PyUnicode_FromFromatV():
- 2.7: no check, *s++ = va_arg(vargs, int); = BUG
- 3.3: indirect check, maxchar = Py_MAX(maxchar, ordinal); and then 
PyUnicode_New(n, maxchar); should fail = (ok)
- 3.4: raise ValueError if ordinal  MAX_UNICODE = OK

int.__format__('c'):
- 3.3, 3.4: format_long_internal() raises OverflowError if x  0x10 = OK
- 2.7: format_int_or_long_internal() raises OverflowError if x  0x10 (or x 
 0x in narrow mode) = OK

IMO a ValueError would be better than OverflowError, it's not really an 
overflow (limitation of the C language, or a C type). It is maybe too late to 
change this.

--

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



[issue18202] Minor fixes for test_coding

2013-06-18 Thread STINNER Victor

STINNER Victor added the comment:

The patch looks good to me. It may be better to split it in two commits: fix 
test_exec_valid_coding() in Python 3.3, cleanup test only in python 3.4. As you 
want.

--

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



[issue18259] Declare sethostname in socketmodule.c for AIX

2013-06-18 Thread David Edelsohn

New submission from David Edelsohn:

AIX provides sethostname() but it is not declared in any useful header. Fixed 
as follows:

diff -r 626a8e49f2a9 Modules/socketmodule.c
--- a/Modules/socketmodule.cTue Jun 18 23:28:18 2013 +0200
+++ b/Modules/socketmodule.cTue Jun 18 20:17:37 2013 -0700
@@ -4066,6 +4066,10 @@
 Py_buffer buf;
 int res, flag = 0;
 
+#ifdef _AIX
+extern int sethostname(const char *, size_t);
+#endif
+
 if (!PyArg_ParseTuple(args, S:sethostname, hnobj)) {
 PyErr_Clear();
 if (!PyArg_ParseTuple(args, O:sethostname,

It seemed best to declare it inside the function. I placed it below the other 
declarations, not immediately before the function use.

--
components: Build
messages: 191439
nosy: David.Edelsohn, haypo
priority: normal
severity: normal
status: open
title: Declare sethostname in socketmodule.c for AIX
type: compile error
versions: Python 3.3, Python 3.4, Python 3.5

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



[issue18259] Declare sethostname in socketmodule.c for AIX

2013-06-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9f8efcd78d0d by Christian Heimes in branch '3.3':
Issue #18259: Declare sethostname in socketmodule.c for AIX
http://hg.python.org/cpython/rev/9f8efcd78d0d

New changeset 14748397fc57 by Christian Heimes in branch 'default':
Issue #18259: Declare sethostname in socketmodule.c for AIX
http://hg.python.org/cpython/rev/14748397fc57

--
nosy: +python-dev

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



[issue18259] Declare sethostname in socketmodule.c for AIX

2013-06-18 Thread Christian Heimes

Christian Heimes added the comment:

Seems to work. I don't have root permission on the box so I can't actually test 
if the function call succeeds.

% ./python 
Python 3.4.0a0 (default:626a8e49f2a9, Jun 19 2013, 00:19:57) 
[GCC 4.7.1] on aix7
Type help, copyright, credits or license for more information.
 import socket
 socket.sethostname('python')
Traceback (most recent call last):
  File stdin, line 1, in module
PermissionError: [Errno 1] Not owner

--
nosy: +christian.heimes
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue17177] Deprecate imp

2013-06-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ded443c603f0 by Brett Cannon in branch 'default':
Issue #17177: Clarify some deprecations
http://hg.python.org/cpython/rev/ded443c603f0

--

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



[issue17177] Deprecate imp

2013-06-18 Thread Brett Cannon

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


--
status: open - closed

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



[issue18260] configparser: TypeError occurs when handling errors in files with binary names

2013-06-18 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

TypeError occurs when handling errors in files with binary names. 
configparser.* exceptions are expected.
This regression was introduced in Python 3.2.

$ cat /tmp/test1
[section]
[section]
$ cat /tmp/test2
[section]
option = value
option = value
$ python3.1 -c 'import configparser; 
configparser.ConfigParser().readfp(open(/tmp/test1))'
$ python3.1 -c 'import configparser; 
configparser.ConfigParser().readfp(open(/tmp/test2))'
$ python3.1 -c 'import configparser; 
configparser.ConfigParser().readfp(open(b/tmp/test1))'
$ python3.1 -c 'import configparser; 
configparser.ConfigParser().readfp(open(b/tmp/test2))'
$ python3.4 -c 'import configparser; 
configparser.ConfigParser().read_file(open(/tmp/test1))'
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/lib64/python3.4/configparser.py, line 708, in read_file
self._read(f, source)
  File /usr/lib64/python3.4/configparser.py, line 1061, in _read
lineno)
configparser.DuplicateSectionError: While reading from /tmp/test1 [line  2]: 
section 'section' already exists
$ python3.4 -c 'import configparser; 
configparser.ConfigParser().read_file(open(/tmp/test2))'
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/lib64/python3.4/configparser.py, line 708, in read_file
self._read(f, source)
  File /usr/lib64/python3.4/configparser.py, line 1087, in _read
fpname, lineno)
configparser.DuplicateOptionError: While reading from /tmp/test2 [line  3]: 
option 'option' in section 'section' already exists
$ python3.4 -c 'import configparser; 
configparser.ConfigParser().read_file(open(b/tmp/test1))'
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/lib64/python3.4/configparser.py, line 708, in read_file
self._read(f, source)
  File /usr/lib64/python3.4/configparser.py, line 1061, in _read
lineno)
  File /usr/lib64/python3.4/configparser.py, line 202, in __init__
Error.__init__(self, .join(msg))
TypeError: sequence item 1: expected str instance, bytes found
$ python3.4 -c 'import configparser; 
configparser.ConfigParser().read_file(open(b/tmp/test2))'
Traceback (most recent call last):
  File string, line 1, in module
  File /usr/lib64/python3.4/configparser.py, line 708, in read_file
self._read(f, source)
  File /usr/lib64/python3.4/configparser.py, line 1087, in _read
fpname, lineno)
  File /usr/lib64/python3.4/configparser.py, line 228, in __init__
Error.__init__(self, .join(msg))
TypeError: sequence item 1: expected str instance, bytes found

--
assignee: lukasz.langa
components: Library (Lib)
keywords: 3.2regression
messages: 191443
nosy: Arfrever, lukasz.langa
priority: normal
severity: normal
status: open
title: configparser: TypeError occurs when handling errors in files with binary 
names
versions: Python 3.3, Python 3.4

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



[issue18261] Confusing description in Minimal DOM implementation

2013-06-18 Thread Emcisq Zhao

New submission from Emcisq Zhao:

Visit http://docs.python.org/2.7/library/xml.dom.minidom.html, please notice 
the first paragraph. The last sentence is  should consider using the 
xml.etree.ElementTree module for their XML processing instead. Shouldn't it be 
 should consider using the xml.dom.minidom module for their XML processing 
instead?

--
assignee: docs@python
components: Documentation
messages: 191444
nosy: docs@python, zhjweizhjwei
priority: normal
severity: normal
status: open
title: Confusing description in Minimal DOM implementation
type: resource usage
versions: Python 2.7

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



[issue18255] CPython setup.py problems

2013-06-18 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I don't agree. Distutils still uses distutils.sysconfig for configuration 
information and setup.py wants to adjust that configuration, it should 
therefore use distutils.sysconfig instead of the global one. 

That said, it would be better to change distutils to use sysconfig instead of 
its local configuration information (distutils.sysconfig, 
distutils.command.install.INSTALL_SCHEMES, ...).  That has never been because 
distutils is frozen due to backward compatibility concerns, but it might be 
better to actually change distutils for 3.4 when there will be other changes to 
deal with the new packaging PEPs as well).

However: switching distutils to use the toplevel sysconfig will change 
functionality, as I wrote in my initial message you can use environment 
variables to override variables for distutils.sysconfig, but that doesn't work 
for the global sysconfig because the values in _sysconfigdata are expanded at 
build time.

--

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