[issue26004] pip install lifetimes - throwing error and unable to install packages

2016-01-05 Thread Eryk Sun
Eryk Sun added the comment: You can build NumPy with only a C compiler, but it won't have accelerated BLAS/LAPACK. However, lifetimes requires SciPy, which in turn requires Fortran. This is a common requirement with a lot of the scientific-computing stack, so you may as well choose a complete

[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report Anil. Python 3.4.3 creates incorrect pickle with protocol 2 (it can't be load in Python 2). issue18473 fixed pickling with protocol 2 in Python 3, but broke loading broken pickles created in unpatched versions of Python 3. Here is

[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2016-01-05 Thread Nikolaus Rath
Nikolaus Rath added the comment: Stefan, sorry for ignoring your earlier reply. I somehow missed the question at the end. I believe that users of the Python module are *not* expected to make use of the WANT_READ, WANT_WRITE flags. Firstly because the documentation (of Python's ssl module)

[issue26017] Update https://docs.python.org/3/installing/index.html to always quote arguments

2016-01-05 Thread Brett Cannon
New submission from Brett Cannon: If you look at https://docs.python.org/3/installing/index.html it lists two commands: python -m pip install SomePackage==1.0.4# specific version python -m pip install 'SomePackage>=1.0.4' # minimum version If you notice that beyond the change from `==`

[issue26016] io.TextIOWrapper.tell() report 65bit number when mix readline() + tell()

2016-01-05 Thread STINNER Victor
STINNER Victor added the comment: Yeah, it's expected that tell() can return big numbers. It returns a black box "cookie". https://docs.python.org/dev/library/io.html#id3 https://docs.python.org/dev/library/io.html#io.TextIOWrapper -- nosy: +haypo

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-05 Thread Jason Madden
Changes by Jason Madden : -- nosy: +jmadden ___ Python tracker ___ ___

[issue26015] Add new tests for pickling iterators of mutable sequences

2016-01-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch updates tests for iterators of mutable sequences. Now tested iterators in all four states (initial, running, empty and exhausted), and tested that unpickled iterator is linked with a sequence, not with an independed copy (as in case of dict

[issue25776] More compact pickle of iterators etc

2016-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add new tests for pickling iterators of mutable sequences ___ Python tracker ___

[issue26016] io.TextIOWrapper.tell() report 65bit number when mix readline() + tell()

2016-01-05 Thread EcmaXp
이시만 (EcmaXp) added the comment: second fp.readline() # '..\n' is actaully '...\n' mistake -- ___ Python tracker ___

[issue19475] Add timespec optional flag to datetime isoformat() to choose the precision

2016-01-05 Thread Alessandro Cucci
Alessandro Cucci added the comment: up -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26017] Update https://docs.python.org/3/installing/index.html to always quote arguments

2016-01-05 Thread Zachary Ware
Zachary Ware added the comment: I'd also suggest using double quotes ("); single quotes don't work on Windows. C:\>echo 'test>=test' C:\>dir /b test* test' C:\>type "test'" 'test -- nosy: +zach.ware ___ Python tracker

[issue20440] Use the Py_SETREF macro

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The commit doesn't include changes for dictobject.c, setobject.c and _sqlite/cache.c (I had forgot to exclude them from the patch before uploading). Dict and set code is performance critical, and using Py_XDECREF instead of Py_DECREF can affect performance.

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: I'm regenerating the patch in the hope that it will trigger the code review hook. -- Added file: http://bugs.python.org/file41508/abarnert-patch-regenerated.diff ___ Python tracker

[issue20440] Use the Py_SETREF macro

2016-01-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1118dfcbcc35 by Serhiy Storchaka in branch 'default': Issue #20440: Cleaning up the code by using Py_SETREF. https://hg.python.org/cpython/rev/1118dfcbcc35 -- ___ Python tracker

[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-05 Thread Anil Kulkarni
Anil Kulkarni added the comment: Hi Serhiy, I have done some more investigation this morning and I have come across two distinct issues. The first is that pickles (specifically the pickle in my earlier message) created in python 3.0->3.4.3 do not load on python 2.7.10. The exception is

[issue26016] io.TextIOWrapper.tell() report 65bit number when mix readline() + tell()

2016-01-05 Thread EcmaXp
New submission from 이시만 (EcmaXp): I did test on - Python 3.5.1 on Windows 64 Bit and 32 Bit (Machine A) - Python 3.4.4 on Windows 32 Bit (Machine A) - Python 3.4.3+ on Ubuntu 15.10 64 Bit (Virtual Machine on Machine A) - Python 3.4.2 on Machine B and C - Python 3.3.5 on Windows 32 Bit (Machine

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that setting some special methods (such as __copy__, __deepcopy__, __reduce_ex__, __reduce__, __setstate__, etc) to None has different meaning. The value None is just ignored and corresponding operation is fall back to other methods. For example

[issue26016] io.TextIOWrapper.tell() report 65bit number when mix readline() + tell()

2016-01-05 Thread Martin Panter
Martin Panter added the comment: The documentation for tell() says that it returns an opaque number. Depending on the codec used, it might have to record the state of the text decoder, CRLF decoder, byte position, etc, all in that

[issue25637] Move non-collections-related ABCs out of collections.abc

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly I think this such a slippery slope that I prefer keeping them in collections.abc. The main reason that we have Iterable and Iterator is that they are closely related to real collections (e.g. Sequence, Set, Mapping). And generators are related to

[issue22558] Missing hint to source code - complete

2016-01-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Guido, should we take your comment as approving linking every source, as opposed to only some? This scope issue is the main sticking point for this issue. Otherwise, the standard patch is 3 easy new lines after the :synopsis: (and any 'New in Version x.y'

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: The culprit is the BUILD_SET opcode in Python/ceval.c which unnecessarily loops backwards (it looks like it was copied from the BUILD_TUPLE opcode). -- assignee: docs@python -> rhettinger nosy: +rhettinger ___

[issue22558] Missing hint to source code - complete

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: It's fine to add a source link to any module for which there is Python source code. I suppose this adds a slight maintenance burden when a module moves (e.g. when a module is turned into a package, or when the subdirectory structure of the Lib directory

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Hamish Campbell
New submission from Hamish Campbell: It looks like the behaviour of set displays do not match behaviour in some cases. The documentation states: "A set display yields a new mutable set object, the contents being specified by either a sequence of expressions or a comprehension. When a

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Hamish Campbell
Hamish Campbell added the comment: Note also the differences here: >>> print(set([True, 1])) {True} >>> print({True, 1}) {1} >>> print({x for x in [True, 1]}) {True} -- ___ Python tracker

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Hamish Campbell
Hamish Campbell added the comment: Apologies, that first line should read "It looks like the documentation of set displays do not match behaviour in some cases". -- ___ Python tracker

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Emanuel Barry
Emanuel Barry added the comment: Set displays appear to be the culprit here: >>> class A: ... count = 0 ... def __init__(self): ... self.cnt = self.count ... type(self).count += 1 ... def __eq__(self, other): ... return type(self) is type(other) ... def __hash__(self): ...

[issue26020] set_display evaluation order doesn't match documented behaviour

2016-01-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +patch Added file: http://bugs.python.org/file41514/build_set.diff ___ Python tracker

[issue26019] collections.abc documentation incomplete

2016-01-05 Thread Andrew Barnert
Andrew Barnert added the comment: The attached patch is, I think, the smallest change that includes all the necessary information. Of course it will need to be redone if #25958 goes through, with a version-changed note explaining that prior to 3.6 some of the implicit ABCs (maybe with a

[issue22831] Use "with" to avoid possible fd leaks

2016-01-05 Thread Martin Panter
Martin Panter added the comment: I had another look at the five patches you mentioned. I made a couple review comments about expanding the scope of some “with” statements. There are a couple changes that add explicit file closing, where it was previously up to the garbage collector. I.e. code

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-05 Thread Martin Panter
Martin Panter added the comment: After looking into the unwrap() problem more, I think I understand the problem, and believe making the server call unwrap() is the correct way forward. SSL_ERROR_SYSCALL is Open SSL’s way of saying the connection was shut down insecurely (among other things).

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Andrew Barnert
Andrew Barnert added the comment: The second patch takes into account all the issues raised by Martin and Guido, as well as some other changes that didn't make it into the first patch because Windows hates me. And it should be flattened into a single commit, and therefore should hopefully

[issue22268] add dedicated functions mrohasattr and mrogetattr

2016-01-05 Thread Andrew Barnert
Andrew Barnert added the comment: See #25958, which incorporates a similar refactoring in service of making all of the subclasshooks in collections.abc handle None the same way. We definitely do want something public in the abc module like this, rather than the private function in

[issue22268] add dedicated functions mrohasattr and mrogetattr

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: Honestly I don't think this is worth it. The proposed functions seem to fall firmly in the territory of "not every three useful lines of code are worth a stdlib function". -- nosy: +gvanrossum ___ Python tracker

[issue22499] [SSL: BAD_WRITE_RETRY] bad write retry in _ssl.c:1636

2016-01-05 Thread Stefan Krah
Stefan Krah added the comment: https://books.google.com/books?id=IIqwAy4qEl0C_esc=y , page 159 ff. Modules/_ssl.c:_ssl__SSLSocket_write_impl() just raises PySSLWantReadError etc. if the socket is non-blocking. IOW, it's a thin wrapper around SSL_write(). So yes, I think you do need complete

[issue14574] SocketServer doesn't handle client disconnects properly

2016-01-05 Thread John Szakmeister
John Szakmeister added the comment: FWIW, I'm seeing the same issue as Jason too, and his solution seems reasonable to me. -- nosy: +jszakmeister ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is already a precedent for None, but it would have been nicer to use NotImplemented. -- nosy: +rhettinger ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Needed tests for Hashable, Awaitable, Coroutine, AsyncIterable, AsyncIterator, Iterator, Generator, Sized, Container, Callable. The patch adds some tests for __iadd__ and __eq__. I think needed tests for a number of other special methods. In particular

[issue20440] Use the Py_SETREF macro

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The final patch replaces the code that equivalent to the Py_SETREF macro by using the Py_SETREF macro. There are no bugs, the patch only makes the correct code cleaner. If I'll not got a review, I'll just close this issue. -- versions: -Python 2.7,

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if use None and NotImplemented as different signals: "not defined here so fall back on either a superclass or a different protocol", and "not defined here so fail without falling back"? -- ___ Python tracker

[issue25637] Move non-collections-related ABCs out of collections.abc

2016-01-05 Thread Brett Cannon
Brett Cannon added the comment: So leave Callable and Coroutine there and if I add a context manager ABC put it in collections.abc as well? Or should we put Callable and Coroutine in functools and a context manager one in contextlib (or Coroutine in asyncio)? --

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: No. Simply No. Nobody will be able to remember which means which. -- ___ Python tracker ___

[issue25609] Add a ContextManager ABC and type

2016-01-05 Thread Brett Cannon
Brett Cannon added the comment: In issue #25637, Guido said he didn't want to move stuff out of collections.abc, so the context manager ABC will go into contextlib. To answer Martin's point, I could make __exit__ abstract to begin with to make people override it properly. The only reason I

[issue25609] Add a ContextManager ABC and type

2016-01-05 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon ___ Python tracker ___ ___

[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-05 Thread Anil Kulkarni
Anil Kulkarni added the comment: Ah, sorry I misunderstood. Thanks for the quick turnaround! -- ___ Python tracker ___

[issue25637] Move non-collections-related ABCs out of collections.abc

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: I think ContextManager should be in contextlib. I don't want to put anything in functools. Coroutine doesn't belong in asyncio, it's more fundamental (closely related to Generator). -- ___ Python tracker

[issue25637] Move non-collections-related ABCs out of collections.abc

2016-01-05 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the input everyone! -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: True, even I were not sure which should mean which. ;) > When I manually trigger the code in typeobject.c:5827, I get a segfault; I'm surprised no test triggered that. I think this triggered one of Victor's guards, added to catch such sort of errors. In

[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree, and the provided is purposed to fix this issue. In the previous message I just proposed a workaround for those who can't wait 3.5.2. -- ___ Python tracker

[issue26014] Guide users to the newer package install instructions

2016-01-05 Thread Nick Coghlan
New submission from Nick Coghlan: The up to date module installation docs are at: * https://docs.python.org/2/installing/index.html * https://docs.python.org/3/installing/index.html However, legacy deep links still resolve to the old docs: * https://docs.python.org/2/install/index.html *

[issue26018] documentation of ZipFile file name encoding

2016-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> needs patch ___ Python tracker ___ ___

[issue22558] Missing hint to source code - complete

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: Actually uploading a patch for this should be easy, right? -- keywords: +easy nosy: +gvanrossum ___ Python tracker

[issue6500] urllib2 maximum recursion depth exceeded

2016-01-05 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26018] documentation of ZipFile file name encoding

2016-01-05 Thread Martin von Gagern
New submission from Martin von Gagern: https://docs.python.org/3/library/zipfile.html#zipfile.ZipFile.write writes: “Note: There is no official file name encoding for ZIP files. If you have unicode file names, you must convert them to byte strings in your desired encoding before passing them

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW, Martin's review was much more extensive. I'm looking forward to the flat version of your next patch, Andrew! -- ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: In response to Serhiy's comment regarding __copy__ etc.: while the distinction is somewhat unfortunate, I think it's too late to make this more consistent. I think it's fine that the special methods used by copy and pickle protocols behave somewhat differently

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Guido van Rossum
Guido van Rossum added the comment: The idea of using NotImplemented was already discussed (IIR in python-ideas). I really don't like it. -- ___ Python tracker

[issue25958] Implicit ABCs have no means of "anti-registration"

2016-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Without tests you can't be sure that there is no special case in some abstract classes or operators, or that it can't be introduced in future. To decrease the copy-pasting you can use code generation for testing. But I don't know what is the best place for

[issue17394] Add slicing support to collections.deque

2016-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file41495/deque_slices.patch ___ Python tracker ___

[issue17394] Add slicing support to collections.deque

2016-01-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file41506/deque_slices.patch ___ Python tracker ___

[issue26010] document CO_* constants

2016-01-05 Thread Yury Selivanov
Yury Selivanov added the comment: > This is a follow up to issue #26010. The correct issue # is 25813 -- ___ Python tracker ___

[issue26019] collections.abc documentation incomplete

2016-01-05 Thread Andrew Barnert
New submission from Andrew Barnert: Some of the modules in collections.abc have a subclass hook that implicitly registers any type that declares the right methods, like Iterator. Others do not, like Sequence. For those that do have the hook, it's not always obvious what methods are tested.

[issue25940] SSL tests failed due to expired svn.python.org SSL certificate

2016-01-05 Thread Martin Panter
Martin Panter added the comment: Koobs: What thing are you suggesting to mock? The remote server perhaps, which is what I want to do too? Here is a patch that implements my local SSL server idea by reusing ThreadedEchoServer. There is one problem with local-server.patch, and I don’t know how