[issue17777] Unrecognized string literal escape sequences give SyntaxErrors

2013-09-24 Thread Tim Golden

Tim Golden added the comment:

Closing as "Works for me" in the absence of any clear proposal for docs 
improvement.

--
resolution:  -> works for me
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue19079] chameleon benchmark fails on 3.4

2013-09-24 Thread Brett Cannon

Brett Cannon added the comment:

Decorator sounds reasonable.

--

___
Python tracker 

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



[issue19079] chameleon benchmark fails on 3.4

2013-09-24 Thread Brett Cannon

Brett Cannon added the comment:

Actually, one perk of the ranges is 2n3 can be auto-calculated.

--

___
Python tracker 

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



[issue16038] ftplib: unlimited readline() from connection

2013-09-24 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

I believe the problem is the set of next_retr_data attribute here:

def test_retrlines_too_long(self):
self.server.handler.next_retr_data = 'x' * self.client.maxline * 2

...because self.server.handler runs in a different thread (different than the 
main one, which is where the setattr() occurs).
We should introduce a new command in the dummy FTP server which sets 
next_retr_data from within the server thread itself. Will try to work on a 
patch later this week (I'm sorry but I can't make it earlier).

--

___
Python tracker 

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



[issue16038] ftplib: unlimited readline() from connection

2013-09-24 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 24, 2013, at 01:12 PM, Giampaolo Rodola' wrote:

>Giampaolo Rodola' added the comment:
>
>I believe the problem is the set of next_retr_data attribute here:
>
>def test_retrlines_too_long(self):
>self.server.handler.next_retr_data = 'x' * self.client.maxline * 2
>
>...because self.server.handler runs in a different thread (different than the
>main one, which is where the setattr() occurs).  We should introduce a new
>command in the dummy FTP server which sets next_retr_data from within the
>server thread itself. Will try to work on a patch later this week (I'm sorry
>but I can't make it earlier).

+1 - that explanation makes a lot of sense, thanks!

Currently 2.6.9rc1 is planned for Monday 30-September.  It would be nice to
get this one in before then, but if not that's okay.  I think it's fairly low
risk.

--

___
Python tracker 

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



[issue18764] The pdb print command prints repr instead of str in python3

2013-09-24 Thread R. David Murray

R. David Murray added the comment:

Looks good to me.

This seems like a mistake in the python3 port to me.  I'm in favor of fixing it 
as a bug.  As release manager and pdb expert, what do you think, Georg?

--

___
Python tracker 

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



[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2013-09-24 Thread Vajrasky Kok

New submission from Vajrasky Kok:

Lib/xmlrpc/client.py tries to connect to http://time.xmlrpc.com/RPC2 which has 
been dead for a "while". I see there is no light in the end of tunnel. Since 
this code is meant to be a demo not a general purpose tool, I say why don't we 
direct it to localhost (which can be provided by Lib/xmlrpc/server.py).

After applying this patch, you can start the server:
$ python Lib/xmlrpc/server.py
Serving XML-RPC on localhost port 8000

Then in another place, you can start the client and get result straight away:
$ python Lib/xmlrpc/client.py
2013-09-24T22:35:27
2013-09-24T22:35:27
512
3

Isn't that beautiful?

--
components: Library (Lib)
files: xmlrpc_server_client_demo.patch
keywords: patch
messages: 198359
nosy: vajrasky
priority: normal
severity: normal
status: open
title: Lib/xmlrpc/client.py demo code points to the dead server
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file31856/xmlrpc_server_client_demo.patch

___
Python tracker 

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



[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2013-09-24 Thread Vajrasky Kok

Changes by Vajrasky Kok :


Removed file: http://bugs.python.org/file31856/xmlrpc_server_client_demo.patch

___
Python tracker 

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



[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2013-09-24 Thread Vajrasky Kok

Changes by Vajrasky Kok :


Added file: http://bugs.python.org/file31857/xmlrpc_server_client_demo.patch

___
Python tracker 

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



[issue19083] IDNA prefix should be case insensitive

2013-09-24 Thread Pepijn de Vos

New submission from Pepijn de Vos:

RFC 3490 states that "The ACE prefix for IDNA is "xn--" or any capitalization 
thereof."

But the following does not work

>>> str(b"XN--pythn-mua.org.", "idna")

--
components: Library (Lib)
files: upper-idna.patch
keywords: patch
messages: 198360
nosy: Pepijn.de.Vos
priority: normal
severity: normal
status: open
title: IDNA prefix should be case insensitive
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file31858/upper-idna.patch

___
Python tracker 

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



[issue19082] Lib/xmlrpc/client.py demo code points to the dead server

2013-09-24 Thread R. David Murray

R. David Murray added the comment:

Sure :)

If you want some bonus points, can you figure out whether or not the test in 
test_xmlrpc_net is worth moving to test_xmlrpc using a similar local-server 
approach, or if it is redundant and should just be deleted?

(time.xmlrcp.com has come and gone multiple times over the years...)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-24 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Here's a fix (the test is now in the patch).

--
keywords: +needs review
stage:  -> patch review
Added file: http://bugs.python.org/file31860/issue19081-gps01.diff

___
Python tracker 

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



[issue19084] No way to use TLS-PSK from python ssl

2013-09-24 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue19084] No way to use TLS-PSK from python ssl

2013-09-24 Thread Karl Palsson

New submission from Karl Palsson:

OpenSSL supports TLS-PSK which some people (myself obviously) find to be 
substantially easier to use than setting up certs.

However, there's no way to use PSK via the current SSL api in python.  It would 
be very nice to be able to use PSK from python.

For OpenSSL, even the C API is particularly easy.  Attached is the 
implementation used in Mosquitto, a MQTT message broker that supports both cert 
based and PSK based TLS.

--
components: Library (Lib)
files: 5bcfpEKD.txt
messages: 198362
nosy: karlp
priority: normal
severity: normal
status: open
title: No way to use TLS-PSK from python ssl
type: behavior
versions: Python 2.7, Python 3.4
Added file: http://bugs.python.org/file31859/5bcfpEKD.txt

___
Python tracker 

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



[issue19084] No way to use TLS-PSK from python ssl

2013-09-24 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

Python 2.7 is open only for bugfixes. No new features.

Do you dare to write a patch for Python 3.4? :-). If you do, remember to sign a 
Contributor Agreement.

Give it a try! :)

--
nosy: +jcea
versions:  -Python 2.7

___
Python tracker 

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



[issue19084] No way to use TLS-PSK from python ssl

2013-09-24 Thread Roger Light

Changes by Roger Light :


--
nosy: +ralight

___
Python tracker 

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



[issue19081] zipimport behaves badly when the zip file changes while the process is running

2013-09-24 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
nosy: +stutzbach

___
Python tracker 

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



[issue19084] No way to use TLS-PSK from python ssl

2013-09-24 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is it different from TLS SRP, which already has a feature request in issue11943?
As Jesus said, feel free to propose a patch, even a proof of concept so that we 
start discussing the API.

--
nosy: +christian.heimes, giampaolo.rodola, janssen, pitrou
stage:  -> needs patch
type: behavior -> enhancement

___
Python tracker 

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



[issue19085] Add tkinter basic options tests

2013-09-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch adds tests for all options of all widgets. They test that 
widgets support all documented options, accepts valid values in different 
formats, reject invalid values, and return values in expected format. This 
would be helpful for regression testing.

The patch tested with Tcl/Tk 8.5 and 8.6 on Linux. All new tests are compatible 
with wantobjects=1 and wantobjects=0.

It will be good to test it with Tcl/Tk 8.4 (or even 8.3) and on Windows.

--
components: Tests, Tkinter
files: tkinter_options_tests.patch
keywords: patch
messages: 198366
nosy: gpolo, serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: patch review
status: open
title: Add tkinter basic options tests
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31861/tkinter_options_tests.patch

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Most existing implementation produce just index. That is why weighted_choice() 
accepts singular weights list and returns index. On the other hand, I think 
working with mapping will be wished feature too (especially because Counter is 
in stdlib). Indexable sequences and mappings are similar. In both cases 
weighted_choice() returns value which can be used as index/key of input 
argument.

If you need choice an element from some sequence, just use 
seq[weighted_choice(weights)]. Actually weighted_choice() has no common code 
with choice() and has too different use cases. They should be dissimilar as far 
as possible. Perhaps we even should avoid the "choice" part in function names 
(are there any ideas?) to accent this.

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-09-24 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

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



[issue19077] More robust TemporaryDirectory cleanup

2013-09-24 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2013-09-24 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue19050] crash while writing to a closed file descriptor

2013-09-24 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2013-09-24 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_ioencoding_nonascii (test_sys) fails on Snow Leopard -> 
test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

___
Python tracker 

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



[issue16038] ftplib: unlimited readline() from connection

2013-09-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

--
Added file: http://bugs.python.org/file31862/ftplib_maxline.patch

___
Python tracker 

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



[issue19046] SystemError: ..\Objects\weakrefobject.c:903: bad argument to internal function

2013-09-24 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2013-09-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Shouldn't FS_NONASCII be None with ASCII locale encoding?

--

___
Python tracker 

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



[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2013-09-24 Thread STINNER Victor

STINNER Victor added the comment:

Shouldn't FS_NONASCII be None with ASCII locale encoding?

See the description of the variable in test.support:

# FS_NONASCII: non-ASCII character encodable by os.fsencode(),
# or None if there is no such character.

The file system encoding an the locale encoding can be different... especially 
when PYTHONIOENCODING is used.

The test should not use FS_NONASCII.

--

___
Python tracker 

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



[issue16038] ftplib: unlimited readline() from connection

2013-09-24 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Sep 24, 2013, at 09:59 PM, Serhiy Storchaka wrote:

>Added file: http://bugs.python.org/file31862/ftplib_maxline.patch

This looks great and fixes the test failure problem.  Thanks!  Serhiy, please
feel free to apply this to the 2.6 branch, or let me know if you'd rather I
apply it.

--

___
Python tracker 

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



[issue18844] allow weights in random.choice

2013-09-24 Thread Madison May

Madison May added the comment:

You have me convinced, Serhiy.  I see the value in making the two functions 
distinct.

For naming purposes, perhaps weighted_index() would be more descriptive.

--

___
Python tracker 

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



[issue19085] Add tkinter basic options tests

2013-09-24 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

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



[issue19071] Documentation on what self is for module-level functions is misleading/wrong.

2013-09-24 Thread A. Jesse Jiryu Davis

Changes by A. Jesse Jiryu Davis :


--
nosy: +emptysquare

___
Python tracker 

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



[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2013-09-24 Thread R. David Murray

R. David Murray added the comment:

Also note that on OS X I believe the fsencoding is always utf-8, but the locale 
can of course be something else.

--

___
Python tracker 

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



[issue19011] Enum should have a __getattr__ that makes all the instances available from an instance

2013-09-24 Thread Ethan Furman

Ethan Furman added the comment:

As discussed on PyDev[1], Enum members are bonafide class attributes, as in 
they show on the class, not on the instances.

Documentation patch attached.

[1] https://mail.python.org/pipermail/python-dev/2013-September/128874.html

--
stage:  -> patch review
type:  -> behavior
Added file: http://bugs.python.org/file31863/issue19011.stoneleaf.01.patch

___
Python tracker 

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



[issue19040] Problems with overriding Enum.__new__

2013-09-24 Thread Ethan Furman

Ethan Furman added the comment:

Doc patch is in #19011.  I'll close this one when that one is closed.

--

___
Python tracker 

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



[issue18596] enable usage of AddressSanitizer in CPython [PATCH]

2013-09-24 Thread Nick Coghlan

Changes by Nick Coghlan :


--
nosy: +ncoghlan

___
Python tracker 

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