[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.
Ent added the comment: @demian: That's a tall order! :) I would love to use HTTPStatus but for some reason http/__init__.py is devoid of code related to it - https://hg.python.org/cpython/file/31982d70a52a/Lib/http/__init__.py I wasn't sure why this change was made because it like feels a step backwards. Will someone else be reverting it back or should I just include it in this patch or create another one? As for rest of your comments, I will make the necessary changes and put up next patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23223] subprocess32 unable to be installed via pip
Marat Mavlyutov added the comment: HI! need that thingie too, did you poke the author? cant find issue tracker at code.google.com -- nosy: +Marat.Mavlyutov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23223 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23300] httplib is using a method that doesn't exist
Senthil Kumaran added the comment: Addressed Berker's review comments. 1) Made the TestServer a Mixin. (Thanks, that's the correct to do). 2) Changed Post to Port. 3) I went with still using a testdomain and port in the constructor. My idea of the test is to demonstrate that the connect(host,port) is used when given rather than HTTP(host,port). -- Added file: http://bugs.python.org/file37828/23000-v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.
Berker Peksag added the comment: I would love to use HTTPStatus but for some reason http/__init__.py is devoid of code related to it - https://hg.python.org/cpython/file/31982d70a52a/Lib/http/__init__.py See the default branch: https://hg.python.org/cpython/file/default/Lib/http/__init__.py -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23152] fstat64 required on Windows
Steve Dower added the comment: Yeah, that's the sole buildbot currently running VS 2015. I'm expecting to have more after VS 2015 RC is released, since that will be basically finished. Until then, I'm also regularly building with the latest internal versions and tracking issues, but nothing seems to have been introduced since Preview, so that buildbot is a very good guide. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23152 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.
Demian Brecht added the comment: Thanks for the work! I'm not sure why the last patch doesn't appear on Rietveld, so (unfortunately) here's the result of my review. I've only covered functional aspects in this run at it: +base_files = ['index.html', 'index.htm'] Can you use index_files? That's the commonly used term to refer to these files. -def copyfile(self, source, outputfile): +def copy_file(self, source, outputfile): As Berker mentioned, we can't just rename this as it's not backwards compatible. Standard library modules aren't the only dependency. Such a change would cause breakage in, say, any 3rd party code that subclasses SimpleHTTPRequestHandler. This should remain as copyfile. +def redirect_browser(self, path, parts): Can _browser be dropped here? This applies to all clients, not only browsers. Additionally, I think that the name is a little misleading. I think it would be better to have a generic public redirect(url, status=http.FOUND) method and then an internal _resolve_path() that calls into the redirect method using the Apache-like logic. It also seems like the path parameter is unused so should be dropped. +def get_path_or_dir(self, path): I think the content of this method should be changed to result in consistent output. Right now, you're either returning a file path /or/ a BytesIO object containing the full output of the directory listing. It might make sense to have a single method that takes the path and produces consistent BytesIO object, regardless of whether it's a directory or a file path. +self.send_response(301) Please use the http.HTTPStatus enum for status codes (i.e. http.HTTPStatus.MOVED_PERMANENTLY) +def apply_headers(self, f, path) I don't think that this makes sense as a public API as it is as it only accounts for a 200 response. What if any error conditions are raised with the given file? As this is functionality specific to the single case in which it's used, I think this should either be left as-is, made more generic to handle header values based on any potential state of the file object, or made into a private helper method (indicated by a single underscore prefix to the method name). Also, you should be able to derive the path from the file parameter (f.name), so I'm not sure that the extra path parameter is necessary. +def get_response(self, tail=False) tail should default to None here, otherwise it's a little confusing as to why a parameter that /looks/ like it should be a bool actually expects a string value. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1681974] mkdtemp fails on Windows if username has non-ASCII character
Martin v. Löwis added the comment: Ubik: this issue is closed, as we believe that it does not exist anymore. If you still think there is a bug surrounding mkdtemp, please make a new full bug report. Structure your report as follows: 1. this is what you did 2. this is what happened 3. this is what you expected to happen instead Be as precise as possible. For example, reporting the exact user name of the user might be helpful. If you can, debug the problem, e.g. by arranging to display the value of 'path' and 'b' in line 102 of ntpath.py (assuming the error still occurs on the same line as it did for Markus). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1681974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.
Ent added the comment: @demian: If you don't mind, could you please elaborate a bit more on `_resolve_path()` you mentioned in the review/comment? Or maybe link me to the type of behaviour you mentioned? I will accordingly make the changes. As for self.apply_headers, I will see if I can make it more generic. As it stands, I have tried not to make any radical changes in existing logic; This being my first patch and all. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23300] httplib is using a method that doesn't exist
Berker Peksag added the comment: LGTM. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23207] logging.basicConfig does not validate keyword arguments
Roundup Robot added the comment: New changeset 2bc3e839a3a3 by Vinay Sajip in branch '3.4': Issue #23207: logging.basicConfig() now does additional validation of its arguments. https://hg.python.org/cpython/rev/2bc3e839a3a3 New changeset 06ba5e776a6e by Vinay Sajip in branch 'default': Closes #23207: logging.basicConfig() now does additional validation of its arguments. https://hg.python.org/cpython/rev/06ba5e776a6e -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23207 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23305] RotatingFileHandler does not rotate if backupCount is 0
Juha Lemmetti added the comment: What You point out is true. However, I saw a bug in code where RotatingFileHandler was used, and I had to check the operation using a small test program. For maxBytes, it is explicitly stated that when the value is 0, rollover never occurs. It wouldn't hurt to have the same text for backupCount in the documentation, just for clarity. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23305 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Benjamin Peterson added the comment: On Fri, Jan 23, 2015, at 15:36, Antoine Pitrou wrote: Antoine Pitrou added the comment: Well, sure, but that means you plan to make it available in 3.4.3? Why is that? No, I'll apply it to 3.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.
Demian Brecht added the comment: @demian: If you don't mind, could you please elaborate a bit more on `_resolve_path()` you mentioned in the review/comment? Sure. In your patch, you have redirect_browser (or redirect if you renamed it), which sounds like it's allowing for a very generic event to happen: executing a redirect based on a passed in path. What I would expect from calling into this is that the input path would be used as the Location header in the resulting response. For example (using the code as-is): self.redirect_browser('http://example.com/foo/bar/') The above would result in the response Location header being set to input URL. What it's actually doing is a very specific thing: Redirection if the final char in the input URL is '/', which is something that I don't think needs to be exposed as part of the public API. So, my recommendation is to do something like this: def redirect(self, url, status=http.HTTPStatus.FOUND): self.send_response(status) self.send_header('Location', url) self.end_headers() Add a private helper method: def _resolve_path(self, url): parts = urllib.parse.urlsplit(url) [...snip...] return new_path_with_appended_slash And in the body of send_head, do something like: resolved_path = self._resolve_path(path) if path != resolved_path: self.redirect(resolved_path) As it stands, I have tried not to make any radical changes in existing logic; This being my first patch and all. The tough thing with adding public API in general is that you have to consider both API readability as well as various use cases, not only the one that you're specifically writing code for. To make your first patch a little easier, you /could/ change the public API methods that you've added to private helper methods and rename them as it makes sense. At least in that way, you don't need to worry about making the methods generic and writing tests for each where functionality is enhanced. In reality, it seems that that's exactly what you're trying to achieve: Helper methods where you're grouping logical bodies of code rather than a full blown public API change (but I could be misunderstanding your intentions there). Hope that all makes sense. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Antoine Pitrou added the comment: Why is that 3.4.3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Benjamin Peterson added the comment: Here you are. -- keywords: +patch nosy: +benjamin.peterson stage: needs patch - patch review Added file: http://bugs.python.org/file37829/alpn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Benjamin Peterson added the comment: Here's the fixed 3.5 patch. -- Added file: http://bugs.python.org/file37830/alpn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Antoine Pitrou added the comment: Well, sure, but that means you plan to make it available in 3.4.3? Why is that? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23202] pyvenv does not fail like documented when a venv already exists
Vinay Sajip added the comment: The behaviour was changed in 3.4 in response to #15776, but the documentation wasn't updated to match. I will update the docs to remove the reference to the error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23202 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23305] RotatingFileHandler does not rotate if backupCount is 0
Vinay Sajip added the comment: The default parameters for backupCount and maxBytes are both shown as 0. The first paragraph ends with By default, the file grows indefinitely. The second paragraph says, If backupCount is non-zero, the system will save old log files by appending the extensions ‘.1’, ‘.2’. Together, these should indicate that the file will grow indefinitely (and not rotate) if backupCount is left at 0. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23305 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23223] subprocess32 unable to be installed via pip
Gregory P. Smith added the comment: I can apply this to subprocess32 but it is going to look much more like: +#ifndef MS_WINDOWS /* WTF is anyone compiling on Windows? Shouldn't work! */ +# define HAVE_UNISTD_H 1 +#endif +#ifdef HAVE_UNISTD_H #include unistd.h +#endif The real question is why do you need it? _posixsubprocess.c makes no sense to compile on Windows as far as I understand it. subprocess32 in its entirety makes no sense to use on Windows as nobody is testing, maintaining or updating the Windows side of its code. The module backport was created for reliable use on POSIX platforms where the existing python 2.x subprocess module falls short. I recommend: try: import subprocess32 as subprocess except ImportError: import subprocess OR if sys.platform.startswith('win'): import subprocess else: import subprocess32 as subprocess in cross platform code that needs to run on Windows. BTW, anyone know what update do I need to make to setup.py and its PIP categorization to mark it as unavailable on Windows? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23223 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Benjamin Peterson added the comment: On Fri, Jan 23, 2015, at 15:33, Antoine Pitrou wrote: Antoine Pitrou added the comment: Why is that 3.4.3? I wrote the patch on the 3.4 branch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23202] pyvenv does not fail like documented when a venv already exists
Roundup Robot added the comment: New changeset a3a44d871d70 by Vinay Sajip in branch 'default': Closes #23202: pyvenv documentation updated to match its behavior. https://hg.python.org/cpython/rev/a3a44d871d70 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23202 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23223] subprocess32 unable to be installed via pip
Changes by Gregory P. Smith g...@krypto.org: -- assignee: - gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23223 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1060] zipfile cannot handle files larger than 2GB (inside archive)
Changes by Gregory P. Smith g...@krypto.org: -- assignee: gregory.p.smith - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1060 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Benjamin Peterson added the comment: update after review comments -- Added file: http://bugs.python.org/file37831/alpn.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Roundup Robot added the comment: New changeset be9fe0c66075 by Benjamin Peterson in branch 'default': add support for ALPN (closes #20188) https://hg.python.org/cpython/rev/be9fe0c66075 New changeset 7ce67d3f0908 by Benjamin Peterson in branch '2.7': pep 466 backport of alpn (#20188) https://hg.python.org/cpython/rev/7ce67d3f0908 -- nosy: +python-dev resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23305] RotatingFileHandler does not rotate if backupCount is 0
Roundup Robot added the comment: New changeset 0375eb71d75e by Vinay Sajip in branch '2.7': Issue #23305: clarified RotatingFileHandler documentation. https://hg.python.org/cpython/rev/0375eb71d75e New changeset 93888975606b by Vinay Sajip in branch '3.4': Issue #23305: clarified RotatingFileHandler documentation. https://hg.python.org/cpython/rev/93888975606b New changeset 67ebf7ae686d by Vinay Sajip in branch 'default': Closes #23305: Merged documentation fix from 3.4. https://hg.python.org/cpython/rev/67ebf7ae686d -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23305 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20188] ALPN support for TLS
Changes by Antoine Pitrou pit...@free.fr: -- assignee: - benjamin.peterson stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23282] Slightly faster set lookup
Serhiy Storchaka added the comment: Good point Josh. Yes, it may slow down other cases, and there is a difference between sets and dicts. 1. If the key is not contained in the set, then if the first tested entry table[hash mask] is empty, then the lookup is slowed down by one pointer comparison (2 comparisons instead of 1). If the entry is used then the lookup is not slow downed or even speed up (if need to test more than one additional entries). 2. If the same case is in the set, then if the first tested entry is the set then the lookup will use one comparison instead of 4. In other cases (the key is placed in other entry) the lookup will use at least one comparison less. 3. If the set contains key equal but not identical to tested key, then the lookup will use at least one comparison less. Only first case can cause slowdown. If we test a lot of keys not existing in the set with small ratio between used and allocated entries numbers. May be the worst case is creating a copy of the set. For other operations I did not find significant difference. $ ./python -m timeit -s s = set(range(10**4)) -- frozenset(s) Unpatched: 1000 loops, best of 3: 658 usec per loop Patched: 1000 loops, best of 3: 668 usec per loop But issue23290 prevents this regression. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23282 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16648] stdib should use new exception types from PEP 3151
STINNER Victor added the comment: Oh, I didn't know this issue. FYI I modified the subprocess module to use new specialized OSError exceptions: issue #23234 (changeset 0c5ae257966f). -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings
Gregory P. Smith added the comment: This bug prevents zipfile's writestr() from writing large data (longer than UINT_MAX) to a 64-bit zip file. The zlib.crc32 function which, as written, cannot accept input with a size larger than an unsigned int. https://hg.python.org/cpython/file/94ec4d8cf104/Modules/zlibmodule.c#l964 Python 3 has updated this to call the zlib crc32 function multiple times in this situation: https://hg.python.org/cpython/file/93888975606b/Modules/zlibmodule.c#l1210 so the fix exists, we just need to do this in 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23306 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23292] Enum doc suggestion
Ethan Furman added the comment: Currently the way to add an Enum's members to a module's namespace is: globals().update(MyEnumeration.__members__) but that seems quite ugly. Is there anywhere else that the user is required to use __xxx__ methods for common functionality? I think a new method, export_to(), would solve the problem much more nicely: @classmethod def export_to(cls, namespace): try: # assume a dict-like namespace namespace.update(cls.__members__) except AttributeError: # or an object-like namespace for name, member in cls.__members__.items(): setattr(namespace, name, member) -- nosy: +barry, eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20284] patch to implement PEP 461 (%-interpolation for bytes)
Roundup Robot added the comment: New changeset 8d802fb6ae32 by Ethan Furman in branch 'default': Issue20284: Implement PEP461 https://hg.python.org/cpython/rev/8d802fb6ae32 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20284 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings
Danny Yoo added the comment: Unfortunately, fixing just zlib.crc32 isn't quite enough for our purposes. We still will see OverflowErrow in zipfile if compression is selected. Demonstration code: import zipfile ## Possible workaround: monkey-patch crc32 from binascii?! import binascii zipfile.crc32 = binascii.crc32 content = 'a'*(131) filename = '/tmp/zip_test.zip' zf = zipfile.ZipFile(filename, w, compression=zipfile.ZIP_DEFLATED, allowZip64=True) zf.writestr('big', content) zf.close() zf = zipfile.ZipFile(filename, r, allowZip64=True) print zf.open('big').read() == content # This will raise the following error under Python 2.7.6: # $ python zip_test.py Traceback (most recent call last): File zip_test.py, line 13, in module zf.writestr('big', content) File /usr/lib/python2.7/zipfile.py, line 1228, in writestr bytes = co.compress(bytes) + co.flush() OverflowError: size does not fit in an int # If we use compression=zipfile.ZIP_STORED, we don't see this error, but it kind of misses a major point of using zipfile. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23306 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23306] zlib.crc32 raises OverflowError at argument-parsing time on large strings
New submission from Danny Yoo: Reproduction steps: --- $ python2.7 -c import zlib;zlib.crc32('a'*(131)) Traceback (most recent call last): File string, line 1, in module OverflowError: size does not fit in an int --- We ran into this bug in zlib.crc32 when using zipfile.writestr() with a very large string; as soon as zipfile tried to write the crc checksum, it raised this error. Python 3 does not appear to suffer from this bug. -- components: Library (Lib) messages: 234587 nosy: Danny.Yoo, gregory.p.smith priority: normal severity: normal status: open title: zlib.crc32 raises OverflowError at argument-parsing time on large strings type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23306 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23306] Within zipfile, use of zlib.crc32 raises OverflowError at argument-parsing time on large strings
Changes by Danny Yoo danny...@google.com: -- title: zlib.crc32 raises OverflowError at argument-parsing time on large strings - Within zipfile, use of zlib.crc32 raises OverflowError at argument-parsing time on large strings ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23306 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23282] Slightly faster set lookup
Josh Rosenberg added the comment: Does it slow down other cases? Seems to me like dictionaries would have more existing key lookups than sets to justify the optimization, since they're used for attribute lookup and the like, and because you usually want the value associated with existing keys, where a set would usually be used in a might exist, might not scenario of membership testing. -- nosy: +josh.r ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23282 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23307] python hangs on call to numpy.outer
Jim Bridgewater added the comment: Turns out an outer product of two million element vectors takes up a lot of memory. Go figure. -- resolution: - not a bug ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23307 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23292] Enum doc suggestion
Georg Brandl added the comment: Well, for such operations (namespace manipulation) __dict__ is also often used, so I wouldn't say it's too ugly. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23292 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23307] python hangs on call to numpy.outer
New submission from Jim Bridgewater: python hangs when this script is run and if it is allowed to continue running OS X produces system out of memory errors -- files: dome_projection.py messages: 234593 nosy: jwbwater priority: normal severity: normal status: open title: python hangs on call to numpy.outer type: crash versions: Python 2.7 Added file: http://bugs.python.org/file37833/dome_projection.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23307 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23308] a bug in Instructions section 4.1
New submission from David Motlagh: Hi, I either found a bug or am doing the steps wrong. Could you please check the instructions in Section 4.1 to determine if there really is a syntax error? Thanks,David Motlagh -- messages: 234596 nosy: Dmot priority: normal severity: normal status: open title: a bug in Instructions section 4.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23308 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23237] Interrupts are lost during readline PyOS_InputHook processing (reopening)
Michiel de Hoon added the comment: I am attaching a patch for this bug for Python 2.7. -- keywords: +patch nosy: +mdehoon Added file: http://bugs.python.org/file37832/issue23237.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23237 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22947] Enable 'imageop' - Multimedia Srvices Feature module for 64-bit platform
STINNER Victor added the comment: The module has been deleted in Python 3. The compilation of the module was probably disabled on 64-bit because of bugs. I don't see any bugfix in your patch. changeset: 6448:b854ca4605e1 branch: legacy-trunk user:Guido van Rossum gu...@python.org date:Wed Oct 08 05:05:28 1997 + files: README description: Ready for the release, I'd say. diff -r 31a50468366b -r b854ca4605e1 README --- a/READMEWed Oct 08 04:05:08 1997 + +++ b/READMEWed Oct 08 05:05:28 1997 + (...) +64-bit platforms: The modules audioop, imageop and rgbimg don't work. + Don't try to enable them in the Modules/Setup file. They + contain code that is quite wordsize sensitive. (If you have a + fix, let me know!) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22947 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23300] httplib is using a method that doesn't exist
Berker Peksag added the comment: +class TestServer(TestCase): This can be a mixin. +def testHTTPWithConnectHostPost(self): Post - Port? +self.conn = httplib.HTTP(host=constructor_host, port=constructor_port) or to make the test simpler, self.conn = httplib.HTTP() -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22885] Arbitrary code execution vulnerability due to unchecked eval() call in dumbdbm module
Claudiu Popa added the comment: Thanks, Victor. I thought the same thing, but the file is deleted here already, here: https://hg.python.org/cpython/file/981ba93bcbde/Lib/test/test_dbm_dumb.py#l228 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22885 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23300] httplib is using a method that doesn't exist
Senthil Kumaran added the comment: Here is the patch to fix this. I have added a test case covering this change. Please review this and if it is good to go, I will commit it. Thank you. -- keywords: +patch stage: needs patch - patch review Added file: http://bugs.python.org/file37827/23000.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22885] Arbitrary code execution vulnerability due to unchecked eval() call in dumbdbm module
STINNER Victor added the comment: +with open(_fname + .dir, 'w') as stream: +stream.write(content) I don't see where the created file is deleted. Add something like: self.addCleanup(support.unlink, _fname + .dir) -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22885 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22889] set a timeout for DNS lookups
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net: -- nosy: +piotr.dobrogost ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22889 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23305] RotatingFileHandler does not rotate if backupCount is 0
New submission from Juha Lemmetti: If RotatingFileHandler is initialized with backupCount 0, the file does not rotate but grows indefinitely. This is not self-evident from the documentation. Suggestion: either rotate (discard) the log if backupCount==0 or mention the current operation the documentation. The former leaves the user with only one log message at the worst case. In the latter case, the documentation can be modified to explicitly mention what the result will be if backupCount is left to its default value of 0, i.e. that the RotatingFileHandler will grow the file indefinitely regardless of the value of maxBytes value. The default value for the backupCount could also be modified, as the default value does nothing. Tested with Windows-Python2.7, Linux-Python 3.3.2+ (Ubuntu-14.04). Can be reproduced with a simple logging example with backupCount == 0 and maxBytes 0 -- components: Library (Lib) messages: 234552 nosy: Juha.Lemmetti, vinay.sajip priority: normal severity: normal status: open title: RotatingFileHandler does not rotate if backupCount is 0 type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23305 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21417] Compression level for zipfile
Changes by Florian Berger fber...@florian-berger.de: -- nosy: +fberger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21417 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16648] stdib should use new exception types from PEP 3151
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +refactor subprocess: use new OSError exceptions, factorize stdin.write() code ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11024] imaplib: Time2Internaldate() returns localized strings
Alessio added the comment: Is anybody working with this case? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11024] imaplib: Time2Internaldate() returns localized strings
R. David Murray added the comment: I'm not sure why this issue is still open. It looks like Alexander committed the fix. If you are seeing a problem, I think that would be a new bug, and you should open a new issue giving details on how to reproduce the problem you are seeing. -- stage: needs patch - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11024 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23305] RotatingFileHandler does not rotate if backupCount is 0
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23305 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1681974] mkdtemp fails on Windows if username has non-ASCII character
Ubik added the comment: As detailed in this SO question: http://stackoverflow.com/questions/28101187/deal-with-unicode-usernames-in-python-mkdtemp I still see the issue in 2.7.8. I use a unicode prefix and changing this is not an option (editing legacy code which expects unicode everywhere) Is there some full proof workaround ? Is the one suggested in the OP good enough ? -- nosy: +Ubik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1681974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23300] httplib is using a method that doesn't exist
Demian Brecht added the comment: Other than Berker's comments, LGTM. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23300 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1681974] mkdtemp fails on Windows if username has non-ASCII character
STINNER Victor added the comment: The best fix is to use Python 3. In 2015, it's maybe time to use Python 3 which has a very good Unicode support. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1681974 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21862] cProfile command-line should accept -m module_name as an alternative to script path
Amaury Forgeot d'Arc added the comment: This change will cause the module to be imported twice: progname = runpy.run_module(args[0])['__file__'] ... and then the runctx() call. What about something like: code = runpy.run_module(modname, run_name='__main__') globs = { 'runpy': runpy, 'modname': args[0] } -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21862 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue23302] Small fixes around the use of TCP MSS in http.client
Roundup Robot added the comment: New changeset 42971b769c0b by Benjamin Peterson in branch 'default': http.client: disable Nagle's algorithm (closes #23302) https://hg.python.org/cpython/rev/42971b769c0b -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23302 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com