[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

FWIW, so far I've tested this change against:

cherrypy 3.6.0
uwsgi 2.0.9 (--http-raw-body)
nginx 1.6.2 (chunked_transfer_encoding on, proxy_buffering off;) + uwsgi 2.0.9 
(--http-raw-body)

The chunked body works as expected. Unfortunately, all implementations seem to 
be ignorant of the trailer part. So it seems that although RFC-compliant (and I 
can definitely see the use case for it), they trailer implementation may not be 
overly practical. I still think that it's worthwhile keeping it, but perhaps 
adding a note that it may not be supported at this point.

Relevant gists: https://gist.github.com/demianbrecht/3fd60994eceeb3da8f13

--

___
Python tracker 

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



[issue9679] unicode DNS names in urllib, urlopen

2015-03-06 Thread John Nagle

John Nagle added the comment:

Three years later, I'm converting to Python 3. Did this get fixed in Python 3?

--

___
Python tracker 

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



[issue19610] setup.py does not allow a tuple for classifiers

2015-03-06 Thread Berker Peksag

Berker Peksag added the comment:

> Does current code work with None or empty tuple?

Yes, it works with both None and ().

--

___
Python tracker 

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



[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-06 Thread Martin Panter

Martin Panter added the comment:

I am posting LZMAFile-etc.v3.patch, where I have implemented a “buffer_size” 
parameter to the buffered LZMAFile etc classes. I have not implemented 
open(buffering=...) for the time being (which should probably delegate to the 
buffer_size parameter or return a raw _DecompressReader object, at least for 
read mode). Other changes:

* Restored the _MODE_WRITE = 3 value
* Explained the _pos and _size attributes in _DecompressReader
* Factored out decomp_factory and args, decomp_error parameters to make 
_DecompressReader generic
* BZ2File modified similarly to LZMAFile
* I removed the deprecated and unused BZ2File(buffering=...) parameter; 
buffer_size takes its place. The old buffering parameter appears to have been 
documented, but never implemented in C Python, so hopefully this is not a big 
deal.

Still to do: Need to find a better home for the _DecompressReader and 
_BaseStream classes. Currently it lives in “lzma”, but apparently it is 
possible for any of the gzip, bz2, lzma modules to not be importable, so it 
would have to live elsewhere. Possible options are the io module, or a brand 
new internal module (e.g. Lib/_compression.py). Thoughts?

Also I am about to see if I can make GzipFile use the _DecompressReader class. 
I will have to add GzipFile(buffer_size=...) as a keyword-only parameter since 
the third parameter position is already taken. There are quite a few quirks 
with gzip and zlib compared to bz2 and lzma, so I will see how I go.

--
Added file: http://bugs.python.org/file38367/LZMAFile-etc.v3.patch

___
Python tracker 

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



[issue16232] curses.textpad.Textbox backtrace support

2015-03-06 Thread Ned Deily

Ned Deily added the comment:

This has also been reported in Issue23598 including a patch to add DEL as 
suggested.  I have little experience with curses so I don't have any insight as 
to pros and cons of using erasechar() rather than the hardcoded BS and DEL 
chars.  A test would be nice if someone has a creative approach for creating 
one.  I see that a patch for Issue13051 contains a suggested test for another 
problem with curses.textpad; perhaps it could be adapted.

--

___
Python tracker 

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



[issue16232] curses.textpad.Textbox backtrace support

2015-03-06 Thread Ned Deily

Changes by Ned Deily :


--
Removed message: http://bugs.python.org/msg237420

___
Python tracker 

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



[issue23579] Amazon.com links

2015-03-06 Thread Georg Brandl

Georg Brandl added the comment:

LGTM.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue23598] No backspace on curses on iTerm (mac)

2015-03-06 Thread Ned Deily

Ned Deily added the comment:

Thanks for the suggested change.  This problem and a similar change has already 
been suggested in open Issue16232.  Closing this issue as a duplicate and 
continuing the discussion there.

--
nosy:  -ronaldoussoren
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> curses.textpad.Textbox backtrace support

___
Python tracker 

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



[issue16232] curses.textpad.Textbox backtrace support

2015-03-06 Thread Ned Deily

Ned Deily added the comment:

This has also been reported in Issue23598 including a patch to add DEL as 
suggested.  I have little experience with curses so I don't have any insight as 
to pros and cons of using erasechar() rather than the hardcoded BS and DEL 
chars.  A test would be nice if someone has a creative approach for creating 
one.  I see that a patch for Issue13061 contains a suggested test for another 
problem with curses.textpad; perhaps it could be adapted.

--
keywords: +easy
nosy: +ned.deily, ragreener
stage:  -> test needed

___
Python tracker 

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



[issue23432] Duplicate content in SystemExit documentation

2015-03-06 Thread Martin Panter

Martin Panter added the comment:

New patch looks fine

--

___
Python tracker 

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



[issue23579] Amazon.com links

2015-03-06 Thread Sayan Chowdhury

Sayan Chowdhury added the comment:

Attached a patch by changing the amazon links to official websites.

--
keywords: +patch
nosy: +sayanchowdhury
Added file: http://bugs.python.org/file38366/issue23579.patch

___
Python tracker 

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



[issue23432] Duplicate content in SystemExit documentation

2015-03-06 Thread Berker Peksag

Berker Peksag added the comment:

Thank you for your suggestion, Martin. Here is an updated patch.

--
Added file: http://bugs.python.org/file38365/systemexit_v2.diff

___
Python tracker 

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



[issue23546] Windows, 'Edit withIDLE', and multplie installed versions

2015-03-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: Windows, IDLE and py.exe -> Windows, 'Edit withIDLE', and multplie 
installed versions

___
Python tracker 

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



[issue23546] Windows, IDLE and py.exe

2015-03-06 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components:  -IDLE
stage:  -> needs patch
title: windows, IDLE and pep 397 -> Windows, IDLE and py.exe
versions: +Python 2.7 -Python 3.3

___
Python tracker 

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



[issue23546] windows, IDLE and pep 397

2015-03-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

To be more exact, (I believe) 'Edit with Idle' runs the equivalent of ' 
-m idlelib -e ' where  is the current default python (ad  
is the file right-clicked on).  Idle just goes alone for the ride.  You are 
proposing more or less that  be replaced with 'py'.

The problems with this are that it is still opaque which version of python (and 
hence Idle) will be run, there is no way to select the version to be run, most 
people do not use #! on Windows, especially beginners, and some people want to 
be able to open, edit, and run a file on both 2.x and 3.x (currently most often 
2.7 and 3.4).

This same issue has come up on stackoverflow.  To me, a much better solution 
would be an explicit 'Open with Idle x.y' on the context menu for each version 
of Idle installed.  This would be explicit and allow version selection.  (I am 
obviously proposing that the 2.7 and 3.4 installers be tweaked also.)

--
nosy: +terry.reedy

___
Python tracker 

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-06 Thread Berker Peksag

Berker Peksag added the comment:

> If not, I am tempted to bend on my instinctive reaction here and go with 
> Serhiy's style.

+1 to Serhiy's suggestion.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-03-06 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Peter,

Can you attach your demo script to the issue?  Better yet, is it possible to 
explain the issue without referring to 100 lines of code?

--

___
Python tracker 

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



[issue23574] datetime: support leap seconds

2015-03-06 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

> POSIX is a ``standard'' designed by a vendor consortium several years ago to 
> eliminate progress and protect the installed base.


No, POSIX is an attempt to bring some sanity to the installed base of human 
calendars.  The established standard tell's us that a year is 365 days.  Wait, 
every 4-th year is 366 days, except some other rule every 400 years.

POSIX says: fine as long as we can enumerate all -MM-DD's, we can live  
with it.  But the line is drawn where each day is divided into 86,400 seconds.

The problem is that unlike ancient astronomers who were finding better and 
better approximations to the ratio of two Earth's rotation periods (around the 
Sun and around itself) every few hundred years, modern astronomers will tell us 
how many seconds there will be in any given year with only a six month notice.

--

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-03-06 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +belopolsky

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste with MacPorts libedit

2015-03-06 Thread Ned Deily

Changes by Ned Deily :


--
assignee:  -> ned.deily
title: single and double quotes stripped upon paste into interpreter -> single 
and double quotes stripped upon paste with MacPorts libedit

___
Python tracker 

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



[issue23505] Urlparse insufficient validation leads to open redirect

2015-03-06 Thread Yassine ABOUKIR

Yassine ABOUKIR added the comment:

From: Amos Jeffries 
Date: Fri, 06 Mar 2015 14:09:55 +1300

On 6/03/2015 10:42 a.m., cve-assign () mitre org wrote:

We think that the issue reduces to the question of whether it's
acceptable for urlparse to provide inconsistent information about the
structure of a URL.

https://docs.python.org/2/library/urlparse.html says:

   urlparse.urlparse(urlstring[, scheme[, allow_fragments]])
   Parse a URL into six components, returning a 6-tuple. This
   corresponds to the general structure of a URL:
   scheme://netloc/path;parameters?query#fragment.


My 2c ... no it does not.

There are 7 parts in a URL. What is called "netloc" in that description
is actually two fields: [userinfo '@'] authority

The userinfo field is very much alive and well in non-HTTP schemes.


Ignoring the userinfo field leaves implementations open to attacks of
the form:
   scheme://example.com () phishing com/path

AYJ

--

___
Python tracker 

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



[issue23505] Urlparse insufficient validation leads to open redirect

2015-03-06 Thread Yassine ABOUKIR

Yassine ABOUKIR added the comment:

From: cve-assign () mitre org
Date: Thu, 5 Mar 2015 16:42:02 -0500 (EST)

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

We think that the issue reduces to the question of whether it's
acceptable for urlparse to provide inconsistent information about the
structure of a URL.

https://docs.python.org/2/library/urlparse.html says:

   urlparse.urlparse(urlstring[, scheme[, allow_fragments]])
   Parse a URL into six components, returning a 6-tuple. This
   corresponds to the general structure of a URL:
   scheme://netloc/path;parameters?query#fragment.


   urlparse.urlunparse(parts)
   Construct a URL from a tuple as returned by urlparse(). The parts
   argument can be any six-item iterable. This may result in a
   slightly different, but equivalent URL, if the URL that was parsed
   originally had unnecessary delimiters (for example, a ? with an
   empty query; the RFC states that these are equivalent).

The first issue is that the urlunparse documentation is ambiguous. We
believe the reasonable interpretation is that there is a missing third
sentence: "This ALWAYS results in a URL that is either identical or
equivalent to the URL that was parsed originally." There's another
interpretation that we believe is unreasonable: "This may result in a
slightly different, but equivalent URL, if the URL that was parsed
originally had unnecessary delimiters. If the URL that was parsed
originally did not have unnecessary delimiters, then the behavior of
urlunparse is UNDEFINED."

So, our expectation is that urlunparse(urlparse(original_url)) should
not have any significant effect on the meaning of original_url. We
also think that a Python user should be able to rely on that property
to make security-relevant decisions. To simply the situation, consider
a case where the URL is used exclusively within Python code, and is
never accessed by any web browser.

The actual behavior is:

   >>> from urlparse import urlparse, urlunparse
   >>> print urlparse("example.com")
   ParseResult(scheme='', netloc='', path='//example.com', params='', query='', 
fragment='')
   >>> print urlparse(urlunparse(urlparse("example.com")))
   ParseResult(scheme='', netloc='example.com', path='', params='', query='', 
fragment='')
   >>> print 
urlparse(urlunparse(urlparse(urlunparse(urlparse("example.com")
   ParseResult(scheme='', netloc='example.com', path='', params='', query='', 
fragment='')

Here, urlparse(urlunparse(original_url)) does have a significant
effect on the meaning of original_url. The Python user may have wanted
to make a security-relevant decision based on whether netloc was an
empty string. However, netloc is different depending on whether
urlparse(urlunparse(original_url)) occurs at least once. The user's
application (suppose it's called "PyNetlocExaminer") is affected in a
security-relevant way.

The next question is, if there is a CVE for a report of a
security-relevant problem, what product is named as the primary
affected product within that CVE. There is no perfect answer to this
question. Especially in the case of a general-purpose language such as
Python, there's an extremely wide range of bugs that might become
security-relevant in some applications. What we usually try to do is
make the CVE useful to users who may need to perform a software
update. Specifically:

  1. If the language implementation is not ever going to be changed
 (for example: because the language maintainer believes the
 observed behavior has always been correct, or the language
 maintainer believes that it has retroactively become correct
 because any change would break compatibility with other
 applications), then the application is named as the primary
 affected product in the CVE. In other words, if the inconsistency
 between netloc='' and netloc='example.com' were actually the
 intended behavior all along, then PyNetlocExaminer would be named
 in the CVE. Here, realistically, the end user would need to
 update or manually fix PyNetlocExaminer.

  2. If the language implementation is incorrect and is planned to be
 changed at some point, and that would eliminate the
 security-relevant problem, then the language implementation is
 named in the CVE. (An application might also be named in the CVE,
 especially if there are very few affected applications.) This
 option occurs regardless of whether the language maintainer
 believes that it is a language vulnerability. (The language
 maintainer has the option of composing a dispute that would be
 appended to the CVE.) Here, the end user may ultimately decide to
 address the problem by updating their Python installation, not by
 updating PyNetlocExaminer.

Again, this is imperfect. It works best in the relatively common case
where a language bug has security relevance in many applications. It
might work especially poorly in a case where a language bug has
security releva

[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Jeff Doak

Jeff Doak added the comment:

Thanks Ned and everyone!  It turns out that Ned was correct and it works fine 
now that I followed his instructions.

--

___
Python tracker 

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



[issue23328] urllib2 fails for proxy credentials that contain a '/' character

2015-03-06 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue1508475] transparent gzip compression in urllib

2015-03-06 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue22852] urllib.parse wrongly strips empty #fragment

2015-03-06 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue21619] Cleaning up a subprocess with a broken pipe

2015-03-06 Thread Martin Panter

Martin Panter added the comment:

Thanks for getting the test working. Just to tidy things up here I would like 
to get rid of my stdout signalling in the test, which is no longer needed and 
could be misleading. See overflow-pipe-test.patch.

--
status: closed -> open
Added file: http://bugs.python.org/file38364/overflow-pipe-test.patch

___
Python tracker 

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



[issue4356] Add "key" argument to "bisect" module functions

2015-03-06 Thread Dmitry Chichkov

Dmitry Chichkov added the comment:

Use case: a custom immutable array with a large number of items and indirect 
key field access. For example ctypes.array, memoryview or ctypes.pointer or any 
other custom container.


1. I'm not sure how anyone can consider a precached key array as a right ans 
scalable answer. It is just a ridiculuos idea. Precashing key array is a O(N) 
operation.  While bisect is O(log(N)).

2. @Raymond There is a statement that "adding 'key()' would encourage bad 
design and steer people after from better solutions."  Well, right now, the 
design that is being encouraged results in O(N) code. Because lazy developers 
are just 'pre-cacaching' (copying) the keys!

3. There is a statement that key() have to be called multiple times per item. 
What?  Why?

4. There is a statement that one can always add a _cmp_ function to an object. 
This is ridiculuous. The object could be immutable. There should be no need to 
modify the object/array when all that you need to do is to bisect it.

--
nosy: +dmtr

___
Python tracker 

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



[issue23600] tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1

2015-03-06 Thread Peter J C Law

New submission from Peter J C Law:

There's a difference in behaviour between the ``fromutc`` method on a tzinfo 
between Python 2 and Python 3, though only under the specific case of Summer 
Time in regions whose usual offset is 0.

>From what I can tell, it's the Python 3 one which is wrong, based on it no 
>longer matching the sample implementation provided in the docs and on it 
>appearing to report the wrong times for ``datetime.now(tz)`` when on a machine 
>configured for BST during June 2015.
Similar results can also be achieved using a manually constructed ``datetime`` 
for dates during summer 2014.

I've put the python script (and sample outputs) I used to investigate in a gist 
at https://gist.github.com/PeterJCLaw/d8bcc168d68acf066811#file-time_issues-py. 
The outputs there are for pythons 2.7.9 and 3.4.0.

--
components: Library (Lib)
messages: 237407
nosy: peterjclaw
priority: normal
severity: normal
status: open
title: tizinfo.fromutc changed for tzinfo wih StdOffset=0, DstOffset=1
type: behavior
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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Ned Deily

Ned Deily added the comment:

Er, make that:

sudo port install py34-readline

--

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Ned Deily

Ned Deily added the comment:

OK, thanks, now we're getting somewhere!  From the pathname (/opt/local/bin), I 
assume you are using the Python 3.4 from MacPorts and from the readline 
docstring that Python 3.4 is linked with BSD libedit rather than GNU readline.  
MacPorts supplies its own, newer version of libedit rather than the 
Apple-supplied one shipped with OS X.  It looks there is something funky going 
on there such that the pasted characters are being edited. The python.org 
Python 3.4 links with the older system libedit and it does not display this 
behavior.  It could also be due to a patch in the MacPorts Python 3.4 or 
libedit.  In any case, there seems to be an easy workaround: have the MacPorts 
Python use GNU readline instead.  You can do that by running:

sudo port py34-readline

I'll leave this open to investigate further later, assuming the workaround 
works for you.

--

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Jeff Doak

Jeff Doak added the comment:

I am in a standard Terminal session. I have a symbolic link for python 3.4:
/usr/bin/python -> /opt/local/bin/python3.4
so I can run python... or the following:
$ /opt/local/bin/python3.4 -c 'import sys;print(sys.version)'
3.4.2 (default, Oct 22 2014, 01:08:11) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.54)]

$ /opt/local/bin/python3.4 -c 'import readline;print(readline.__doc__)'
Importing this module enables command line editing using libedit readline.

--

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Ned Deily

Ned Deily added the comment:

You've already answered this but since I've already typed it: one possible 
pitfall here is the automatic smart quotes feature of the OS X text system 
which may or may not be a factor depending on which programs are in use.  You 
can disable smart quotes in: System Preferences -> Keyboard -> Text -> Use 
smart quotes and dashes (this is on OS X 10.10).

But we really need more details to try to explain what you are seeing.  Can you 
give a step by step procedure on how to reproduce, including exactly what apps 
are being used (e.g. Terminal.app vs iTerm.app vs IDLE), and the results of the 
following commands in a terminal shell:

python3.4 -c 'import sys;print(sys.version)'
python3.4 -c 'import readline;print(readline.__doc__)'
env | egrep '(LC)|(LANG)'

--

___
Python tracker 

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



[issue10513] sqlite3.InterfaceError after commit

2015-03-06 Thread Gian-Carlo Pascutto

Gian-Carlo Pascutto added the comment:

I believe http://bugs.python.org/issue23129 is a dupe of this.

The patch here has been in "patch review" for 9 months. That seems fairly long 
for something that's a regression that potentially silently produces the wrong 
data.

--
nosy: +Gian-Carlo Pascutto

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Jeff Doak

Jeff Doak added the comment:

I noticed they are smart quotes and came back to see David already mentioned it.
As for Demian's question:
2.7.6:
>>> print("{’Test’}")   
{’Test’}
3.4.2:
>>> print("{Test}") 
{Test}

It is upon paste that the quotes are lost. I'm on OSX 10.10.2 as well.

--

___
Python tracker 

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



[issue20059] Inconsistent urlparse/urllib.parse handling of invalid port values?

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

> It is surprising that urlsplit() does not raise any exception

I have a bit of a TL;DR in #20271, trying to capture what the responsibilities 
of split and parse methods in urllib are and what they should be if consistency 
is something that we're after.


Around the patch though:

It seems quite odd to me to be raising exceptions on accessors rather than on 
instantiation or when the parsing occurs (in the body of urlparse). Wouldn't it 
better to raise the exception there?

--
nosy: +demian.brecht

___
Python tracker 

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-06 Thread Davin Potts

Davin Potts added the comment:

> No, I suggested to replace only the line that produces AttributeError now.

Ah!  Sorry, I misunderstood and incorrectly assumed you were imagining the 
import to happen at the top of the module.

I must confess I am hesitant about the idea of putting an import inside the 
Queue.__init__ (or any method) because I generally don't consider it a best 
practice -- that said, there are a number of places within (not only) the 
multiprocessing module where imports are performed dynamically as part of 
implementations for various methods, but it bothers me when I see those as 
well.  Yet your solution is simple and offers the benefit of not having the 
same (or nearly the same) text appear twice in the code.

Berker: Do you have any strong feeling on this idea?  If not, I am tempted to 
bend on my instinctive reaction here and go with Serhiy's style.

--

___
Python tracker 

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



[issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results

2015-03-06 Thread Gian-Carlo Pascutto

Gian-Carlo Pascutto added the comment:

I've ran into this as well, when a program that was running correctly with 
PostgreSQL turned out to produce garbage with SQLite. Code to reproduce roughly 
looks like this:

sel_cursor = conn.cursor()
sel_cursor.execute("SELECT prim_key_id FROM "
   "somedb ORDER BY start_time ASC")
add_cursor = conn.cursor()
prim_keys = set()
row = sel_cursor.fetchone()
while row:
seq = row[0]
if seq in prim_keys:
raise RuntimeError
prim_keys.add(seq)
add_cursor.execute("INSERT INTO someotherdb "
   "VALUES (?)",
   seq)
conn.commit()
row = sel_cursor.fetchone()
conn.commit()

This will raise a RuntimeError because the SELECT will return the same primary 
key value twice - something that's obviously impossible.

This exact bug has been filed once more already, and it seems to be an actual 
regression in Python 2.7:
http://bugs.python.org/issue10513

Looking at the code there, I agree with the analysis in this message: 
http://bugs.python.org/issue10513#msg150162

Either the pysqlite_do_all_statements should set reset_cursors=1 to warn the 
user that the cursor has been reset, or it shouldn't reset them to begin with 
(as Python <2.7 used to do).

I don't think there's any argument this isn't a (bad) bug: Python <2.7 works 
correctly and later versions silently corrupt data.

--
nosy: +Gian-Carlo Pascutto

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

I'm on OSX 10.10.2. Simply copy/pasting the line into both terminal and iterm 
yields

>>> [“Test”][‘Test’]
  File "", line 1
[“Test”][‘Test’]
  ^
SyntaxError: invalid character in identifier
>>> [“Test”][‘Test’]
  File "", line 1
[“Test”][‘Test’]
  ^
SyntaxError: invalid character in identifier

Are the smart quotes disappearing when the clipboard buffer is being copied 
into the terminal shell or when you hit enter? If it's on copy, what happens 
when you hit enter?

--
nosy: +demian.brecht

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

Thanks for the very useful reviews Serhiy!

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue19610] setup.py does not allow a tuple for classifiers

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Does current code work with None or empty tuple?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 97ef38236dc1 by Victor Stinner in branch 'default':
Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() now
https://hg.python.org/cpython/rev/97ef38236dc1

--
nosy: +python-dev

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-06 Thread Steve Dower

Steve Dower added the comment:

Thanks. I'll be watching the buildbots closely, but hopefully there's no need 
to push quick fixes with the reduced change.

23524_2.patch is still on the table as the last-known-good fix, but I'll update 
it as soon as I can to take into account what's just been checked in.

--

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread R. David Murray

R. David Murray added the comment:

Those aren't actually quote marks, at least as you've cut and pasted them.  
They are "smart quotes", which are not something Python recognizes outside of 
properly quoted strings.

That doesn't explain why they disappear, though, you should just get a syntax 
error.  Works fine on linux, by the way.

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75aadb4450fd by Steve Dower in branch 'default':
Issue #23524: Replace _PyVerify_fd function with calling 
_set_thread_local_invalid_parameter_handler on every thread.
https://hg.python.org/cpython/rev/75aadb4450fd

--
nosy: +python-dev

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

23524_hack_2.patch looks good to me.

23524_hack_2.patch is fine to workaround the issue, but I agree that it's only 
a hack and it should be enhanced later.

--

___
Python tracker 

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



[issue23599] single and double quotes stripped upon paste into interpreter

2015-03-06 Thread Jeff Doak

New submission from Jeff Doak:

On MacBook. Copy/paste the following line into 3.4.2 interpreter session:
[“Test”][‘Test’]
Results in:
[Test][Test]

Same paste into 2.7.6 is as expected:
[“Test”][‘Test’]

--
components: Macintosh
messages: 237389
nosy: Jeff Doak, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: single and double quotes stripped upon paste into interpreter
type: behavior
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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> haypo
stage:  -> commit review

___
Python tracker 

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Please keep in mind that this issue should only be encountered by people
> using Python 3.x on a platform like Hurd (an unsupported platform) that has
> no working sem_open implementation.

Yes, and I compiled Python with disabled sem_open for testing.

Python not always specifies what exact type of exception is raised. When you 
pass wrong type of argument to a function, it can raise TypeError or 
AttributeError. If you request unsupported feature, it can raise ImportError, 
AttributeError, or even NameError. Python and C implementations can raise 
different errors (C implementation usually more strict). Not all such cases are 
considered as bugs.

> Adding the "from .synchronize import SEM_VALUE_MAX as maxsize" as was
> suggested would indeed trigger the ImportError but it would also trigger
> this ImportError immediately upon simply doing an "import multiprocessing"
> which is not the current behavior on systems like Hurd.

No, I suggested to replace only the line that produces AttributeError now.

--

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

2015-03-06 16:55 GMT+01:00 Serhiy Storchaka :
> We can ignore such little slow down (if this is not just compiler artifact).

Maybe it's time to play with micro-optimizations like __builtin_expect
:-) But I would prefer to do that in a separated issue. The patch is
already long and complex.

> The patch LGTM. I afraid there will be issues with third-party code that will 
> need an adaptation to 3.5, but on other hand, this patch could help with 
> catching some hidden bugs.

My patch doesn't make more strict. Without my patch, if a function
returns a result and raise an exception, the exception will still be
noticed, but probably later. The purpose of my change is to notify
immediatly that the function raised an exception.

Without my patch, if a function returns a result and raise an
exception, it's possible that the exception is cleared and so never
seen.

In older Python versions, Python/ceval.c displayed the message "XXX
undetected error" when an exception was raised but also a result was
returned.

Anyway, you must fix your code :-)

--

___
Python tracker 

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



[issue23051] multiprocessing.pool methods imap()[_unordered()] deadlock

2015-03-06 Thread Davin Potts

Changes by Davin Potts :


Added file: 
http://bugs.python.org/file38363/issue_23051_revised_fix_and_tests_v27.patch

___
Python tracker 

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



[issue23051] multiprocessing.pool methods imap()[_unordered()] deadlock

2015-03-06 Thread Davin Potts

Davin Potts added the comment:

Updated (1) the patch for default/3.5 and 3.4 and (2) the patch for 2.7 to 
reflect recommendations from the review.

Thanks goes to Serhiy for the helpful review and especially the suggestion on 
better future-proofing in the tests.

--
Added file: 
http://bugs.python.org/file38362/issue_23051_revised_fix_and_tests_v35_and_v34.patch

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Florian and Davin for your contribution.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cf12856bde17 by Serhiy Storchaka in branch '3.4':
Issue #22853: Added regression test for using multiprocessing.Queue at import
https://hg.python.org/cpython/rev/cf12856bde17

New changeset dcd6d41f2c9a by Serhiy Storchaka in branch 'default':
Issue #22853: Added regression test for using multiprocessing.Queue at import
https://hg.python.org/cpython/rev/dcd6d41f2c9a

--

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Davin Potts

Davin Potts added the comment:

Corrected patch for 3.4 and default/3.5 -- newly introduced test is now turned 
on this time and the dangling weak references are properly addressed as well as 
the reference to Empty.  Nastiness.

Good save, Serhiy.

--
Added file: 
http://bugs.python.org/file38361/issue_22853_revised_only_test_import_lock_in_queue_py34_and_py35.patch

___
Python tracker 

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



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be updating the markup to HTML5 should be different issue. 
issue2052_html5_v2.diff not only adds charset in HTML5 format, it totally 
changes the template. This definitely a separate issue.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue20911] urllib 'headers' is not a well defined data type

2015-03-06 Thread Mark Lawrence

Mark Lawrence added the comment:

@Demian I believe this maybe of interest to you.

--
nosy: +BreamoreBoy, demian.brecht

___
Python tracker 

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



[issue20211] setup.py: do not add invalid header locations

2015-03-06 Thread Mark Lawrence

Mark Lawrence added the comment:

Can we have a patch review on this issue please.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As for 3.x, underscored test does not run, and when remove the underscore it 
runs, but produce a warning (you should run regrtests with -vv to see detailed 
warnings):

$ ./python -m test.regrtest -vv -m '*no_import_lock_contention*' 
test_multiprocessing_spawn
...
Warning -- threading._dangling was modified by test_multiprocessing_spawn
  Before: <_weakrefset.WeakSet object at 0xb6a960ac>
  After:  <_weakrefset.WeakSet object at 0xb6c4cc0c> 
1 test altered the execution environment:
test_multiprocessing_spawn

--

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 069c13ca7a70 by Serhiy Storchaka in branch '2.7':
Issue #22853: Fixed a deadlock when use multiprocessing.Queue at import time.
https://hg.python.org/cpython/rev/069c13ca7a70

--
nosy: +python-dev

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, right. Harmless. Thanks for all the fish Mark. I meant the bug.

--

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Mark Lawrence

Mark Lawrence added the comment:

That's all we need, harmful patches being committed :)  Harmless possibly?

--

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm not sure there is a need to fix this issue. Using multiprocessing Queue at 
import time looks as yet one way to shoot yourself in the foot. But the patch 
looks harmful, I'll commit it.

--
components: +Library (Lib)
stage: patch review -> commit review

___
Python tracker 

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



[issue23496] Steps for Android Native Build of Python 3.4.2

2015-03-06 Thread Cyd Haselton

Cyd Haselton added the comment:

Ryan,
Here are the changes to pyconfig.h.  I left out this
#define ANDROID 1
because GCC 4.8.x and up have -mandroid -mbionic that define __ANDROID__ so 
I've been using that.

#define HAVE_BROKEN_MBSTOWCS 1
#undef HAVE_DEV_PTMX
#undef HAVE_GETHOSTBYNAME_R
#undef HAVE_MBRTOWC
#define HAVE_NCURSES_H 1  /* This only if you've cross compiled curses */
#undef HAVE_SETLOCALE
#undef HAVE_WCSCOLL
#undef HAVE_WCSFTIME
#undef HAVE_WCSXFRM

The following changes were made to Modules/Setup

*shared*



array arraymodule.c -L. -lpython3.4m # array objects
cmath cmathmodule.c _math.c -L. -lpython3.4m -lm # complex math library 
functions
math mathmodule.c _math.c -L. -lpython3.4m -lm # math library functions, e.g. 
sin()
_struct _struct.c   -L. -lpython3.4m # binary structure packing/unpacking
time timemodule.c  -L. -lpython3.4m -lm # time operations and variables
_testcapi _testcapimodule.c-L. -lpython3.4m # Python C API test module
_random _randommodule.c -L. -lpython3.4m # Random number generator
_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI 
_ele
menttree.c  -L -lpython3.4m # elementtree accelerator
_pickle _pickle.c   -L. -lpython3.4m # pickle accelerator
_datetime _datetimemodule.c -L. -lpython3.4m # datetime accelerator
_bisect _bisectmodule.c -L. -lpython3.4m # Bisection algorithms


unicodedata unicodedata.c-L. -lpython3.4m # static Unicode character 
database



#grp grpmodule.c# grp(3)
 select selectmodule.c   -lm -L. -lpython3.4m # select(2); not on ancient 
System  V   
 

# CSV file helper
_csv _csv.c -L. -lpython3.4m

# Socket module helper for socket(2)
_socket socketmodule.c -L. -lpython3.4m

# Socket module helper for SSL support; you must comment out the other  
 # socket line above, and possibly edit the SSL variable:   
  #SSL=/usr/local/ssl   
   _ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl 
\-L. -lpython3.4m -L$(SSL)/lib -lssl -lcrypto

--

___
Python tracker 

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



[issue20556] Use specific asserts in threading tests

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

LGTM

--
nosy: +demian.brecht
stage: patch review -> commit review

___
Python tracker 

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



[issue20557] Use specific asserts in io tests

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

LGTM

--
nosy: +demian.brecht
stage: patch review -> commit review

___
Python tracker 

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



[issue20271] urllib.parse.urlparse() accepts wrong URLs

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

> splitport() shouldn't handle auth, it should be called after auth is dropped 
> with splituser().

Why shouldn't splitport() handle auth? Are you suggesting that in the eyes of 
splitport() that "user:password@host:port" should be invalid?

>>> parse.splitport('user:password@host:80')
('user:password@host', '80')

Seems to be reasonable behaviour to me. Why add the artificial constraint of 
calling splituser() first?

--

___
Python tracker 

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



[issue20271] urllib.parse.urlparse() accepts wrong URLs

2015-03-06 Thread Demian Brecht

Changes by Demian Brecht :


--
stage: needs patch -> patch review

___
Python tracker 

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-06 Thread Davin Potts

Davin Potts added the comment:

Please keep in mind that this issue should only be encountered by people using 
Python 3.x on a platform like Hurd (an unsupported platform) that has no 
working sem_open implementation.  If we try to imagine what Python 3.x users 
should expect, it's that they should see consistent behavior when importing or 
trying to use various pieces of multiprocessing on such an incomplete system.  
Or we should imagine Python 2.x users attempting to adopt Python 3.x and 
choosing to do so on such an incomplete system -- again, consistency is to be 
expected or at least desperately wished for.  It is reasonable to believe that 
it is the exception that people like Ole have even seen this behavior and their 
reaction is that of a request for consistency.  This is worth fixing.


Adding the "from .synchronize import SEM_VALUE_MAX as maxsize" as was suggested 
would indeed trigger the ImportError but it would also trigger this ImportError 
immediately upon simply doing an "import multiprocessing" which is not the 
current behavior on systems like Hurd.  This would effectively cut off those 
Python 3.x users from other functionality in multiprocessing which does not 
depend upon a working sem_open implementation.

It'd make for a nice, tidy solution, that "from .synchronize ..." -- but I 
wasn't prepared to alter other expected behaviors.  Hence the earlier comment 
about, "I believe a less-than-simple refactoring is required to get both 
execution paths to encounter the same exception".


If we don't do this for Hurd users (they need love too), we should do it for 
users like Ole who sometimes find themselves working on a cool package like 
astropy on a system like Hurd.

--

___
Python tracker 

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



[issue20271] urllib.parse.urlparse() accepts wrong URLs

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

I think some further consideration around this change is worthwhile:

Currently, urllib.parse.split* methods seem to do inconsistent validation 
around the data they're splitting. For example:

(None for an invalid port)
>>> parse.splitnport('example.com:foo')
('example.com', None)

Whereas other split* methods do not:

(Auth part should be URL-encoded)
>>> parse.splituser('u@ser:p@ssw...@example.com:80')
('u@ser:p@ssword', 'example.com:80')

And others are just plain incorrect:

(:bad should be the port as defined by the ABNF 'authority = [ userinfo "@" ] 
host [ ":" port ]')
>>> parse.splitport('example.com:bad')
('example.com:bad', None)

However, none of these cases (currently) raise exceptions.

Looking at urllib.parse, two large motivations behind it are splitting and 
parsing. In my mind, splitting should solely be responsible for splitting input 
based on RFC-defined delimiters. Parsing on the other hand, should be 
responsible for both splitting as necessary as well as input validation. It may 
also make sense to add simple validation functions to the module to comply with 
the "batteries included" philosophy, but that's a topic for another issue.

My concern with the proposed patch is that it adds further inconsistency to 
split* methods:

Before patch:

>>> parse.urlsplit('http://[::1]spam:80')
SplitResult(scheme='http', netloc='[::1]spam:80', path='', query='', 
fragment='')

After patch:

>>> parse.urlsplit('http://[::1]spam:80')
Traceback (most recent call last):
  File "", line 1, in 
  File "/Volumes/src/p/cpython/Lib/urllib/parse.py", line 350, in urlsplit
netloc, url = _splitnetloc(url, 2)
  File "/Volumes/src/p/cpython/Lib/urllib/parse.py", line 324, in _splitnetloc
raise ValueError('Invalid IPv6 URL')

(While the above examples still yield the same results and don't raise 
exceptions)

I do think that the validation should be done and I agree that an exception 
should be raised, but it should be done at the urlparse level, not on split (in 
this case, due to the change to _splitnecloc).

--
nosy: +demian.brecht

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-06 Thread Larry Hastings

Larry Hastings added the comment:

FWIW I'm tagging alpha 2 somewhere around 24-36 hours from now.

--

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-06 Thread Mark Dickinson

Mark Dickinson added the comment:

Thanks, Benjamin!

--
assignee: mark.dickinson -> 

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-06 Thread Steve Dower

Steve Dower added the comment:

New patch based on review feedback - main change is to _Py_fstat to use errno 
on Windows instead of GetLastError().

Where to put the invalid parameter handler is still an open question. Victor is 
not keen on adding a new file, while I don't really want it to be outside of 
the PC/ folder. msvcrtmodule.c is next best IMHO, but since this won't be 
getting a Python API it still seems wrong.

Alternatively, I can rename invalid_parameter_handler.c to something like 
"PC/crtutils.c" so it stands out as a multi-purpose file?

--
Added file: http://bugs.python.org/file38360/23524_hack_2.patch

___
Python tracker 

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



[issue23589] Redundant sentence in FAQ

2015-03-06 Thread Demian Brecht

Demian Brecht added the comment:

Not to throw a wrench into this, but would it perhaps not be worthwhile to 
refactor this section in order to include nonlocals as well (obviously not for 
2.7)? It seems a little odd to me to have this amount of detail without 
mentioning nonlocal.

--
nosy: +demian.brecht

___
Python tracker 

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



[issue22853] Multiprocessing.Queue._feed deadlocks on import

2015-03-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We can ignore such little slow down (if this is not just compiler artifact).

The patch LGTM. I afraid there will be issues with third-party code that will 
need an adaptation to 3.5, but on other hand, this patch could help with 
catching some hidden bugs.

--

___
Python tracker 

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



[issue23592] SIGSEGV on interpreter shutdown, with daemon threads running wild

2015-03-06 Thread Tim Peters

Tim Peters added the comment:

Nothing should ever crash the interpreter :-)  So this is a thoroughly 
legitimate bug report.

However, there's no way to guess whether _this_ crasher is easy to fix, or next 
to impossible.  Without a test program to provoke the error, there's little to 
go on.  If it were a common problem with daemon threads, I'd expect at least 
several reports of similar behavior over the decades.  So chances seem to favor 
that there's something unique about the specifics of what your daemon threads 
were doing to provoke it - and/or timing quirks specific to your platform.

--
nosy: +tim.peters

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-06 Thread Guido van Rossum

Guido van Rossum added the comment:

I think it's pretty silly to have math.py. And why would there be a
pure-Python implementation of factorial() (like anybody is ever going to
use that) instead of example implementations of sin() etc.? Please don't go
down this path for this particular module. Put your code in a recipe or
something.

On Fri, Mar 6, 2015 at 7:48 AM, Brett Cannon  wrote:

>
> Brett Cannon added the comment:
>
> I interpret Guido's email as vetoing the skipping of the C implementation
> of PEP 485, not on outright banning a PEP 399 math.py if someone like
> Victor wanted to put the work into implementing some things on top of the C
> code in Python. So as long as everything in the math module has a C
> equivalent I say implement whatever you want in Python code as long as
> maintenance won't be a burden.
>
> --
> nosy: +brett.cannon
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue23595] Split the math module into _math (C) + math (py)

2015-03-06 Thread Brett Cannon

Brett Cannon added the comment:

I interpret Guido's email as vetoing the skipping of the C implementation of 
PEP 485, not on outright banning a PEP 399 math.py if someone like Victor 
wanted to put the work into implementing some things on top of the C code in 
Python. So as long as everything in the math module has a C equivalent I say 
implement whatever you want in Python code as long as maintenance won't be a 
burden.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

Oh, test_io and test_sqlite are failing in release mode with 
check_result-4.patch. io and sqlite modules only call PyErr_Clear() in debug 
mode. It's my fault, I added them, but I made them conditionnal to not impact 
performances. It's now fixed in the new patch.

Patch 5:

- "./python -m test -j0 -rW" succeeded in debug mode
- "./python -m test -j0 -rW" succeeded in release mode
- pybench: overall 0.6% slower with the patch (on the minimum runtime column)

Micro-benchmarks of issue #23507:

$ ./python -m timeit -s "f = lambda x: x" -s "s = list(range(1000))" -- 
"list(filter(f, s))"
Unpatched: 1 loops, best of 3: 96.3 usec per loop
Patched:   1 loops, best of 3: 99.2 usec per loop (+3.0%)

$ ./python -m timeit -s "f = lambda x: x" -s "s = list(range(1000))" -- 
"list(map(f, s))"
Unpatched: 1 loops, best of 3: 89 usec per loop
Patched:   1 loops, best of 3: 92.3 usec per loop (+3.7%)

$ ./python -m timeit -s "f = lambda x: x" -s "s = list(range(1000))" -- 
"sorted(s, key=f)"
Unpatched: 1 loops, best of 3: 104 usec per loop
Patched:   1 loops, best of 3: 106 usec per loop (+1.9%)

--
Added file: http://bugs.python.org/file38359/check_result-5.patch

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could you please run microbenchmarks from issue23507?

--

___
Python tracker 

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



[issue23051] multiprocessing.pool methods imap()[_unordered()] deadlock

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added comments on Rietveld.

--
nosy: +serhiy.storchaka
stage: commit review -> patch review

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch to take in account more Serhiy's comments.

--
Added file: http://bugs.python.org/file38358/check_result-4.patch

___
Python tracker 

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



[issue23590] Potential leak in PyFloat_AsDouble. Refcount error.

2015-03-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 30925a3b2324 by Benjamin Peterson in branch '3.4':
fix potential refleak in PyFloat_AsDouble (closes #23590)
https://hg.python.org/cpython/rev/30925a3b2324

New changeset f31b91b6683a by Benjamin Peterson in branch '2.7':
fix potential refleak in PyFloat_AsDouble (closes #23590)
https://hg.python.org/cpython/rev/f31b91b6683a

New changeset 4d9594018edd by Benjamin Peterson in branch 'default':
merge 3.4 (#23590)
https://hg.python.org/cpython/rev/4d9594018edd

--
nosy: +python-dev
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm not sure that all removed assertions are not needed. There are many ways to 
get raised exception, not only by calling a function.

--

___
Python tracker 

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



[issue23592] SIGSEGV on interpreter shutdown, with daemon threads running wild

2015-03-06 Thread A. Skrobov

A. Skrobov added the comment:

That's right; and working around this issue, by taming the daemon threads a 
bit, wasn't too difficult.

Still, if the daemon threads are part of the language, they shouldn't crash the 
interpreter process, I suppose?

--

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

New patch to take in account Serhiy's comments. I also fixed call_function(), I 
forgot to call _Py_CheckFunctionResult() in two cases.

--
Added file: http://bugs.python.org/file38357/check_result-3.patch

___
Python tracker 

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



[issue21750] mock_open data is visible only once for the life of the class

2015-03-06 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue21750] mock_open data is visible only once for the life of the class

2015-03-06 Thread Mac Ryan

Mac Ryan added the comment:

I'm a bit lost in the interface of this bugtracker, so I apologise if I am 
writing in the wrong spot, anyhow...

I just wanted to signal that this bug breaks the inter-operability between mock 
(external library) and unittest.mock, breaking tests that have been originally 
written for Python2.

--
nosy: +quasipedia

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

New patch which removes some assertions and move other assertions on 
result/PyErr_Occurred.

I removed useless duplicated assertions and move the final assertion at the end 
of PyEval_EvalFrameEx() to guarantee that the function behave correctly.

--
Added file: http://bugs.python.org/file38356/check_result-2.patch

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

Even worse benchmark: timeit :-)

python -m timeit -s 'def f(): pass' 'f()'

* original: 67.5 nanoseconds
* patched: 64.1 nanoseconds (faster!?)

--

___
Python tracker 

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

I ran pybench, even if I know that it's not really revelant: overall 0.3% 
slowdown. But pybench doesn't look reliable: some tests are faster, which looks 
like noise in the benchmark.

---
PYBENCH 2.1
---
* using CPython 3.5.0a1+ (default:648b35f22b91+, Mar 6 2015, 13:18:57) [GCC 
4.9.2 20141101 (Red Hat 4.9.2-1)]
* disabled garbage collection
* system check interval set to maximum: 2147483647
* using timer: time.perf_counter
* timer: resolution=1e-09, implementation=clock_gettime(CLOCK_MONOTONIC)

---
Benchmark: orig.pybench
---

Rounds: 10
Warp:   10
Timer:  time.perf_counter

Machine Details:
   Platform ID:
Linux-3.18.3-201.fc21.x86_64-x86_64-with-fedora-21-Twenty_One
   Processor:  x86_64

Python:
   Implementation: CPython
   Executable: /home/haypo/prog/python/default/python.orig
   Version:3.5.0a1+
   Compiler:   GCC 4.9.2 20141101 (Red Hat 4.9.2-1)
   Bits:   64bit
   Build:  Mar  6 2015 13:19:47 (#default:648b35f22b91)
   Unicode:UCS4


---
Comparing with: patch.pybench
---

Rounds: 10
Warp:   10
Timer:  time.perf_counter

Machine Details:
   Platform ID:
Linux-3.18.3-201.fc21.x86_64-x86_64-with-fedora-21-Twenty_One
   Processor:  x86_64

Python:
   Implementation: CPython
   Executable: /home/haypo/prog/python/default/python.patched
   Version:3.5.0a1+
   Compiler:   GCC 4.9.2 20141101 (Red Hat 4.9.2-1)
   Bits:   64bit
   Build:  Mar  6 2015 13:18:57 (#default:648b35f22b91+)
   Unicode:UCS4


Test minimum run-timeaverage  run-time
 thisother   diffthisother   diff
---
  BuiltinFunctionCalls:41ms41ms   -1.1%41ms41ms   -1.5%
   BuiltinMethodLookup:24ms24ms   +0.3%24ms25ms   -0.8%
 CompareFloats:26ms26ms   +2.2%27ms26ms   +1.2%
 CompareFloatsIntegers:59ms60ms   -0.9%60ms61ms   -2.5%
   CompareIntegers:38ms36ms   +4.6%38ms37ms   +3.5%
CompareInternedStrings:26ms25ms   +0.6%26ms26ms   -0.5%
  CompareLongs:22ms21ms   +1.1%22ms22ms   +0.0%
CompareStrings:22ms23ms   -1.3%23ms23ms   -1.3%
ComplexPythonFunctionCalls:40ms40ms   -1.5%40ms41ms   -2.5%
 ConcatStrings:28ms28ms   -0.3%28ms29ms   -1.2%
   CreateInstances:41ms42ms   -1.7%42ms43ms   -2.6%
CreateNewInstances:31ms32ms   -2.2%32ms33ms   -3.2%
   CreateStringsWithConcat:59ms56ms   +5.6%60ms58ms   +2.7%
  DictCreation:43ms48ms  -10.3%44ms50ms  -12.7%
 DictWithFloatKeys:36ms37ms   -4.8%36ms38ms   -6.0%
   DictWithIntegerKeys:28ms29ms   -4.1%29ms31ms   -6.4%
DictWithStringKeys:24ms26ms   -8.9%24ms27ms  -10.3%
  ForLoops:22ms22ms   -0.9%22ms23ms   -2.2%
IfThenElse:31ms33ms   -5.9%31ms34ms   -7.9%
   ListSlicing:35ms35ms   -0.1%36ms36ms   -2.0%
NestedForLoops:34ms35ms   -2.3%34ms36ms   -4.7%
  NestedListComprehensions:37ms37ms   -1.2%37ms40ms   -7.6%
  NormalClassAttribute:77ms71ms   +8.1%77ms74ms   +3.9%
   NormalInstanceAttribute:37ms36ms   +2.1%38ms38ms   -0.6%
   PythonFunctionCalls:35ms34ms   +1.7%35ms35ms   -0.5%
 PythonMethodCalls:45ms44ms   +3.3%46ms45ms   +0.7%
 Recursion:60ms58ms   +3.7%60ms59ms   +1.0%
  SecondImport:33ms33ms   -0.0%33ms33ms   -1.9%
   SecondPackageImport:34ms34ms   +0.1%34ms34ms   -2.0%
 SecondSubmoduleImport:83ms86ms   -3.5%85ms87ms   -2.4%
   SimpleComplexArithmetic:23ms23ms   +0.7%23ms24ms   -2.2%
SimpleDictManipulation:51ms53ms   -3.8%52ms55ms   -5.7%
 SimpleFloatArithmetic:24ms24ms   +0.3%24ms25

[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

I ran http://hg.python.org/benchmarks/

Result:
---
$ python3 perf.py -r -b default ~/prog/python/default/python.orig  
~/prog/python/default/python.patched 
INFO:root:Automatically selected timer: perf_counter
(...)
Report on Linux smithers 3.18.3-201.fc21.x86_64 #1 SMP Mon Jan 19 15:59:31 UTC 
2015 x86_64 x86_64
Total CPU cores: 8

### etree_parse ###
Min: 0.273882 -> 0.297294: 1.09x slower
Avg: 0.277947 -> 0.312787: 1.13x slower
Significant (t=-11.54)
Stddev: 0.00446 -> 0.02987: 6.6906x larger

### fastunpickle ###
Min: 0.510721 -> 0.526520: 1.03x slower
Avg: 0.521282 -> 0.542610: 1.04x slower
Significant (t=-8.33)
Stddev: 0.01024 -> 0.02348: 2.2931x larger

The following not significant results are hidden, use -v to show them:
2to3, django_v2, etree_generate, etree_iterparse, etree_process, fastpickle, 
json_dump_v2, json_load, nbody, regex_v8, tornado_http.
---

I ran again etree_parse alone and the slowdown disappeared :-p
---
The following not significant results are hidden, use -v to show them:
etree_parse.
---

Output when I ran fastunpickle alone:
---
### fastunpickle ###
Min: 0.510994 -> 0.522419: 1.02x slower
Avg: 0.524633 -> 0.536876: 1.02x slower
Significant (t=-2.69)
Stddev: 0.02983 -> 0.03436: 1.1518x larger
---

2% slower on a single test doesn't look to be significant. Raising a 
SystemError is more important than the minor slowdown. What do you think?

--

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-06 Thread Christian Heimes

Christian Heimes added the comment:

http://svn.python.org/projects/external/ and Tools/buildbot/external-common.bat 
must be updated for Windows, too.

--

___
Python tracker 

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



[issue23598] No backspace on curses on iTerm (mac)

2015-03-06 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Extension Modules, Macintosh
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But if this change is worth, I would write it as

-maxsize = _multiprocessing.SemLock.SEM_VALUE_MAX
+# Can raise ImportError (see issues #3770 and #23400)
+from .synchronize import SEM_VALUE_MAX as maxsize

This would avoid a duplication of the error message.

--

___
Python tracker 

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



[issue23400] Inconsistent behaviour of multiprocessing.Queue() if sem_open is not implemented

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm not sure that this issue is worth to fix. AttributeError is not worse than 
ImportError, and users of 3.x expect AttributeError (if expect).

--
nosy: +brett.cannon, eric.snow, jnoller, ncoghlan, sbt, serhiy.storchaka

___
Python tracker 

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



[issue23598] No backspace on curses on iTerm (mac)

2015-03-06 Thread Robert Greener

New submission from Robert Greener:

iTerm uses ^? for backspace which is curses.ascii.DEL, patch, makes 
curses.ascii.DEL use same behaviour as curses.ascii.BS

--
files: cursesbackspace.patch
keywords: patch
messages: 237345
nosy: ragreener
priority: normal
severity: normal
status: open
title: No backspace on curses on iTerm (mac)
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file38355/cursesbackspace.patch

___
Python tracker 

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



[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-06 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-06 Thread STINNER Victor

STINNER Victor added the comment:

I reviewed 23524_hack.patch.

--

___
Python tracker 

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



  1   2   >