[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Nick Coghlan

Nick Coghlan added the comment:

Marking this as buildbot, as Donald suspects it's the culprit for the current 
SSL related buildbot failures after merging issue 20995.

Also Donald, welcome to the I broke (some of) the buildbots club, although 
you did come up with something more exotic than the somewhat traditional I 
forgot to 'hg add' a new file. Your next challenge is to break them when a 
release is imminent and you need to abjectly apologise to a release manager 
while you try to fix it or decide to revert it :)

You're also getting to see first hand why I decided to write PEP 462 to start 
down the path of improving our core development workflows :)

--
keywords: +buildbot
nosy: +ncoghlan

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

I always have to do things the hard way ;)

Note that my patch changes the set_ecdh_curve() method to no longer require a 
name. If that is too big of a change for Python 3.4 we can just hardcode the 
same name inside of ssl.py for 3.4

--

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-22 Thread Zachary Ware

Zachary Ware added the comment:

Here's a slightly less ugly version of the patch.  I would really appreciate 
some review on this; this should solve a test_idle issue that was exacerbated 
by issue #15968 (for unknown reasons).

--
priority: low - normal
Added file: http://bugs.python.org/file34564/issue20035.v2.diff

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-22 Thread Zachary Ware

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


Removed file: http://bugs.python.org/file33233/suppress_environ_warning.diff

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-03-22 Thread Zachary Ware

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


Removed file: http://bugs.python.org/file33235/suppress_environ_warning.v2.diff

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



[issue16104] Use multiprocessing in compileall script

2014-03-22 Thread Claudiu.Popa

Claudiu.Popa added the comment:

What can I do to move this forward? I believe all concerns have been addressed 
and it seems ready to me.

--

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



[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-03-22 Thread Hristo Venev

New submission from Hristo Venev:

It would be better if string literals could be used there.

--
messages: 214451
nosy: h.venev
priority: normal
severity: normal
status: open
title: PyMethodDef ml_name is char* instead of const char*

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



[issue21021] PyMemberDef name is char* instead of const char*

2014-03-22 Thread Hristo Venev

New submission from Hristo Venev:

It would be better if string literals could be used there.

--
messages: 214453
nosy: h.venev
priority: normal
severity: normal
status: open
title: PyMemberDef name is char* instead of const char*

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



[issue21020] PyMethodDef ml_doc is char* instead of const char*

2014-03-22 Thread Hristo Venev

New submission from Hristo Venev:

It would be better if string literals could be used there.

--
messages: 214452
nosy: h.venev
priority: normal
severity: normal
status: open
title: PyMethodDef ml_doc is char* instead of const char*

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



[issue21022] PyMemberDef doc is char* instead of const char*

2014-03-22 Thread Hristo Venev

New submission from Hristo Venev:

It would be better if string literals could be used there.

--
messages: 214454
nosy: h.venev
priority: normal
severity: normal
status: open
title: PyMemberDef doc is char* instead of const char*

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



[issue21023] PyTypeObject tp_name is char* instead of const char*

2014-03-22 Thread Hristo Venev

New submission from Hristo Venev:

It would be better if string literals could be used there.

--
components: Extension Modules
messages: 214455
nosy: h.venev
priority: normal
severity: normal
status: open
title: PyTypeObject tp_name is char* instead of const char*
versions: Python 3.4

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



[issue21024] PyTypeObject tp_doc is char* instead of const char*

2014-03-22 Thread Hristo Venev

New submission from Hristo Venev:

It would be better if string literals could be used there.

--
components: Extension Modules
messages: 214456
nosy: h.venev
priority: normal
severity: normal
status: open
title: PyTypeObject tp_doc is char* instead of const char*
versions: Python 3.4

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



[issue21021] PyMemberDef name is char* instead of const char*

2014-03-22 Thread Hristo Venev

Changes by Hristo Venev hri...@venev.name:


--
components: +Extension Modules
versions: +Python 3.4

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



[issue21022] PyMemberDef doc is char* instead of const char*

2014-03-22 Thread Hristo Venev

Changes by Hristo Venev hri...@venev.name:


--
components: +Extension Modules
versions: +Python 3.4

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



[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-03-22 Thread Hristo Venev

Changes by Hristo Venev hri...@venev.name:


--
components: +Extension Modules
versions: +Python 3.4

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



[issue21020] PyMethodDef ml_doc is char* instead of const char*

2014-03-22 Thread Hristo Venev

Changes by Hristo Venev hri...@venev.name:


--
components: +Extension Modules
versions: +Python 3.4

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't think it makes much sense to have a default argument to 
set_ecdh_curve(). It's probably better to just copy mod_ssl's initialization 
(which selects prime256v1 on not-so-new OpenSSLs).

--

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



[issue20975] Python 3.4 build info wrong in code snippet

2014-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

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



[issue20906] Issues in Unicode HOWTO

2014-03-22 Thread Graham Wideman

Graham Wideman added the comment:

@Andre: 

_I_ know more or less the explanations behind all this. I am just putting it 
forward as an example which touches several concepts which are needed to 
explain it, and that a programmer might reason with to change a program (or the 
environment) to produce some output (instead of an exception), and possibly 
even the intended output.

For example, behind the brief explanation you provide, here are some of the 
related concepts:

1. print(s) sends output to stdout, which sends data to windows console 
(cmd.exe).

2. In the process, the output function that print -- stdout invokes attempts 
to encode s according to the encoding that the destination, cmd.exe reports 
that it expects.

3. On Windows (in English, or perhaps it's US locale), cmd.exe defaults to 
expecting encoding cp437.

4. cp437 is an encoding containing only 256 characters. Many Unicode code 
points obviously have no corresponding character in cp437.

5. The encoding process used by print() is set to exception on characters that 
have no mapping to the encoding wanted by stdout.

6. Consequently, print() throws an exception on code points outside of those 
representable in cp437.

Based on that, there are a number of moves the programmer might make, with 
varying results... possibly involving:

-- s.encode([various choices of options here]) -- s_as_bytes
-- print(s_as_bytes) (noting that 'Hello ' + s_as_bytes doesn't work)
-- Or maybe ascii(s)
-- Or possibly sys.stdout.buffer.write()

-- Pros and cons of the above, which require careful tracking of what the 
resulting strings or byte sequences really mean at each juncture.

-- cmd.exe chcp 65001 -- so print(unicode) won't exception, but still many 
chars will show as [?]
-- various font choices in cmd.exe which might be able to show the needed 
graphemes.
-- Automatic font substitution that occurs in some contexts when the selected 
font doesn't contain a requested code point and its grapheme.

... and probably more concepts that I've missed.

-- Graham

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch working with both 1.0.2 (set_ecdh_auto) and 1.0.1 (fallback on 
prime256v1).

--
Added file: http://bugs.python.org/file34565/ssl_ecdh_auto.patch

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



[issue20961] Fix usages of the note directive in the documentation

2014-03-22 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe tshep...@gmail.com:


--
nosy: +tshepang

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Perhaps we should add a test for this.

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

New patch with a test.

--
Added file: http://bugs.python.org/file34566/ssl_ecdh_auto2.patch

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



[issue21025] if check_hostname is true, context can't be used for server purposes

2014-03-22 Thread Antoine Pitrou

New submission from Antoine Pitrou:

On a SSLContext with check_hostname = True, calling wrap_socket(..., 
server_side=True) will complain that no server hostname has been passed. This 
should only be done for client sockets.

--
components: Library (Lib)
messages: 214462
nosy: christian.heimes, giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
status: open
title: if check_hostname is true, context can't be used for server purposes
type: behavior
versions: Python 3.4, Python 3.5

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



[issue21014] `1` = `True`; for tutorial docs

2014-03-22 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +ezio.melotti

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



[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Why are you suggesting that string literals cannot be used? Works fine for me.

--
nosy: +loewis

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



[issue21021] PyMemberDef name is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I propose any resolution to issue21019 be applied here as well.

--
nosy: +loewis

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



[issue21020] PyMethodDef ml_doc is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I propose any resolution to issue21019 be applied here as well.

--
nosy: +loewis

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



[issue21022] PyMemberDef doc is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I propose any resolution to issue21019 be applied here as well.

--
nosy: +loewis

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



[issue21023] PyTypeObject tp_name is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I propose any resolution to issue21019 be applied here as well.

--
nosy: +loewis

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



[issue21024] PyTypeObject tp_doc is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I propose any resolution to issue21019 be applied here as well.

--
nosy: +loewis

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



[issue21017] Enable Debug Tix build on Windows

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Tagged in http://svn.python.org/view?view=revisionrevision=89017

--

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



[issue20906] Issues in Unicode HOWTO

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

4. Many Internet standards are defined in terms of textual data

I believe the author was thinking of the old TCP-based protocols (ftp, smtp, 
RFC 822, HTTP), which have their commands/messages as ASCII-strings,  with a 
variable-length records (often terminated by line end).

I think bringing this up as an argument against UTF-32 somewhat flawed, for two 
reasons:
1. Historically, many of these protocols restricted themselves to pure ASCII, 
so using UTF-8 is as much a protocol violation as is using UTF-32.
2. The tricky part in this protocols is often not the risk of embedding NUL, 
but embedding CRLF (as 0D 0A might well appear in a character, a.g. MALAYALAM 
LETTER UU)

OTOH, it is a fact that several of these protocols got revised to support 
Unicode, and often re-interpreting the data as UTF-8 (with MIME being the 
notable exception that actually allows for UTF-32 on the wire if somebody 
choses to).

--
nosy: +loewis

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



[issue20975] Python 3.4 build info wrong in code snippet

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Bostjan: please understand that this is not possible. The build date is the 
date when Python interpreter was actually built. If I build Python on my Linux 
machine today, I get today's date. So there isn't any single one right build 
date - on Unix, people will typically see different strings.

FWIW, on my system, the prompt reads

Python 3.4.0 (v3.4.0:04f714765c13, Mar 22 2014, 13:30:59)
[GCC 4.7.2] on linux

--
nosy: +loewis

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



[issue20975] Python 3.4 build info wrong in code snippet

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I don't mind changing the text now, but I observe that there is a 
chicken-and-egg problem with the hg changeset number. That changeset number is 
only set when the tag is made, which must happen after the documentation is 
updated (or else the updated documentation is not in the release). Hence, the 
documentation can't know what the changeset number will be for an 
about-to-released version of Python.

--

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



[issue20975] Python 3.4 build info wrong in code snippet

2014-03-22 Thread Geoffrey Spear

Geoffrey Spear added the comment:

There is no correct date and time Python 3.4 was built. I'm sure even the 
Windows binary installers weren't built simultaneously, and on Linux systems it 
will differ based on distro.

My Python 3.4 says it was built 5 minutes ago, because it was.

I suppose bumping to some date after 3.4 was released makes sense, but trying 
to get it to show the user exactly what they're going to see when they run 
Python is impossible.

--
nosy: +geoffreyspear

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



[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-03-22 Thread Hristo Venev

Hristo Venev added the comment:

error: deprecated conversion from string constant to ‘char*’

I like -Werror.

--

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



[issue20906] Issues in Unicode HOWTO

2014-03-22 Thread R. David Murray

R. David Murray added the comment:

Although I agree that the Unicode Howto needs to provide enough information for 
someone to reason correctly about python3 unicode, I'd like to note that 
someone running into the encoding error on windows is *not* going to reach for 
the unicode howto to solve their problem.  Instead they will google the error 
message, and will find many helpful and unhelpful explanations and solutions.  
But they currently won't find this document (at least not on the first page of 
results).

So, if you really want to help someone with this problem, you need to 
specifically include that error message in the text as example of a commonly 
encountered problem, and then give a directed solution.

--
nosy: +r.david.murray

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



[issue20906] Issues in Unicode HOWTO

2014-03-22 Thread R. David Murray

R. David Murray added the comment:

On the other hand, I wonder if such problem/solution pairs should go in the FAQ 
list rather than the howto, perhaps with a pointer to the howto for those 
wanting more general information.  Specifically the Python on Windows section 
in this case.

I realize that you were using it as an example to tease out the concepts needed 
to reason correctly about a problem, but I think approaching it from the point 
of view of how the user will reason about it is not optimal.  Instead, write 
the FAQ answer, and figure out what concepts you need to use to *explain* the 
problem, that you then feel the desire to further expand upon in the howto for 
those users who reach for a deeper understanding instead of just an immediate 
solution.

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

The reason I made a default argument to set_ecdh_curve is that I couldn't find 
any information about what happens if you set a ecdh curve _twice_ within a a 
OpenSSL SSL Context. So I played it safe and made it a default argument that 
only gets called if you haven't called it. That preserves the users ability to 
specify their own curve for sure.

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

I know it doesn't segfault or raise an error if you do that, but I don't know 
if it:

1) Replaces the already called ECDH Curve
2) Adds to the already called ECDH Curve
3) Silently Does Nothing.

If it's 2 or 3 then your patch will make SSLContext().set_ecdh_curve() a no-op 
and take away users ability to set their own curve.

--

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



[issue21017] Enable Debug Tix build on Windows

2014-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8cf384852680 by Zachary Ware in branch 'default':
Issue #21017: Enable Tix debug build on Windows
http://hg.python.org/cpython/rev/8cf384852680

--
nosy: +python-dev

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



[issue21017] Enable Debug Tix build on Windows

2014-03-22 Thread Zachary Ware

Zachary Ware added the comment:

Thank you, Benjamin and Martin!  Debug Tix build now enabled.

--
assignee:  - zach.ware
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 I know it doesn't segfault or raise an error if you do that, but I don't know 
 if it:
 
 1) Replaces the already called ECDH Curve
 2) Adds to the already called ECDH Curve
 3) Silently Does Nothing.

Judging by OpenSSL's code, it replaces the already called ECDH curve.

(from s3_lib.c:

if (s-cert-ecdh_tmp != NULL)
EC_KEY_free(s-cert-ecdh_tmp);
s-cert-ecdh_tmp = ecdh;

)

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

Works for me, that's what it appears like to me too. +1

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is an updated patch with proper releasing the EC_KEY structure.

(note that the patch has a slight performance implication: creating a 
SSLContext becomes more costly - around 100µs more here)

--
Added file: http://bugs.python.org/file34567/ssl_ecdh_auto3.patch

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



[issue5680] Command-line arguments when running in IDLE

2014-03-22 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

Submitting a patch for 3.4.

1. Allows the user to set command line arguments via a dialog box
2. Parsing - Maps the string which user entered into a list i.e. the same 
results are produced as when run via terminal/command prompt. The parsing 
methods returns a list, which is similar to the sys.argv, when you run script 
from command line.
3. Adds tests for the parsing method
4. Extends mock_idle for point 3

I am on Debian and don't have access to a windows machine. please try to run 
the tests on windows machine and see if its OK.(cmd handles arguments rather 
differently.)

Also, should we persist the command line argument that user entered across 
sessions?

--
nosy: +sahutd
Added file: http://bugs.python.org/file34568/cmd-arg.patch

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

Looks good to me, do you want to commit it Antoine?

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +alex

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I will :)

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

Attached is a patch that:

* Switches the protocol to SSLv23 so that we can negotiate a TLS1.1 or TLS1.2 
connection.
* Sets OP_CIPHER_SERVER_PREFERENCE for Purpose.CLIENT_AUTH so that our 
carefully selected cipher priority gives us better encryption and PFS
* Sets OP_SINGLE_DH_USE and OP_SINGLE_ECDH_USE for Purpose.CLIENT_AUTH to 
prevent re-use of the DH and ECDH keys in distinct sessions.

--
keywords: +patch
Added file: http://bugs.python.org/file34569/ssl-server-defaults.diff

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Alex Gaynor

Changes by Alex Gaynor alex.gay...@gmail.com:


--
nosy: +alex

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 869277faf3dc by Antoine Pitrou in branch '3.4':
Issue #21015: SSL contexts will now automatically select an elliptic curve for 
ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to 
prime256v1.
http://hg.python.org/cpython/rev/869277faf3dc

New changeset 3b81d1b3f9d1 by Antoine Pitrou in branch 'default':
Issue #21015: SSL contexts will now automatically select an elliptic curve for 
ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to 
prime256v1.
http://hg.python.org/cpython/rev/3b81d1b3f9d1

--
nosy: +python-dev

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



[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 869277faf3dc by Antoine Pitrou in branch '3.4':
Issue #21015: SSL contexts will now automatically select an elliptic curve for 
ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to 
prime256v1.
http://hg.python.org/cpython/rev/869277faf3dc

New changeset 3b81d1b3f9d1 by Antoine Pitrou in branch 'default':
Issue #21015: SSL contexts will now automatically select an elliptic curve for 
ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to 
prime256v1.
http://hg.python.org/cpython/rev/3b81d1b3f9d1

--

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



[issue20913] Standard Library documentation needs SSL security best practices doc.

2014-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8661ffca4581 by Antoine Pitrou in branch '3.4':
Issue #20913: improve the SSL security considerations to first advocate using 
create_default_context().
http://hg.python.org/cpython/rev/8661ffca4581

New changeset e703fc5262b7 by Antoine Pitrou in branch 'default':
Issue #20913: improve the SSL security considerations to first advocate using 
create_default_context().
http://hg.python.org/cpython/rev/e703fc5262b7

--
nosy: +python-dev

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



[issue20913] Standard Library documentation needs SSL security best practices doc.

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've committed the latest patch. I hope things are better now!

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

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



[issue21025] if check_hostname is true, context can't be used for server purposes

2014-03-22 Thread Antoine Pitrou

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


--
nosy: +dstufft

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



[issue21025] if check_hostname is true, context can't be used for server purposes

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(of course, it may be better to have separate contexts for client and server 
use, but it can also be convenient to use a single context - especially when 
doing tests :-))

--

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



[issue21015] support SSL_CTX_set_ecdh_auto on newer OpenSSLs

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The Ubuntu LTS buildbot seems to feel better now, closing.

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

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(as an aside, Donald, perhaps you want to consider adding yourself to relevant 
topics in http://docs.python.org/devguide/experts.html )

--

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



[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

Yes

--
resolution:  - fixed
status: open - closed

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



[issue20995] Use Better Default Ciphers for the SSL Module

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The buildbot failures should have been fixed by #21015, should we close this 
one?

--

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



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-22 Thread akira

akira added the comment:

I've checked the source code for 3.4; `subprocess` uses `_winapi.CreateProcess` 
on Windows [1] that in turn uses `CreateProcessW` [2]. CreateProcessA is not 
used.

`Popen` should already support Unicode on Windows though I don't see explicit 
tests for non-ascii arguments or arguments that can't be encoded using `mbcs` 
character encoding.

[1]: http://hg.python.org/cpython/file/3.4/Lib/subprocess.py#l1063
[2]: http://hg.python.org/cpython/file/3.4/Modules/_winapi.c#l579

--
nosy: +akira

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

I'll do that :)

To be clear about this patch, it raises the upper bounds of security by 
enabling TLS 1.1, and 1.2 as well as the single use for (EC)DH and preferring 
the server ciphers.

However it also lowers the lower bounds of security and includes SSLv3 which 
has some issues (see 
https://en.wikipedia.org/wiki/Transport_Layer_Security#SSL_3.0). However there 
exists clients who only support SSL3 (The primary one I'm aware of is IE6 on 
Windows XP).

We can add OP_NO_SSLv3 to the default context to prevent SSL3 but it's sort of 
a situational thing. If you're doing something where you need SSL3 clients you 
don't want OP_NO_SSLv3.

So I guess the question is, do we want to be more secure by default and *not* 
lower the lower bounds of security and require people to add context.options  
~ssl.OP_NO_SSLv3 if they want to support SSLv3 connections?

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

 We can add OP_NO_SSLv3 to the default context to prevent SSL3 but it's
 sort of a situational thing. If you're doing something where you need
 SSL3 clients you don't want OP_NO_SSLv3.
 
 So I guess the question is, do we want to be more secure by default
 and *not* lower the lower bounds of security and require people to add
 context.options  ~ssl.OP_NO_SSLv3 if they want to support SSLv3
 connections?

Most people won't understand the symptoms if some clients can't connect,
so I'd say no.
Also, clients should always use the higher possible protocol version, so
I don't think security is at stake here.

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Alex Gaynor

Alex Gaynor added the comment:

Unfortunately most TLS implementations (particularly those in browser stacks) 
are vulnerable to downgrade attacks, whereby an attacker can send some 
malicious packets to simulate a connection failure and cause a lower version of 
the protocol to be negotiated, 
https://crypto.stackexchange.com/questions/10493/why-is-tls-susceptible-to-protocol-downgrade-attacks
 has some info on it. As a result, whenever possible it's really desirable to 
completely disallow as many poor choices as possible.

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

That's not entirely true unfortunately :(

There are downgrade attacks that work all the way up through TLS 1.2. These are 
not strictly a problem of the protocol specs but instead of the implementations.

See: 
https://crypto.stackexchange.com/questions/10493/why-is-tls-susceptible-to-protocol-downgrade-attacks

The general gist of it is some servers/firewalls/etc have buggy implementations 
that cause a TLS1.0+ handshake to fail and some clients (browsers being a big 
one) decided to handle this by restarting the connection with SSL3.0 instead of 
TLS1.0+. So thus it is possible to effectively downgrade a client, even one 
that supports TLS1.2. It is not however possible to do it within a single 
connection.

The version selection process should not be considered a security feature but 
should instead be looked at as a way to opportunistically add newer features.

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Donald Stufft

Donald Stufft added the comment:

To be clear though, a lot of TLS servers out there still have SSL3.0 enabled by 
default, primarily because of IE6 / XP. I'm on the fence about what the right 
answer is for create_default_context. From a strictly best practices for 
security sense of view you want to disable SSLv3 (and this matches what 
create_default_context did prior to my patch).

Can we perhaps split the difference and disable SSL3.0 and document what the 
error looks like when you try to connect with SSL3.0 and how to re-enable it?

--

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



[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I still can't reproduce the problem, not even with -Werror:

loewis@dinsdale:~$ cat a.c
struct Foo{
  char *text;
};

struct Foo f = {
  data
};

int main()
{
  return 0;
}

loewis@dinsdale:~$ gcc -Wall -Werror -o a a.c
loewis@dinsdale:~$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

loewis@dinsdale:~$

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(by which I mean: ok, let's disable SSLv3)

--

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



[issue21013] server-specific SSL context configuration

2014-03-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Well, I suppose IE6/XP is starting to look very old (though probably deployed 
quite widely), and TLS 1.0 was standardized in 1999.

--

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



[issue21019] PyMethodDef ml_name is char* instead of const char*

2014-03-22 Thread Hristo Venev

Hristo Venev added the comment:

g++

--

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



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Peter, can you post 1 or more failing examplex?  With some, I might be 
persuaded that this is a bug.

Victor, I know you have worked in this area. Any opinions?

--
nosy: +haypo
stage:  - test needed
versions: +Python 3.5

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



[issue17621] Create a lazy import loader mixin

2014-03-22 Thread Eric Snow

Eric Snow added the comment:

Review posted.  Thanks for working on this, Brett.

--
nosy: +eric.snow

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



[issue20906] Issues in Unicode HOWTO

2014-03-22 Thread Graham Wideman

Graham Wideman added the comment:

@R David:  I agree with you. Thanks for extending the line of thinking I 
outlined.

--

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



[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder

2014-03-22 Thread Claudiu.Popa

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


Added file: http://bugs.python.org/file34570/issue19714.patch

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



[issue20975] Python 3.4 build info wrong in code snippet

2014-03-22 Thread Georg Brandl

Georg Brandl added the comment:

I'd just make it the approximate release date of 3.4.  The version is adapted 
anyway as part of a new minor release, so the date can also be.

--
nosy: +georg.brandl

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



[issue20975] Python 3.4 build info wrong in code snippet

2014-03-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4476b7493ee4 by Georg Brandl in branch '3.4':
Closes #20975: make date in the interpreter banner a little more consistent
http://hg.python.org/cpython/rev/4476b7493ee4

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

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



[issue21026] Document sitecustomize.py problems with pythonw

2014-03-22 Thread Terry J. Reedy

New submission from Terry J. Reedy:

In the first section of the doc for site.py, after

After these path manipulations, an attempt is made to import a module named 
sitecustomize, which can perform arbitrary site-specific customizations. It is 
typically created by a system administrator in the site-packages directory. If 
this import fails with an ImportError exception, it is silently ignored.

I propose to add (something like)

If python is started without output streams available, as with pythonw on 
Windows (used by default to start Idle), attempted output from sitecustomize is 
ignored. Any exception other that ImportError causes a silent and perhaps 
mysterious failure of the process.

This issue was stimulated by someone asking on python-list about print() outout 
appearing when starting the console interpreter but not when starting Idle (on 
Windows).  I then tested the result of an excecption other than ImportError. At 
the console, nothing visible happens until a new prompt appears.

C:\Programs\Python34pythonw -m idlelib.idle

C:\Programs\Python34

If Idle is already running, the attempt to run a file with F5 gives a messages 
about not being able to connect to the subprocess (which silently failed).

--
components: Library (Lib)
keywords: patch
messages: 214512
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Document sitecustomize.py problems with pythonw
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-22 Thread STINNER Victor

STINNER Victor added the comment:

I don't understand this issue. Python 3 uses CreateProcessW() and so
support the full Unicode range. I suggest to close this issue as invalid.

Popen() parameters are Unicode strings. It may support bytes string, but
passing bytes to OS functions on Windows is deprecated, especially for
filenames.

--

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



[issue20937] test_socket: buffer overflow in sock_recvmsg_guts

2014-03-22 Thread Charles-François Natali

Charles-François Natali added the comment:

I don't see anything wrong with the code.

Could you try running the test under valgrind.
You must build Python with --with-valgrind, and then:
valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp test

--

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



[issue20999] setlocale, getlocale succession -- ValueError or (None, None)

2014-03-22 Thread albertjan

albertjan added the comment:

Ok, I know this is closed as a duplicate, but I am pasting some additional info 
here for reference. All info is about the FIRST system of the original message

## The locale settings
fomcls-Mac-Pro:Desktop fomcl$ locale
LANG=
LC_COLLATE=C
LC_CTYPE=UTF-8
LC_MESSAGES=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C
LC_ALL=

##  export LANG=en_US.UTF-8 does not fix it.
fomcls-Mac-Pro:Desktop fomcl$ export LANG=en_US.UTF-8
fomcl-Mac-Pro:Desktop fomcl$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
 import locale
 locale.getdefaultlocale()
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py,
 line 496, in getdefaultlocale
return _parse_localename(localename)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py,
 line 428, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
 locale.setlocale(locale.LC_ALL, )
'en_US.UTF-8/UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/en_US.UTF-8'
 locale.getlocale()
Traceback (most recent call last):
  File stdin, line 1, in module
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py,
 line 515, in getlocale
return _parse_localename(localename)
  File 
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py,
 line 428, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

## export LC_ALL=en_US.UTF-8 makes it all work as expected/desired.
fomcls-Mac-Pro:Desktop fomcl$ export LC_ALL=en_US.UTF-8
fomcls-Mac-Pro:Desktop fomcl$ python
Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
 import locale
 locale.getdefaultlocale()
('en_US', 'UTF-8')
 locale.getlocale()
(None, None)
 locale.setlocale(locale.LC_ALL, )
'en_US.UTF-8'
 locale.getlocale()
('en_US', 'UTF-8')

--

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



[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa

New submission from Claudiu.Popa:

Hello!

The attached patch proposes a new command line interface to difflib module.
Currently, `python -m difflib` does nothing useful, it runs the doc suite for 
the difflib module.
Right now, there are a couple of modules in the standard lib, which provides
helpful cli interfaces. For instance, inspect for analyzing an object, 
compileall for compilation of Python files
or json.tool for validating and pretty printing JSON. Also, in Tools/scripts/ 
there is a small utility called diff.py,
which uses difflib to implement a simple diff like utility, but the following 
issue proposes its deprecation
and I'll enumerate my reasons for this:

- On Windows, py -3 -m difflib is easier to use. Yes, Tools/Scripts can be 
added to PATH, so that diff.py can be used there, but we can't do always that. 
I have at work a couple of machines where I can't modify the PATH due to user 
limitations. Having `py -3 -m difflib` as a handy diff tool is invaluable on 
such systems.

- Continuing the same argument as above, you can't always install a proper diff 
tool, due to same limitations. Having a simple one builtin in the stdlib is 
more than useful! Also, you can't always use a versioning system, in order to 
use its diff feature.

- Tools/Scripts/diff.py is not tested at all.

- diff.py was added before the `-m` thingy came, now `-m difflib` is the more 
natural way and I hope to see even more modules providing it with useful cli 
interfaces, like compileall or inspect.

Thanks in advance!

--
components: Library (Lib)
files: difflib_cli.patch
keywords: patch
messages: 214516
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: difflib new cli interface
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file34571/difflib_cli.patch

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



[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa

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


Added file: http://bugs.python.org/file34572/difflib_cli.patch

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



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-22 Thread Martin v . Löwis

Martin v. Löwis added the comment:

The issue is really that Terry had removed 2.7 from the list of affected 
versions, and added 3.4 instead. The original issue was reported against 2.7, 
where the observation that it uses CreateProcess is correct:

http://hg.python.org/cpython/file/babb9479b79f/PC/_subprocess.c#l463

The OP's observation that this restricts the supported executable names to be 
ascii is incorrect. Instead, any string in the CP_ACP (ANSI) encoding of the 
system would work, which practically allows to access all directories on a 
typical installation.

I'd close this as won't fix, except that I recall a recent discussion that 
lack of Unicode support in some API is considered a bug in 2.7.

So: patches welcome (not really - I wouldn't mind if this stays open until 2.7 
is properly retired).

--
nosy: +loewis
versions: +Python 2.7 -Python 3.4, Python 3.5

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



[issue21027] difflib new cli interface

2014-03-22 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Here's a new patch which addresses the comments of berker.peksag. Thank you for 
the review!

--
Added file: http://bugs.python.org/file34573/issue21027.patch

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



[issue20999] setlocale, getlocale succession -- ValueError or (None, None)

2014-03-22 Thread R. David Murray

R. David Murray added the comment:

Thank you, that information confirms that this is indeed a duplicate.

--

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



[issue19264] subprocess.Popen doesn't support unicode on Windows

2014-03-22 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You're right, the bug/enhancement border for 2.7 unicode issues has been 
shifted a bit (or perhaps made a bit more consistent). A failing case is still 
needed.

--
type: enhancement - behavior

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



[issue21027] difflib new cli interface

2014-03-22 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag
stage:  - patch review

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



[issue17621] Create a lazy import loader mixin

2014-03-22 Thread Jakub Wilk

Changes by Jakub Wilk jw...@jwilk.net:


--
nosy: +jwilk

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



[issue21028] ElementTree objects should support all the same methods are Element objects

2014-03-22 Thread Raymond Hettinger

New submission from Raymond Hettinger:

The inner objects are Elements which has a great deal of flexiblity (for 
example, they can be iterated over directly).   The outermost object is an 
ElementTree which lacks those capabilities (it only supports findall).

For example in a catalog of books:

catalog = xml.etree.ElementTree.parse('books.xml')

# This succeeds
for book in catalog.findall('book'):
print(book.tag)

# This fails:
for book in catalog:
print(book.tag)

# But for inner elements, we have more options
book = catalog.find('bk101')
for subelement in book:
print(subelement.tag)

Here are the differences between the API for ElementTree and Element

In [9]: set(dir(book)) - set(dir(catalog))
Out[9]: 
{'__delitem__',
 '__getitem__',
 '__len__',
 '__nonzero__',
 '__setitem__',
 '_children',
 'append',
 'attrib',
 'clear',
 'copy',
 'extend',
 'get',
 'getchildren',
 'insert',
 'items',
 'itertext',
 'keys',
 'makeelement',
 'remove',
 'set',
 'tag',
 'tail',
 'text'}

In [10]: set(dir(catalog)) - set(dir(book))
Out[10]: {'_root', '_setroot', 'getroot', 'parse', 'write', 'write_c14n'}

Note, the XML data model requires that the outermost element have some 
capabilities that inner elements don't have (such as comments and processing 
instructions).  That said, the outer element shouldn't have fewer capabilities 
that the inner elements.

--
components: Library (Lib)
messages: 214521
nosy: rhettinger
priority: normal
severity: normal
status: open
title: ElementTree objects should support all the same methods are Element 
objects
type: enhancement
versions: Python 3.5

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



[issue21029] IDLE mis-coloring print

2014-03-22 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Sometimes, IDLE displays print in orange, identifying it as a keyword and 
sometimes print is displayed in purple identifying it as a built-in 
function.

 print 'hello'  # This print is orange
hello

 for i in range(1):
print ('hello')# This print is purple

hello

--
components: IDLE
messages: 214522
nosy: rhettinger
priority: normal
severity: normal
status: open
title: IDLE mis-coloring print
type: behavior
versions: Python 2.7

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



[issue7132] Regexp: capturing groups in repetitions

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

Can this be closed as has happened with numerous other issues as a result of 
work done on the new regex module via #2636?

--
nosy: +BreamoreBoy

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



[issue706392] faster _socket.connect variant desired

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

As the advice given in msg59254 about discussing the patch hasn't been followed 
perhaps this should be closed?

--
nosy: +BreamoreBoy

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




[issue3892] bsddb: test01_basic_replication fails sometimes

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

Is any follow up needed to this or can it be closed as bsddb has been removed 
from Python 3?

--
nosy: +BreamoreBoy
versions:  -Python 2.6

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



[issue21030] pip usable only by administrators on Windows

2014-03-22 Thread Christian Ullrich

New submission from Christian Ullrich:

After installing python-3.4.0.amd64.msi on Windows 8.1 x64, the pip command 
(and the versioned ones as well) only work for administrators. Regular users 
get this:

Traceback (most recent call last):
  File C:\Program Files\Python34\lib\runpy.py, line 171, in 
_run_module_as_main
__main__, mod_spec)
  File C:\Program Files\Python34\lib\runpy.py, line 86, in _run_code
exec(code, run_globals)
  File C:\Program Files\Python34\Scripts\pip.exe\__main__.py, line 5, in 
module
ImportError: cannot import name 'main'

The immediate reason is that the files in the site-packages/pip directory are 
created with no access permissions for non-administrators:

C:\Program Files\Python34\Lib\site-packages\pipicacls __main__.py
__main__.py NT-AUTHORITY\SYSTEM:(F)
BUILTIN\Administrators:(F)
abc\Admin:(F)

Why that is, I have no idea. It can be fixed by running:

icacls path\to\site-packages\pip /inheritance:e /t
icacls path\to\site-packages\pip /reset /t

The /reset may be unnecessary.

--
components: Installation, Windows
messages: 214527
nosy: Christian.Ullrich
priority: normal
severity: normal
status: open
title: pip usable only by administrators on Windows
type: behavior
versions: Python 3.4

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



[issue1225584] crash in gcmodule.c on python reinitialization

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

I find it surprising that something flagged up as causing a crash hasn't had a 
little more TLC, but is this still a genuine problem?

--
components: +Windows
nosy: +BreamoreBoy, terry.reedy

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



[issue4261] The pwd module doesn't distinguish between errors and no user

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

I'm assuming that 2.7 and 3.5 would need patches.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 2.6, Python 3.1, Python 3.2

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



[issue3892] bsddb: test01_basic_replication fails sometimes

2014-03-22 Thread R. David Murray

R. David Murray added the comment:

Yeah, let's just close it.  Nobody is likely to care enough to try to fix it 
properly.

--
resolution:  - out of date
stage: needs patch - committed/rejected
status: languishing - closed

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



[issue1542308] Nested finally in generators don't follow PEP 342

2014-03-22 Thread Mark Lawrence

Mark Lawrence added the comment:

Just in case PEP 342 ever changes we might as well target the latest versions.

As an aside I followed the PEP 342 link to here 
http://legacy.python.org/dev/peps/pep-0342/ and clicked on the last modified 
field.  I was taken here http://hg.python.org/peps/file/tip/pep-0342.txt.  I 
was rather surprised to see this

view pep-0342.txt @ 5421:6ed8f836c072

PEP 466: finish incomplete sentence
author  Nick Coghlan ncogh...@gmail.com
dateSun, 23 Mar 2014 07:17:32 +1000 (3 hours ago)
parents c25fa0913267

Could somebody take a look at this please.

--
nosy: +BreamoreBoy

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



  1   2   >