[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Brett Cannon
Brett Cannon added the comment: I personally would rather wait until PEP 432 happens before adding any such hook. This sort of thing is extremely hard to test and the startup sequence for Python is already quite complicated and honestly too tightly bound to the magical sequence of steps it

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

2016-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I propose to solve the narrow problem by indeed supporting the setting of certain special methods to None similar to __hash__. This should be limited to those methods for which this adds value, e.g. where the complete absence of the method causes a

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

2016-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I like all of that. Thanks! -- ___ Python tracker ___ ___

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

2016-01-04 Thread Steve Dower
Steve Dower added the comment: Since you're on Python 3.5, you'll need Visual Studio 2015 to build extensions. However, since the extension in question is numpy, you'll need to find prebuilt binaries since you won't be able to compile it yourself just yet. I believe Continuum has builds for

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Phil Thompson
Phil Thompson added the comment: At the moment my importer does the same as zipimport and gets added to sys.path_hooks rather than sys.meta_path. While waiting for the PEP, how about a table of (externally modifiable) importer installers that is worked through where _PyImportZip_Init() is

[issue20397] distutils --record option does not validate existence of byte-compiled files

2016-01-04 Thread koobs
koobs added the comment: setuptools and therefore pip are also affected by this -- ___ Python tracker ___ ___

[issue20397] distutils --record option does not validate existence of byte-compiled files

2016-01-04 Thread koobs
Changes by koobs : -- keywords: +easy versions: +Python 3.6 ___ Python tracker ___

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

2016-01-04 Thread Debashish Maity
New submission from Debashish Maity: Not able to install "lifetimes" package using pip script. Need urgent help. Followed the following links for help, but still no success http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/

[issue24313] json fails to serialise numpy.int64

2016-01-04 Thread Thomas Arildsen
Thomas Arildsen added the comment: Is there any possibility that json could implement special handling of NumPy types? This "lack of a feature" seems to have propagated back into Python 2.7 now in some recent update... -- ___ Python tracker

[issue24036] GB2312 codec is using a wrong covert table

2016-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think we can close this issue as "won't fix". It's a bug, but one which is present in a lot of other systems as well, so we'd potentially make it impossible to write GB2312 data which is supposed to be read back by these other systems. Ma Lin: Do you

[issue24313] json fails to serialise numpy.int64

2016-01-04 Thread Thomas Arildsen
Thomas Arildsen added the comment: Thanks for the clarification. -- versions: -Python 3.6 ___ Python tracker ___

[issue17394] Add slicing support to collections.deque

2016-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch implements getting, deleting and setting slices in deque. Getting a slice returns a list, but this can be changed if needed. -- assignee: -> rhettinger keywords: +patch stage: needs patch -> patch review versions: +Python 3.6 -Python

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

2016-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 04.01.2016 08:43, Martin Panter wrote: > > In the meantime, this patch changes the tests to use the new DST root > certificate. This seems to be the minimum to make the tests pass again, but > someone else should probably review it because I’m not too

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

2016-01-04 Thread koobs
koobs added the comment: Can't / Shouldn't these be mocked? -- ___ Python tracker ___ ___ Python-bugs-list

[issue26006] 32 bits python ctypes creates 64 bits process from 32 bits executable

2016-01-04 Thread Artur Korobeynyk
New submission from Artur Korobeynyk: Hi, I have a 32 bits python on 64 bits Windows and 32 bits executable (compiled from native C). When I do kernel32.CreateProcessA(path_to_exe, ...) python creates a process which is 64 bit (ctypes IsWow64Process returns true). I expect it to be 32 as

[issue25433] whitespace in strip()/lstrip()/rstrip()

2016-01-04 Thread Dimitri Papadopoulos Orfanos
Dimitri Papadopoulos Orfanos added the comment: In Python 3 the situation is similar: * The Py_UNICODE_ISSPACE macro is used internally to define str.isspace() and wherever Python needs to detect "whitespace" characters in strings. * There is an equivalent function Py_ISSPACE for

[issue25596] regular files handled as directories in the glob module

2016-01-04 Thread Xavier de Gaye
Xavier de Gaye added the comment: > and since _iterdir() results are always accumulated in a list Right, I failed to note that point. And so, since the file descriptor opened by os.scandir() is closed within each call to recursive _rlistdir(), then my other comment about EMFILE does not stand

[issue24313] json fails to serialise numpy.int64

2016-01-04 Thread Nathaniel Smith
Nathaniel Smith added the comment: Nothing's changed in python 2.7. Basically: (a) no numpy ints have ever serialized in py3. (b) in py2, either np.int32 *xor* np.int64 will serialize correctly, and which one it is depends on sizeof(long) in the C compiler used to build Python. (This follows

[issue24036] GB2312 codec is using a wrong covert table

2016-01-04 Thread Ma Lin
Ma Lin added the comment: I agree with you, "won't fix". -- ___ Python tracker ___ ___ Python-bugs-list

[issue24036] GB2312 codec is using a wrong covert table

2016-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Thanks, Ma Lin. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer

2016-01-04 Thread Richard Clifford
New submission from Richard Clifford: The issue comes when there is a malformed HTTP request not ending in a new line, it causes the server to hang, not timeout and causes a DoS. The request that I sent to the server was as follows: const char *headers = "GET / HTTP/1.1\r\nHost:

[issue25433] whitespace in strip()/lstrip()/rstrip()

2016-01-04 Thread Dimitri Papadopoulos Orfanos
Dimitri Papadopoulos Orfanos added the comment: In Python 2, as far as I can understand, string.whitespace and str.isspace() are different: * str.isspace() is built upon the C isspace() function and is therefore locale-dependant. Python heavily relies on isspace() to detect "whitespace"

[issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer

2016-01-04 Thread Martin Panter
Martin Panter added the comment: I expect the server _is_ waiting for the end of the headers before handling the response. The problem is if you do not send the blank line, the server cannot know if you have ended the headers or if there are more to come. Perhaps you could set a socket

[issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer

2016-01-04 Thread STINNER Victor
STINNER Victor added the comment: "I think a server robust against that sort of stuff would be out of scope for SimpleHTTPServer." We can probably enhance SimpleHTTPServer but I agree that the server should remain simple. Maybe we should be more explicit in the documentation that the server

[issue26010] document CO_* constants

2016-01-04 Thread Yury Selivanov
Changes by Yury Selivanov : -- assignee: docs@python components: Documentation keywords: needs review nosy: docs@python, r.david.murray, yselivanov priority: normal severity: normal stage: patch review status: open title: document CO_* constants type: enhancement

[issue25813] co_flags section of inspect module docs out of date

2016-01-04 Thread Georg Brandl
Georg Brandl added the comment: > It's all ready been superceeded, or haven't you woken up to that fact either? Excuse me for not having all issues in my head. (And that #26010 states that it's a followup to #26010 doesn't help.) In the future, please accept that the core developers are who

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Phil Thompson
Phil Thompson added the comment: Understood, but the only promise here is to call a function (with no arguments, and returning no result). -- ___ Python tracker

[issue26011] Document necesities for cmp argument of sorted

2016-01-04 Thread Karl Richter
New submission from Karl Richter: The docstring of `sorted` doesn't explain what can be passed to the `cmp` and `key` argument of `sorted`. -- assignee: docs@python components: Documentation messages: 257505 nosy: docs@python, krichter priority: normal severity: normal status: open

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Phil Thompson
Phil Thompson added the comment: I don't see why it would be hard to test. The change suggested wouldn't alter the default behaviour at all. -- ___ Python tracker

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Brett Cannon
Brett Cannon added the comment: It might not change the default behaviour, but we still have to make sure it works and doesn't accidentally break. If we add official support for a C API to specify callbacks to execute during interpreter startup before any stdlib Python code then we are making

[issue25813] co_flags section of inspect module docs out of date

2016-01-04 Thread Georg Brandl
Georg Brandl added the comment: > For the final time, *I* am the OP and not one of you could be bothered > before so this remains closed. Are you quite all right? Continuing behavior of that sort will get your tracker account disabled. -- nosy: +georg.brandl status: closed -> open

[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-04 Thread Mike Romberg
Mike Romberg added the comment: Yes. I can do this. I've not used hg before. But I bet I can figure it out. I'm assuming hg has a diff/pach genterator of some kind ('hg diff' perhaps). Lemme try and find the hg repository and check out a copy... --

[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-04 Thread Mike Romberg
Mike Romberg added the comment: Try issue17633-hg.diff. Caution it was made after literally minutes of experience with hg. :) I checked out the source applied the changes, compiled and ran 'make test' (gdb still fails), and did an hg commit. The diff was made following the instructions

[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-04 Thread Brett Cannon
Brett Cannon added the comment: Any chance you can do the diff against an hg checkout, Mike? That way we can use our review tool to do the code review, else we have to work only from the raw diff file which isn't as nice. -- ___ Python tracker

[issue26010] document CO_* constants

2016-01-04 Thread Yury Selivanov
New submission from Yury Selivanov: Hi David, This is a follow up to issue #26010. Please review the attached patch. I've skipped the CO_NESTED flag since it's no longer used, and CO_OPTIMIZED because I don't know too much about it. -- keywords: +patch Added file:

[issue25813] co_flags section of inspect module docs out of date

2016-01-04 Thread Mark Lawrence
Mark Lawrence added the comment: It's all ready been superceeded, or haven't you woken up to that fact either? -- status: open -> closed ___ Python tracker

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-04 Thread Andrew Barnert
Andrew Barnert added the comment: > My main concern about the documentation was that in your patch you say _all_ > special methods are now allowed to be None, but in your code you only check > __iter__(). This is adding new undocumented inconsistencies e.g. with > Iterable vs Container. No

[issue25919] http.client PUT method ignores error responses sent immediatly after headers

2016-01-04 Thread Martin Panter
Martin Panter added the comment: As I see it, if the client receives an early response (when 100-continue is not used) but needs to make more requests, the only choices are: * Complete sending the request if possible, after which the connection may still be usable for a second request. But

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

2016-01-04 Thread Andrew Barnert
Andrew Barnert added the comment: Is an hg export patch usable? If not, let me know and I'll flatten it. Anyway, the attached patch fixes #25987 and #25864 as well as this one, as follows: * Every ABC in collections.abc that has a subclass hook now treats None as blocking, instead of a few

[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-04 Thread Ned Deily
Changes by Ned Deily : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-04 Thread Guido van Rossum
Changes by Guido van Rossum : -- components: +Library (Lib) ___ Python tracker ___ ___

[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-04 Thread Guido van Rossum
New submission from Guido van Rossum: I created a symlink loop as follows: mkdir tmp cd tmp ln -s ../tmp baz cd .. Then I tried to list it recursively using rglob(): >>> list(pathlib.Path('tmp').rglob('**/*') This caused an infinite regress: Traceback (most recent call last): File "", line

[issue10496] Python startup should not require passwd entry

2016-01-04 Thread Jonathon Reinhart
Jonathon Reinhart added the comment: I have another scenario where this happens: Running Python in a Docker container, passing the --user option to 'docker run'. This sets the UID in the container, which has its own /etc/passwd. Couple this with the fact that $HOME might not be set (e.g. when

[issue22062] Fix pathlib.Path.(r)glob doc glitches.

2016-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: Classifying as easy doc bug. -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python, gvanrossum ___ Python tracker

[issue23677] Mention dict and set comps in library reference

2016-01-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: Heck, with the addition of additional unpacking generalizations in 3.5, you can make an empty set even without a comprehension: {*()} Not really recommending the "one-eyed monkey operator", but the addition of unpacking generalizations undoes several of the

[issue17633] zipimport's handling of namespace packages is incorrect

2016-01-04 Thread Brett Cannon
Brett Cannon added the comment: Nope, looks like it worked! I will try to have a look at the patch some time this week. And for future reference, you can also use https://docs.python.org/devguide/patch.html as a guide. -- assignee: -> brett.cannon

[issue24120] pathlib.(r)glob stops on PermissionDenied exception

2016-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I just ran into this issue. What's keeping it from being committed, except perhaps that Antoine decided to leave core developments? -- nosy: +gvanrossum ___ Python tracker

[issue26006] 32 bits python ctypes creates 64 bits process from 32 bits executable

2016-01-04 Thread Artur Korobeynyk
Artur Korobeynyk added the comment: the Wow64Process output parameter is true for a 32-bit process. WOW64 is short for Win32 running on Win64 (i.e. the environment used to run 32-bit programs in 64-bit Windows). Even a 32-bit WOW64 process has some 64-bit modules, such as ntdll.dll,

[issue24733] Logically Dead Code

2016-01-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2a846c1b593 by Senthil Kumaran in branch '2.7': Issue24733 - Remove unreachable code in traceback.c https://hg.python.org/cpython/rev/f2a846c1b593 -- nosy: +python-dev ___ Python tracker

[issue26011] Document necesities for cmp argument of sorted

2016-01-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: The docstring doesn't give details, but many docstrings don't. The docs themselves do; not sure it's a good idea to expand every docstring into complete documentation; if you don't know the function you read the real docs, the docstrings are useful as a

[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-04 Thread Anil Kulkarni
New submission from Anil Kulkarni: Pickles created with python 3.4.X will not load with python 3.5.X if they include a collections.OrderedDict To reproduce this issue, simply create a pickle of an OrderedDict on python 3.4.3 with protocol=2 and try to open it on 3.5. I have included a simple

[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-04 Thread Josh Rosenberg
Josh Rosenberg added the comment: So would the goal of a fix be something like dev/inode memoization to prevent traversing the same link twice? To provide an argument to prevent following symlinks at all (as in stuff like os.walk), possibly defaulting to followlinks=False? It looks like

[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-04 Thread Guido van Rossum
Guido van Rossum added the comment: I agree it's easiest just not to traverse symlinks matching **. glob.py avoids the errors (but not the senseless recursion) by simply ignoring OSError coming out of listdir(). That might be a good idea anyways (it might even be a simpler way to avoid the

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

2016-01-04 Thread Andrew Barnert
Andrew Barnert added the comment: > A Mercurial export patch should work with the Reitveld review thing if it is > a single revision (and based on a public revision). Well, it's 7 separate commits on a work branch, so I could check in each piece and test it separately, and then I just

[issue25711] Rewrite zipimport from scratch

2016-01-04 Thread diana
Changes by diana : -- nosy: +diana ___ Python tracker ___ ___ Python-bugs-list

[issue26012] pathlib.Path().rglob() is fooled by symlink loops

2016-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: glob.glob() just stops too deep recursion. >>> import glob >>> glob.glob('tmp/**/*') ['tmp/baz/baz'] >>> glob.glob('tmp/**/*', recursive=True) ['tmp/baz', 'tmp/baz/baz', 'tmp/baz/baz/baz', 'tmp/baz/baz/baz/baz', 'tmp/baz/baz/baz/baz/baz',

[issue26005] Denial of Service in SimpleHTTPServer and BaseHTTPServer

2016-01-04 Thread Senthil Kumaran
Senthil Kumaran added the comment: SimpleHTTPServer is never meant to be used in production. I was of the understanding that we already inform users about it in the documentation, but I do not find any such note. Only in wsgiref's simple_server.py example, we state that in the module header

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

2016-01-04 Thread Martin Panter
Martin Panter added the comment: A Mercurial export patch should work with the Reitveld review thing if it is a single revision (and based on a public revision). Or you could try getting a plain diff from the base revision. Or for changes that are independent, separate patches based off a

[issue24733] Logically Dead Code

2016-01-04 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks for the report, Pankaj Sharma. Removed in 2.7.11+. -- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-01-04 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: Hello, I've added an updated set of patches (v03) for the current CPython2 and CPython3 codebase. Also made some small changes to reduce the number of places where the flags are set. -- Added file:

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-01-04 Thread Alecsandru Patrascu
Changes by Alecsandru Patrascu : Added file: http://bugs.python.org/file41494/lto-cpython3-v03.patch ___ Python tracker ___

[issue25998] doctest crashes when accessing __wrapped__ fails other than AttributeError

2016-01-04 Thread Lasse Schuirmann
Lasse Schuirmann added the comment: Sorry for giving it the wrong category. I personally think both projects should solve this. IMO it would be nice if doctest is robust against modules that for some reason (be they ill designed or not; I guess if you search a lot you find a project that

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Phil Thompson
Phil Thompson added the comment: Yes, preventing the filesystem being used for imports would be another way of expressing the issue. Regarding the title I specifically didn't want to suggest a solution as I'm not expert enough to know what the best solution might be. If, as Paul implies, it

[issue26008] Different behaviour platform.linux_distribution() on Python2.7.11 and 3.5.1

2016-01-04 Thread Antonio Álvarez
Changes by Antonio Álvarez : -- title: Different behaviour platform.linux_distribution() on Python2.7 and 3.6 -> Different behaviour platform.linux_distribution() on Python2.7.11 and 3.5.1 ___ Python tracker

[issue26008] Different behaviour platform.linux_distribution() on Python2.7 and 3.6

2016-01-04 Thread Antonio Álvarez
New submission from Antonio Álvarez: Hi! I have a doubt, is this behaviour in Python2.7.11 usual, or is it a bug? >>> import platform >>> platform.linux_distribution() ('', '', '') In Python3.5.1 I get >>> import platform >>> platform.linux_distribution() ('arch', 'Arch', 'Linux') I work

[issue25864] collections.abc.Mapping should include a __reversed__ that raises TypeError

2016-01-04 Thread Martin Panter
Martin Panter added the comment: I’m sorry I only read your patch and did not see the NoLen class above Blocked. (I blame the lack of Reitveld review link.) I still think __getitem__() should have a valid signature, but I acknowledge that it’s not really your fault. :) My main concern about

[issue25813] co_flags section of inspect module docs out of date

2016-01-04 Thread Yury Selivanov
Changes by Yury Selivanov : -- superseder: -> document CO_* constants ___ Python tracker ___

[issue26009] HTMLParser lacking a few features to reconstruct input exactly

2016-01-04 Thread Jason Sachs
Jason Sachs added the comment: sample file attached containing VerbatimParser -- Added file: http://bugs.python.org/file41496/test2.py ___ Python tracker

[issue26009] HTMLParser lacking a few features to reconstruct input exactly

2016-01-04 Thread Jason Sachs
New submission from Jason Sachs: The HTMLParser class (https://docs.python.org/2/library/htmlparser.html) is lacking a few features to reconstruct input exactly. For the most part it can do this, but I found two items where it falls short (there may be others): - There is a

[issue17394] Add slicing support to collections.deque

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

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Phil Thompson
Phil Thompson added the comment: The problem is the import of the encodings module in _PyCodecRegistry_Init(). -- ___ Python tracker ___

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Phil Thompson
New submission from Phil Thompson: The use case is a packaging tool that can create a single executable for a Python application. Like similar tools it embeds frozen Python code (including the standard library) and is linked (often statically) against the interpreter library. Executables are

[issue17394] Add slicing support to collections.deque

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

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Paul Moore
Paul Moore added the comment: Why is it too late to install a new importer to sys.path_hooks when zipimport is installed? As far as I am aware, running the stdlib from a zipfile works fine, which seems to be equivalent to your use case. -- nosy: +paul.moore

[issue17006] Add advice on best practices for hashing secrets

2016-01-04 Thread Ramchandra Apte
Ramchandra Apte added the comment: It is good to add warnings; if they are ignored it is little worse than the status quo. On 1 January 2016 at 08:54, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > > People are going to skip warning boxes if they occur too

[issue26007] Request for Support for Embedding the Standard Library in an Executable

2016-01-04 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: So the use case is that you want to explicitly prevent the file system from being used for imports ? You might want to look at how eGenix PyRun works, since this does embed the Python stdlib into the executable (including the encodings package). While it