[issue20090] slight ambiguity in README.txt instructions for building docs

2013-12-28 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +georg.brandl

___
Python tracker 

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



[issue20085] Python2.7, wxPython and IDLE 2.7

2013-12-28 Thread stubz

stubz added the comment:

Cheerz mate,

In as much as your reply was no help, it's kinda what I figured ...
I'm a newbie to linux & python, but I know enough to cause myself serious 
grief, and well, usually do ...
I'll get it sorted at some point ...
Hell of a lot easy to work thru then windows tho :)
Ciao,
Stubz

--
resolution: invalid -> works for me
status: closed -> languishing

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

It is not clear to me that that would be correct, though.  Isn't the whole 
point of __index__ that some types can act as indicies even though they are 
*not* integers?  Shouldn't it be up to the type to decide if converting them to 
int is a sensible thing to do?  Maybe that's being silly/pendantic, though.  On 
the gripping hand, it feels like this is another case of what you have pointed 
out elsewhere, that it is not clear that we actually have a consistent API 
here...

--
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



[issue20083] smtplib: support for IDN (international domain names)

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

A call to formataddr will need to be added to quoteaddr.  And yes, test cases 
are needed.

I don't believe that the format of the HELO/EHLO message is defined by the RFC, 
so I don't think we can automatically parse it.  I think we just have to leave 
the domain name encoded as punycode there.  Regardless, though, yes I would 
consider that a separate issue.

If you want to work on a patch, that would be great.  For guidance on doing so, 
you can take a look at http://docs.python.org/devguide.

You can also help me to remember to commit 11783 after the final release of 
3.4.0.

--

___
Python tracker 

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



[issue20084] smtplib: support for UTF-8 encoded headers (SMTPUTF8)

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

There is another possible approach, but I haven't decided yet whether or not I 
like it.  The email package string parser could (and may for other reasons) 
become smart enough to convert unicode into the charset declared in the MIME 
part when it is parsing the string version of a message.  In that case, smtplib 
could use the string parser to parse the DATA payload, and if it parses 
successfully it can then use the same code path as I'm proposing for 
send_message to generate the right output depending on whether or not the 
smtputf8 capability is present.  That would place a new constraint on what was 
acceptable as a DATA payload, though, so I'm not at all sure it is a good idea.

--

___
Python tracker 

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



[issue20084] smtplib: support for UTF-8 encoded headers (SMTPUTF8)

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

Hmm.  Perhaps it would be better to close that one as a duplicate of this one, 
since this one doesn't start out as an error report that then got converted 
into an enhancement request...

The patch on that issue doesn't have anything to do with what the issue turned 
into, which is indeed a bit confusing.

I haven't given much thought to *how* to implement this support.  Depending on 
utf8smtp capability being present seems the best course.  If support isn't 
available, then the library should continue to raise an error, as it does now, 
but indeed the message could be improved.

In real life, of course, we want our message to get delivered regardless of 
whether or not smtputf8 is available.  To make that work, it will be advisable 
for the application to use the send_message interface rather than the sendmail 
interface: pass in a Message object, which can be automatically serialized as 
utf8 if smtputf8 is available, and the normal CTE encoding dances if not.  This 
of course will require support from the email package, specifically a 'utf8 
only' serialization mode.

If one is using smtplib only, then the application is responsible both for 
checking for the smtputf8 capability and branching accordingly, and for getting 
all the data correct...when I said "string only" I was referring to the methods 
in question (RCPT, etc).  DATA is a different story, and that has to handle 
both ascii-only strings or properly encoded (per the email RFCs) binary.  
Automatic encoding of non-ascii string DATA is dangerous, and would only work 
if the input is correctly formatted for the utf8 charset throughout.  
Personally I'd rather use the email package to ensure that...so if an 
application wants to bypass the email package, I think requiring it to manually 
encode the DATA string into utf8 is an acceptable interface requirement, to 
make it *clear* that there is no way to automatically encode an arbitrary email 
message (other than by using the email package).

These are just preliminary thoughts...there is probably more design work to be 
done before this can be implemented.

--

___
Python tracker 

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



[issue12692] test_urllib2net is triggering a ResourceWarning

2013-12-28 Thread Senthil Kumaran

Senthil Kumaran added the comment:

@Martin. Agree that this should have been backported. I have done that.
Thank you!

--

___
Python tracker 

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



[issue12692] test_urllib2net is triggering a ResourceWarning

2013-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a43e96695203 by Senthil Kumaran in branch '3.3':
Backporing the fix from Issue #12692
http://hg.python.org/cpython/rev/a43e96695203

New changeset 031417ee8351 by Senthil Kumaran in branch 'default':
#12692: null merge with 3.3
http://hg.python.org/cpython/rev/031417ee8351

--

___
Python tracker 

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



[issue16074] Bad error message in os.rename, os.link, and os.symlink

2013-12-28 Thread Jason Gerard DeRose

Jason Gerard DeRose added the comment:

vajrasky, one more errno to consider:

[Errno 39] Directory not empty: '/tmp/bar'

This is when renaming a directory: src directory exists; dst directory exists 
and is non-empty.

In 3.4 Beta1, this error message now includes the src instead of the dst 
(flipped behaviour from Python 3.3). I'm not sure whether this changed because 
of changes being tracked in this bug on not, so I filed a separate issue: 
http://bugs.python.org/issue20093

--
nosy: +jderose

___
Python tracker 

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



[issue20093] Wrong OSError message from os.rename() when dst is a non-empty directory

2013-12-28 Thread Jason Gerard DeRose

New submission from Jason Gerard DeRose:

Under Python 3.3, if renaming a directory with `os.rename()` when the 
destination is an existing, non-empty directory, like this:

os.rename('/tmp/foo', '/tmp/bar')

You'll get an OSError with a message like this:

OSError: [Errno 39] Directory not empty: '/tmp/bar'

However, in the current Python 3.4.0b1 package in Ubuntu Trusty, this error 
message will contain the source directory name instead of the destination 
directory name, like this:

OSError: [Errno 39] Directory not empty: '/tmp/foo'

I've attached a test case, which also covers renaming directories relative to 
an open directory descriptor. This test case works on Python 3.3, fails on 
Python 3.4 Beta1.

--
components: Library (Lib)
files: test_os_rename.py
messages: 207058
nosy: jderose
priority: normal
severity: normal
status: open
title: Wrong OSError message from os.rename() when dst is a non-empty directory
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file33285/test_os_rename.py

___
Python tracker 

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



[issue11798] Test cases not garbage collected after run

2013-12-28 Thread Michael Foord

Michael Foord added the comment:

What's the purpose of _removed_tests in your fix, it doesn't appear to be used?

--

___
Python tracker 

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



[issue19524] ResourceWarning when urlopen() forgets the HTTPConnection object

2013-12-28 Thread Martin Panter

Martin Panter added the comment:

Just discovered the same fix of manually closing the socket object was already 
made independently of my patch in the “default” branch! See Issue 12692.

http://hg.python.org/cpython/rev/92656b5df2f2

The main difference is my patch should also close the connection if 
HTTPConnection.getresponse() fails, which could be of some value. And the 
regression test could still be useful.

--

___
Python tracker 

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



[issue12692] test_urllib2net is triggering a ResourceWarning

2013-12-28 Thread Martin Panter

Martin Panter added the comment:

Any chance of backporting this to version 3.3? I think it is a real-world issue 
beyond the test suite. See Issue 19524.

--
nosy: +vadmium

___
Python tracker 

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



[issue20085] Python2.7, wxPython and IDLE 2.7

2013-12-28 Thread Ned Deily

Ned Deily added the comment:

It is hard to know exactly what is going on without more information and this 
bug tracker is not set up to answer usage questions. There are better places 
for help, for example, the Python tutor mailing list 
(https://mail.python.org/mailman/listinfo/tutor) or stackoverflow.com or 
possibly a wxPython list.  If it turns out that there is likely a problem with 
Python itself, please re-open the issue with appropriate supporting 
documentation.  Good luck!

--
nosy: +ned.deily
resolution:  -> invalid
stage:  -> 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



[issue20079] Add support for glibc supported locales

2013-12-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue20088] locale.getlocale() fails if locale name doesn't include encoding

2013-12-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue20087] Mismatch between glibc and X11 locale.alias

2013-12-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue20083] smtplib: support for IDN (international domain names)

2013-12-28 Thread Freek Dijkstra

Freek Dijkstra added the comment:

Since smtplib.quoteaddr() uses email.utils.parseaddr(), and the patch for issue 
11783 fixes email.utils.parseaddr(), that patch will hopefully solve this issue 
as well (though a test case wouldn't hurt for sure).

What I had not realised is that hostnames are also used elsewhere, in 
particular in the ehlo() and helo() but also in connect(). Do you consider that 
a separate issue or part of this issue?

Are there other places where you think a fix is needed?

I may be able to create a patch, though bear with me: I never checked out the 
source for Python or the standard library (other than installing point releases 
through my package manager).

--

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2013-12-28 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue20084] smtplib: support for UTF-8 encoded headers (SMTPUTF8)

2013-12-28 Thread Freek Dijkstra

Freek Dijkstra added the comment:

Are you sure that issue 8489 is a duplicate? While both concern RFC 6531, the 
patch for 8489 only seems to add test to check how smtplib.SMTP.login() handles 
a username with non-ASCII characters. This issue concerns the 
smtplib.SMTP.rcpt() (and indirectly smtplib.SMTP.send()).

>From your comment in issue 20083 you seem to prefer that all input is in 
>strings, not bytes. I think that is sensible, but it means that smtplib is 
>responsible for doing the encoding, including the UTF-8 encoding instead of 
>ASCII encoding for mails that support the SMTPUTF8 extension.

Would the following be reasonable?

* The smtplib.SMTP class gets a new attribute, header_encoding
* The header_encoding attribute is 'ascii' by default.
* header_encoding is used by the send() method, and perhaps also by the login() 
method, but not by the data() method (for that, a body_encoding sounds more 
reasonable).
* A user may set header_encoding explicitly

Open questions are:

* Should the library automatically set header_encoding to UTF-8? If so, when? 
If the connected server announces the SMTPUTF8 extension?
* What should happen if the users submits non-ASCII data in any of the headers, 
but the server has not announced the SMTPUTF8 extension? Currently, this raises 
a UnicodeEncodeError exception, but I think it should be more explicit that it 
is a combination of Unicode input combined with lack of support from the MTA.

--

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2013-12-28 Thread Ethan Furman

Ethan Furman added the comment:

True.  I meant similar in that Python will use what's available to fill in the 
blank:

  class has __eq__ but user tried != ?  use __eq__ and invert result

  class has __index__ but user tried int() ?  use __index__ as-is

--

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2013-12-28 Thread Benjamin Peterson

Benjamin Peterson added the comment:

__ne__ is not "bound" to __eq__. The comparison code simply falls back onto 
__eq__ if __ne__ is not defined.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2013-12-28 Thread Ethan Furman

Ethan Furman added the comment:

Enhancement portion split off into issue20092.

Attached patch includes doc change, tests, and code changes.

If I'm overstepping my bounds, I'm sure somebody will slap me with a fish. ;)

--
keywords: +patch
stage: test needed -> patch review
title: hex() and %x, oct() and %o do not behave the same -> %c, %o, %x, %X 
accept non-integer values instead of raising an exception
type: enhancement -> behavior
versions: +Python 3.4 -Python 3.5
Added file: http://bugs.python.org/file33284/issue19995.stoneleaf.01.patch

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2013-12-28 Thread Ethan Furman

New submission from Ethan Furman:

In order to create a coherent integer type class both __int__ and __index__ 
must be defined or the resulting instances will behave inconsistently in 
different places.

For example, if __index__ is not defined then the class cannot be used in 
slices, and if __int__ is not defined then int(integer_type) will fail.

At this point the programmer must remember to define both, but since they 
should return the same value we can have the type constructor automatically 
assign __int__ to __index__ when the latter is defined and the former is not.  
This would be similar to how we currently treat __ne__ when __eq__ is defined.

--
messages: 207048
nosy: ethan.furman
priority: low
severity: normal
status: open
title: type() constructor should bind __int__ to __index__ when __index__ is 
defined and __int__ is not
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue16778] Logger.findCaller needs to be smarter

2013-12-28 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue11798] Test cases not garbage collected after run

2013-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b668c409c10a by Antoine Pitrou in branch 'default':
Fix breakage in TestSuite.countTestCases() introduced by issue #11798.
http://hg.python.org/cpython/rev/b668c409c10a

--

___
Python tracker 

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



[issue11798] Test cases not garbage collected after run

2013-12-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

No answer to Xavier's regression? The way this issue is being treated is a bit 
worrying.

--

___
Python tracker 

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



[issue20083] smtplib: support for IDN (international domain names)

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

No, that issue is about the email library.  So we need this one too for the 
equivalent enhancement to smtplib.

--
resolution: duplicate -> 

___
Python tracker 

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



[issue20083] smtplib: support for IDN (international domain names)

2013-12-28 Thread Freek Dijkstra

Freek Dijkstra added the comment:

Great to hear that a patch already exists (sorry I couldn't find in in the 
tracker).

Feel free to close this issue as duplicate of issue 11783.

(As for the u"string", I wanted to distinguish it from b'string'. I don't use 
it in code (since the backward compatibility is only present in 3.3+, not in 
3.2). Sorry for the confusion.)

--
resolution:  -> duplicate

___
Python tracker 

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



[issue19918] PureWindowsPath.relative_to() is not case insensitive

2013-12-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks! I've tweaked the patch a bit and committed it.

--
resolution:  -> fixed
stage: patch review -> 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



[issue19918] PureWindowsPath.relative_to() is not case insensitive

2013-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 763f4416c4fd by Antoine Pitrou in branch 'default':
Issue #19918: Fix PurePath.relative_to() under Windows.
http://hg.python.org/cpython/rev/763f4416c4fd

--
nosy: +python-dev

___
Python tracker 

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



[issue20083] smtplib: support for IDN (international domain names)

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

Thanks for the suggestion.

Once the issue 11783 patch is committed, smtplib can be changed to use 
formataddr in quoteaddr, which will result in the domain being punycoded 
automatically.  (It's too bad I forgot about that issue, since the 3.4 beta 
deadline has already passed :(

The input to the commands is string, not bytes, so you can already pre-encode 
yourself, as you noted.  The commands don't accept bytes, and should not, since 
the data they cause to be sent on the wire may not contain non-ASCII 
characters; there is thus no need to generate binary.  SMTPUTF8 will of course 
require generating binary data in these contexts, but in that case the correct 
way to generate the binary is by utf-8 encoding the unicode input, so there 
will again be no reason for the commands to accept binary input, and it will be 
better if they don't.  (If you need to generate invalid data, say for a test 
scenario, you can drop down to executing 'send' calls manually.)

(Note: using the 'u' prefix in python3, while supported for backward 
compatibility, is only confusing when used outside of that context...I thought 
you were talking about 2.7 until I read carefully.)

--
components: +email
dependencies: +email parseaddr and formataddr should be IDNA aware
nosy: +barry, r.david.murray
versions: +Python 3.5

___
Python tracker 

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



[issue20084] smtplib: support for UTF-8 encoded headers (SMTPUTF8)

2013-12-28 Thread R. David Murray

Changes by R. David Murray :


--
status: open -> closed

___
Python tracker 

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



[issue20084] smtplib: support for UTF-8 encoded headers (SMTPUTF8)

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

Duplicate of issue 8489.

--
components: +email
nosy: +barry, r.david.murray
resolution:  -> duplicate
stage:  -> committed/rejected
superseder:  -> Support RFC 6531 in smptlib
versions: +Python 3.5

___
Python tracker 

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



[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-12-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Updated patch is stricter (it checks for SOCK_STREAM). Pushed!

--
resolution:  -> fixed
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



[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 44841d81bf14 by Antoine Pitrou in branch '2.7':
Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl module, 
rather than silently let them emit clear text data.
http://hg.python.org/cpython/rev/44841d81bf14

--

___
Python tracker 

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



[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a00842b783cf by Antoine Pitrou in branch '3.3':
Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl module, 
rather than silently let them emit clear text data.
http://hg.python.org/cpython/rev/a00842b783cf

New changeset f7dc02e6987a by Antoine Pitrou in branch 'default':
Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl module, 
rather than silently let them emit clear text data.
http://hg.python.org/cpython/rev/f7dc02e6987a

--
nosy: +python-dev

___
Python tracker 

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



[issue19422] Neither DTLS nor error for SSLSocket.sendto() of UDP socket

2013-12-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Actually, it seems the patch is flawed:

>>> sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
>>> sock.type
2
>>> sock.settimeout(0)
>>> sock.type
2050

But getsockopt() returns the expected value:

>>> sock.getsockopt(socket.SOL_SOCKET, socket.SO_TYPE)
2

--

___
Python tracker 

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



[issue19648] Empty tests in pickletester need to be implemented or removed

2013-12-28 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've pushed the patch. Thank you for your contribution!

--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed
versions:  -Python 3.3

___
Python tracker 

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



[issue19648] Empty tests in pickletester need to be implemented or removed

2013-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fef075ddaec9 by Antoine Pitrou in branch 'default':
Issue #19648: implement empty tests in pickletester.  Patch by Gennadiy Zlobin.
http://hg.python.org/cpython/rev/fef075ddaec9

--
nosy: +python-dev

___
Python tracker 

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



[issue19143] Finding the Windows version getting messier

2013-12-28 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue20089] email.message_from_string no longer working in Python 3.4

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

Nevermind, I failed to notice the message_from_string part of the traceback.

Different question: what are you doing with the message after you parse it?  It 
is not an RFC valid message if you parse it from a string, so the only way to 
make it produce an RFC valid output is if you emit it as a string *and* encode 
the output to utf-8.

I'll have to think about how this "should" work...a clearer error message may 
be the answer, but if so I suppose I'll need an actual deprecation period 
before shipping the charset fix for set_payload.

--

___
Python tracker 

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



[issue20091] An index entry for __main__ in "30.5 runpy" is missing

2013-12-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: An index entery for __main__ in "30.5 runpy" is missing -> An index 
entry for __main__ in "30.5 runpy" is missing

___
Python tracker 

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



[issue20089] email.message_from_string no longer working in Python 3.4

2013-12-28 Thread Florian Apolloner

Florian Apolloner added the comment:

Yes, it works on python3.3 (from debian); I am parsing directly via 
email.message_from_string:
Python 3.3.3 (default, Dec  8 2013, 14:51:59) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import email
>>> msg="""Content-Type: text/plain; charset="utf-8"
... MIME-Version: 1.0
... Content-Transfer-Encoding: 8bit
... Subject: =?utf-8?q?Ch=C3=A8re_maman?=
... From: f...@example.com
... To: t...@example.com
... Date: Sat, 28 Dec 2013 13:08:07 -
... Message-ID: <20131228130807.3669.79195@localhost>
... 
... Je t'aime très fort"""
>>> email.message_from_string(msg)


--

___
Python tracker 

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



[issue20089] email.message_from_string no longer working in Python 3.4

2013-12-28 Thread R. David Murray

R. David Murray added the comment:

Hmm.  There's definitely a backward compatibility issue here of some sort, but 
how are you parsing this email?  And does it work or fail in some other way on 
3.3 tip?

--

___
Python tracker 

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



[issue20091] An index entery for __main__ in "30.5 runpy" is missing

2013-12-28 Thread Mitchell Model

New submission from Mitchell Model:

An index entry should be added for __main__ as it appears in the documentation 
of runpy (30.5 in 3.3, 31.5 in 3.4).

--
assignee: docs@python
components: Documentation
messages: 207030
nosy: MLModel, docs@python
priority: normal
severity: normal
status: open
title: An index entery for __main__ in "30.5 runpy" is missing
versions: Python 3.3, Python 3.4

___
Python tracker 

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



[issue20090] slight ambiguity in README.txt instructions for building docs

2013-12-28 Thread Mitchell Model

New submission from Mitchell Model:

I tried to build the docs for v3.4.0b1 following the instructions in the 
Doc/README.txt. My default python is v3.3. I got the following error message:
"Error: Sphinx needs to be executed with Python 2.4 or newer (not 3.0 though)."
I wondered what was weird about 3.0 as opposed to later versions that it 
wouldn't work. Fortunately I had run into other situations where tools expected 
Python 2 but wouldn't work with Python 3, so after a few minutes of head 
scratching I tried using Python 2, whi

Sphinx needs to be executed with Python 2 (v. 2.4 or newer), not Python 3

 so that it makes clear that it requires Python 2 not Python 3 and puts the 
grammatical emphasis where it belongs.

More importantly, perhaps, the Doc README should be changed to state that make 
must use Python 2.

--
assignee: docs@python
components: Build, Documentation
messages: 207029
nosy: MLModel, docs@python
priority: normal
severity: normal
status: open
title: slight ambiguity in README.txt instructions for building docs
versions: Python 3.4

___
Python tracker 

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



[issue20089] email.message_from_string no longer working in Python 3.4

2013-12-28 Thread Florian Apolloner

Changes by Florian Apolloner :


--
components: +email
nosy: +barry, r.david.murray
versions: +Python 3.4

___
Python tracker 

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



[issue20089] email.message_from_string no longer working in Python 3.4

2013-12-28 Thread Florian Apolloner

New submission from Florian Apolloner:

Given this email:
---
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: =?utf-8?q?Ch=C3=A8re_maman?=
From: f...@example.com
To: t...@example.com
Date: Sat, 28 Dec 2013 13:08:07 -
Message-ID: <20131228130807.3669.79195@localhost>

Je t'aime très fort
---

I get this traceback:
---
  File "/home/florian/sources/cpython/Lib/email/__init__.py", line 40, in 
message_from_string
return Parser(*args, **kws).parsestr(s)
  File "/home/florian/sources/cpython/Lib/email/parser.py", line 70, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
  File "/home/florian/sources/cpython/Lib/email/parser.py", line 60, in parse
return feedparser.close()
  File "/home/florian/sources/cpython/Lib/email/feedparser.py", line 170, in 
close
self._call_parse()
  File "/home/florian/sources/cpython/Lib/email/feedparser.py", line 163, in 
_call_parse
self._parse()
  File "/home/florian/sources/cpython/Lib/email/feedparser.py", line 449, in 
_parsegen
self._cur.set_payload(EMPTYSTRING.join(lines))
  File "/home/florian/sources/cpython/Lib/email/message.py", line 311, in 
set_payload
" payload") from None
TypeError: charset argument must be specified when non-ASCII characters are 
used in the payload
---

This is new in 3.4 since that's the first version which requires set_payload to 
provide a charset argument, imo message_from_string should figure that out from 
the message.

--
messages: 207028
nosy: apollo13
priority: normal
severity: normal
status: open
title: email.message_from_string no longer working in Python 3.4

___
Python tracker 

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



[issue20086] test_locale fails on PPC64 PowerLinux

2013-12-28 Thread Stefan Krah

Stefan Krah added the comment:

I don't know why this fails exactly. I had a similar failure though that was 
fixed by using the @run_with_locale decorator.

--
nosy: +skrah

___
Python tracker 

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



[issue20061] make pdb through separate terminal more convenient

2013-12-28 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
nosy: +xdegaye

___
Python tracker 

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



[issue20086] test_locale fails on PPC64 PowerLinux

2013-12-28 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue20088] locale.getlocale() fails if locale name doesn't include encoding

2013-12-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

>>> import locale, _locale
>>> _locale.setlocale(locale.LC_CTYPE, 'en_AG')
'en_AG'
>>> _locale.setlocale(locale.LC_CTYPE)
'en_AG'
>>> locale.getlocale(locale.LC_CTYPE)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/locale.py", line 575, in getlocale
return _parse_localename(localename)
  File "/home/serhiy/py/cpython/Lib/locale.py", line 484, in _parse_localename
raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: en_AG

One solution is proposed in issue20079: map all supported in glibc locale names 
without encoding to locale names with encoding. But see issue20087. And default 
encoding can be different on other systems (not based on glibc).

Other solution is not guess an encoding, but use 
locale.nl_langinfo(locale.CODESET) in locale.getlocale(). And left in locale 
alias table only nonstandard mappings (such as english_uk -> en_GB.ISO8859-1 
and sr_yu.iso88595 -> sr_CS.ISO8859-5).

--
components: Library (Lib)
messages: 207026
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: locale.getlocale() fails if locale name doesn't include encoding
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue20087] Mismatch between glibc and X11 locale.alias

2013-12-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The locale module uses locale alias table derived from X11 locale.alias file 
for mapping bare locale names without encodings to locale names with encodings. 
However sometimes glibc default encoding for a locale differs from that used in 
X11 locale.alias.

Here is full differences table:

 GLibc X11 locale.alias

az_azaz_AZ.UTF-8   az_AZ.ISO8859-9E
ca_adca_AD.ISO8859-15  ca_AD.ISO8859-1
ca_frca_FR.ISO8859-15  ca_FR.ISO8859-1
ca_itca_IT.ISO8859-15  ca_IT.ISO8859-1
cy_gbcy_GB.ISO8859-14  cy_GB.ISO8859-1
en_inen_IN.UTF-8   en_IN.ISO8859-1
et_eeet_EE.ISO8859-1   et_EE.ISO8859-15
fi_fifi_FI.ISO8859-1   fi_FI.ISO8859-15
gd_gbgd_GB.ISO8859-15  gd_GB.ISO8859-1
hi_inhi_IN.UTF-8   hi_IN.ISCII-DEV
iu_caiu_CA.UTF-8   iu_CA.NUNACOM-8
iw_iliw_IL.ISO8859-8   he_IL.ISO8859-8
ka_geka_GE.GEORGIAN_PS ka_GE.GEORGIAN-ACADEMY
lo_lalo_LA.UTF-8   lo_LA.MULELAO-1
mi_nzmi_NZ.ISO8859-13  mi_NZ.ISO8859-1
nr_zanr_ZA.UTF-8   nr_ZA.ISO8859-1
nso_za   nso_ZA.UTF-8  nso_ZA.ISO8859-15
ru_ruru_RU.ISO8859-5   ru_RU.UTF-8
rw_rwrw_RW.UTF-8   rw_RW.ISO8859-1
sq_alsq_AL.ISO8859-1   sq_AL.ISO8859-2
ss_zass_ZA.UTF-8   ss_ZA.ISO8859-1
ta_inta_IN.UTF-8   ta_IN.TSCII-0
tg_tjtg_TJ.KOI8_T  tg_TJ.KOI8-C
th_thth_TH.TIS_620 th_TH.ISO8859-11
tn_zatn_ZA.UTF-8   tn_ZA.ISO8859-15
ts_zats_ZA.UTF-8   ts_ZA.ISO8859-1
tt_rutt_RU.UTF-8   tt_RU.TATAR-CYR
ur_pkur_PK.UTF-8   ur_PK.CP1256
uz_uzuz_UZ.ISO8859-1   uz_UZ.UTF-8
uz_uz@cyrillic   uz_UZ.UTF-8@cyrillic  uz_UZ.UTF-8
vi_vnvi_VN.UTF-8   vi_VN.TCVN
zh_cnzh_CN.GB2312  zh_CN.gb2312
zh_twzh_TW.BIG5zh_TW.big5
zh_tw.euctw  zh_TW.EUC_TW  zh_TW.eucTW

For example with the en_IN encoding:

>>> import locale, _locale
>>> _locale.setlocale(locale.LC_CTYPE)
'en_IN'
>>> locale.getlocale()
('en_IN', 'ISO8859-1')
>>> locale.nl_langinfo(locale.CODESET)
'UTF-8'
>>> locale.setlocale(locale.LC_CTYPE, locale.getlocale())
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/locale.py", line 592, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

--
components: Library (Lib)
messages: 207025
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Mismatch between glibc and X11 locale.alias
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue20086] test_locale fails on PPC64 PowerLinux

2013-12-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

See 
http://buildbot.python.org/all/builders/PPC64%20PowerLinux%202.7/builds/396/steps/test/logs/stdio.

==
ERROR: test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous)
--
Traceback (most recent call last):
  File 
"/home/shager/cpython-buildarea/2.7.edelsohn-powerlinux-ppc64/build/Lib/test/test_locale.py",
 line 480, in test_getsetlocale_issue1813
locale.setlocale(locale.LC_CTYPE, loc)
  File 
"/home/shager/cpython-buildarea/2.7.edelsohn-powerlinux-ppc64/build/Lib/locale.py",
 line 579, in setlocale
return _setlocale(category, locale)
Error: unsupported locale setting

--

--
components: Library (Lib), Tests
messages: 207024
nosy: lemburg, loewis, serhiy.storchaka
priority: normal
severity: normal
status: open
title: test_locale fails on PPC64 PowerLinux
type: behavior
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



[issue1521950] shlex.split() does not tokenize like the shell

2013-12-28 Thread Vinay Sajip

Vinay Sajip added the comment:

Let's hope we can get this into 3.5. I updated my patch a while ago to address 
RDM's comments.

--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue15452] Improve the security model for logging listener()

2013-12-28 Thread Vinay Sajip

Changes by Vinay Sajip :


--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue9998] ctypes find_library should search LD_LIBRARY_PATH on linux

2013-12-28 Thread Vinay Sajip

Changes by Vinay Sajip :


--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue16778] Logger.findCaller needs to be smarter

2013-12-28 Thread Vinay Sajip

Vinay Sajip added the comment:

Too late for 3.4 now, bumping to 3.5. Implementation now uses a set and 
'__name__' in f.f_globals to match module names passed in - this seems good 
enough. I plan to commit this as soon as default is updated to 3.5, unless 
there are alternative suggestions.

--
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue16778] Logger.findCaller needs to be smarter

2013-12-28 Thread Vinay Sajip

Changes by Vinay Sajip :


Added file: http://bugs.python.org/file33283/58f0edef2b19.diff

___
Python tracker 

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