[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Hi Demian, my intention is to demonstrate normal usage of Python’s HTTP client, whether or not its implementation misbehaves. I am trying to demonstrate a valid persistent server that happens to decide to close the connection after the first request but before

[issue23276] hackcheck is broken in association with __setattr__

2015-01-19 Thread eryksun
eryksun added the comment: super(type, cls).__setattr__(key, value) In your case, super(type, cls).__setattr__ references object.__setattr__. super(type, MyClass).__setattr__.__objclass__ class 'object' That's from the method resolution order (__mro__):

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Calling self.wfile.write(b) should be equivalent to not calling write() at all, as far as I understand. Using strace, it does not seem to invoke send() at all. So the result will depend on what is written next. In the case of my code, nothing is written next;

[issue20702] warning in cmdline.rst

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: I couldn't reproduce it with Sphinx 1.2.3. The only warning I got was Doc/whatsnew/3.4.rst:2138: WARNING: undefined label: idle (if the link has no caption the label must precede a section header) -- nosy: +berker.peksag resolution: - out of date

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Robert Collins
Robert Collins added the comment: FWIW, I agree with the analysis here, its standard HTTP behaviour in the real world, and we should indeed handle it. -- nosy: +rbcollins ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3566

[issue2292] Missing *-unpacking generalizations

2015-01-19 Thread Neil Girdhar
Neil Girdhar added the comment: Updated the patch for 3.5. Currently, building fails with TypeError: init_builtin() takes exactly 1 argument (0 given) This is probably due to an argument counting bug, but I am not sure how to debug it. -- nosy: +neil.g Added file:

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Sorry Martin, I should really not dig into issues like this first thing in the morning ;) My concern about the proposed change isn't whether or not it isn't valid HTTP behaviour, it is. My concern (albeit a small one) is that the change implies an assumption

[issue23278] multiprocessing maxtasksperchild=1 + logging = task loss

2015-01-19 Thread Nelson Minar
New submission from Nelson Minar: I have a demonstration of a problem where the combination of multiprocessing with maxtasksperchild=1 and the Python logging library causes tasks to occasionally get lost. The bug might be related to issue 22393 or issue 6721, but I'm not certain. issue 10037

[issue23277] Cleanup unused and duplicate imports in tests

2015-01-19 Thread Jon Dufresne
New submission from Jon Dufresne: Ran variations of the command: $ find . -wholename '*/test/*.py' | xargs flake8 --select=F401,F811 To look for unused or duplicate imports. The attached patch removes them. -- components: Tests files: cleanup-unused-imports.patch keywords: patch

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-19 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +demian.brecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-19 Thread Robert Collins
Robert Collins added the comment: Stack and Frame looking good, next update will be next Monday, when I finish off my TracebackException class. -- Added file: http://bugs.python.org/file37782/issue17911-1.patch ___ Python tracker

[issue23278] multiprocessing maxtasksperchild=1 + logging = task loss

2015-01-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +sbt, vinay.sajip stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23278 ___ ___

[issue20898] Missing 507 response description

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: Committed now, sorry about the delay. Thanks for the patch, Demian. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23279] test_site/test_startup_imports fails when mpl_toolkit or logilab based modules installed

2015-01-19 Thread Douglas Rudd
New submission from Douglas Rudd: pth files for logilab (e.g. logilab_common, logilab_astng) and mpl_toolkit (e.g. basemap, matplotlib) contain code like the following (taken from basemap 1.0.7): import sys, types, os;p = os.path.join(sys._getframe(1).f_locals['sitedir'],

[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 350b8e109c42 by Berker Peksag in branch '3.4': Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs. https://hg.python.org/cpython/rev/350b8e109c42 New changeset 4709290253e3 by Berker Peksag in branch 'default':

[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 430236ef507b by Berker Peksag in branch '2.7': Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs. https://hg.python.org/cpython/rev/430236ef507b -- ___ Python tracker

[issue22317] action argument is not documented in argparse add_subparser() docs

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Mike. Anne, thank you for the ticket triage! The only missing place was the ArgumentParser.add_subparsers() documentation: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers -- nosy:

[issue20121] quopri_codec newline handling

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Here is patch v2, which fixes some more bugs I uncovered in the quoted-printable encoders: * The binascii version would unnecessarily break a 76-character line (maximum length) if it would end with an =XX escape code * The native Python version would insert

[issue2292] Missing *-unpacking generalizations

2015-01-19 Thread Chris Angelico
Chris Angelico added the comment: The third version of the patch is huge compared to the other two. Is it all important? I'm seeing a different build failure, and with the size of patch, I'm not sure I'm well placed to figure out what's going on. -- cut -- Traceback (most recent call last):

[issue20898] Missing 507 response description

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: No worries, thanks for taking care of merging it Berker. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20898 ___

[issue20898] Missing 507 response description

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset c8647dab4780 by Berker Peksag in branch 'default': Issue #20898: Add a HTTP status codes section to avoid duplication in HTTP docs. https://hg.python.org/cpython/rev/c8647dab4780 -- nosy: +python-dev

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Calling self.wfile.write(b) should be equivalent to not calling write() at all, as far as I understand. Right (or at least, as I understand it as well). Really, this boils down to a philosophical debate: Should the standard library account for unexpected

[issue23277] Cleanup unused and duplicate imports in tests

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: +1 for cleanup. -- nosy: +berker.peksag stage: - patch review versions: +Python 3.4, Python 3.5 -Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23277

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- nosy: -gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3566 ___ ___

[issue23281] Access violation - pyc file

2015-01-19 Thread Paweł Zduniak
New submission from Paweł Zduniak: (950.e58): Access violation - code c005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. *** ERROR: Symbol file could not be found. Defaulted to export symbols for

[issue23280] Convert binascii.{un}hexlify to Argument Clinic (fix docstrings)

2015-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23280 ___ ___

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Yeah I’m happy to put a patch together, once I have an idea of the details. I’d also like to understand your scenario that would mislead the user to believe that the connection has been closed when it actually hasn’t. Can you give a concrete example or

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread R. David Murray
R. David Murray added the comment: I think that in other stdlib networking modules, a connection closed error is raised when an operation is attempted on a closed connection. For example, in smtplib, the server may return an error code and then (contrary to the RFC) close the connection. We

[issue23280] Convert binascii.{un}hexlify to Argument Clinic (fix docstrings)

2015-01-19 Thread Zachary Ware
New submission from Zachary Ware: The Argument Clinic conversion of the binascii module left hexlify and unhexlify with bad docstrings: hexlify(...) b2a_hex($module, data, /) -- Hexadecimal representation of binary data. The return value is

[issue20898] Missing 507 response description

2015-01-19 Thread Martin Panter
Martin Panter added the comment: Just noticed the new documentation says “http.HTTPStatus.OK is also available as . . . http.server.OK”. I think this is wrong; only the client module (and now the top-level package) have those constants. The enum values are only available in the server module

[issue20898] Missing 507 response description

2015-01-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3a95a74aca4e by Berker Peksag in branch 'default': Issue #20898: Enum names are only available in the http.client module as constants. https://hg.python.org/cpython/rev/3a95a74aca4e -- ___ Python

[issue20898] Missing 507 response description

2015-01-19 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thank you Martin. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20898 ___ ___ Python-bugs-list

[issue23276] hackcheck is broken in association with __setattr__

2015-01-19 Thread Alfred Krohmer
New submission from Alfred Krohmer: The following code: import traceback import sys from PyQt5.QtCore import Qt class MetaA(type): pass class A(metaclass=MetaA): pass class MetaB(type): pass class B(metaclass=MetaB): pass for ClassB in B, Qt: print(Trying class %s %

[issue23271] Unicode HOWTO documentation error

2015-01-19 Thread Eric V. Smith
Eric V. Smith added the comment: The example is correct. If you type it into a python interpreter, you get the results as shown in the example. The .replace() method does not modify the string s. It returns the new value. In the example, the new value is displayed, but is not assigned back to

[issue23271] Unicode HOWTO documentation error

2015-01-19 Thread Dionysis Zindros
New submission from Dionysis Zindros: In the Unicode HOTWO documentation for Python 2.x [0], there's an error in the fourth code sample under the section The Unicode Type. The code states: ``` s = u'Was ever feather so lightly blown to and fro as this multitude?' s.count('e') 5

[issue23272] Python built-in comparison problem

2015-01-19 Thread Lukáš Němec
Changes by Lukáš Němec lu.ne...@gmail.com: -- nosy: Lukáš.Němec priority: normal severity: normal status: open title: Python built-in comparison problem ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23272

[issue23272] Python built-in comparison problem

2015-01-19 Thread Lukáš Němec
Changes by Lukáš Němec lu.ne...@gmail.com: -- resolution: - not a bug status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23272 ___

[issue7665] test_urllib2 and test_ntpath fail if path contains \

2015-01-19 Thread Senthil Kumaran
Senthil Kumaran added the comment: I reviewed the patch Serhiy. It looks good to me, You can go ahead and commit. Thanks! -- assignee: orsenthil - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7665

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Raymond Hettinger
New submission from Raymond Hettinger: First draft of patch to switch from a table[(i+j)mask] style of entry calculation to an entry++ style. The entry computation simplifies from add/shl4/and/lea to a single add16. To do this, the linear probes are limited to the length of table rather

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +pitrou, serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___ ___

[issue23228] Crashes when tarfile contains a symlink and unpack directory contain it too

2015-01-19 Thread Michael Vogt
Michael Vogt added the comment: Thanks SilentGhost for your feedback and sorry for my slow reply. I looked into this some more and attached a updated patch with a more complete test. It also covers a crash now that happens when there is a symlink cycle in the tar and on disk. My fix is to

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-01-19 Thread STINNER Victor
New submission from STINNER Victor: In CPython, almost all memory allocations are protected against integer overflow with code looking like that: if (length ((PY_SSIZE_T_MAX - struct_size) / char_size - 1)) { PyErr_NoMemory(); return NULL; } new_size = (struct_size

[issue23217] help() function incorrectly captures comment preceding a nested function

2015-01-19 Thread anupama srinivas murthy
anupama srinivas murthy added the comment: In Python 2.7, the capture happens even if there is no decorator. The code: #Hey this is f def f(): return help(f) gives the output: Help on function f in module __main__: f() #Hey this is f whereas a docstring inside the function causes the

[issue23270] Use the new __builtin_mul_overflow() of Clang and GCC 5 to check for integer overflow

2015-01-19 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- components: +Interpreter Core nosy: +serhiy.storchaka type: - performance ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23270 ___

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: I'm not sure whether or not this was your intention, but your example demonstrates a misbehaving client, one that seems to expect a persistent connection from a non-persistent server. TCPServer will only serve a single request and will shutdown and close

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-19 Thread Zach Welch
Zach Welch added the comment: Yes, pe-i386 and pe-x86-64 are the respective 32-bit and 64-bit object formats. Your commands seem reasonable. With gendef, I just let it create a .def file with the same name (i.e. skip the '-' and redirection); in my mind, that reinforces the association

[issue1103213] Adding the missing socket.recvall() method

2015-01-19 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone jean-p...@hybridcluster.com: -- nosy: -exarkun ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1103213 ___ ___

[issue3566] httplib persistent connections violate MUST in RFC2616 sec 8.1.4.

2015-01-19 Thread Demian Brecht
Demian Brecht added the comment: Hi Martin, Thanks for the example code. I'm not sure whether or not this was your intention, but your example demonstrates a misbehaving client, one that seems to expect a persistent connection from a non-persistent server. TCPServer will only serve a single

[issue14218] include rendered output in addition to markup

2015-01-19 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- keywords: +easy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14218 ___ ___ Python-bugs-list

[issue23275] Can assign [] = (), but not () = []

2015-01-19 Thread Cesar Kawakami
Changes by Cesar Kawakami cesarkawak...@gmail.com: -- nosy: +Cesar.Kawakami ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23275 ___ ___

[issue23275] Can assign [] = (), but not () = []

2015-01-19 Thread R. David Murray
R. David Murray added the comment: My guess is that it is not worth complicating the parser in order to make these two cases consistent, and it should be treated as a doc error. We'll see what other developers think. -- nosy: +r.david.murray ___

[issue23273] traceback: formatting a traceback stats the filesystem

2015-01-19 Thread Robert Collins
New submission from Robert Collins: Discovered in issue 17911, all the traceback calls that render a stack trace end up calling linecache.checkcache, which stats files on disk, making getting a traceback rather more expensive than folk may expect. For oops, it crashed situations thats fine,

[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2015-01-19 Thread Robert Collins
Robert Collins added the comment: I've split out the stat question to http://bugs.python.org/issue23273 - we can optimise it slightly in this patch, but I think its scope creep here, and will be unclear, to dive after a full fix in this issue. --

[issue23274] make_ssl_data.py in Python 2.7.9 needs Python 3 to run

2015-01-19 Thread Michael Schlenker
New submission from Michael Schlenker: The make_ssl_data.py script in Tools/ssl/ needs a python3 to run due to the usage of open(..., encoding='latin1'). This makes usage on a host without python3 installed more complex than needed. It should use io.open(...) to run on both python3 and

[issue23274] make_ssl_data.py in Python 2.7.9 needs Python 3 to run

2015-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: That shouldn't be very important. The already-generated _ssl_data.h in the distribution should be enough. -- nosy: +alex, pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23274

[issue23274] make_ssl_data.py in Python 2.7.9 needs Python 3 to run

2015-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yesterday I've regenerated _ssl_data.h with the latest OpenSSL git, so that should suit you. Be sure to update your hg clone of Python. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23274

[issue23274] make_ssl_data.py in Python 2.7.9 needs Python 3 to run

2015-01-19 Thread Michael Schlenker
Michael Schlenker added the comment: yes, priority is probably low. Just stumbled over it when building against openssl 1.0.1L and trying to regen the datafile automatically in a build script. -- versions: +Python 2.7 ___ Python tracker

[issue23275] Can assign [] = (), but not () = []

2015-01-19 Thread Devin Jeanpierre
New submission from Devin Jeanpierre: [] = () () = [] File stdin, line 1 SyntaxError: can't assign to () This contradicts the assignment grammar, which would make both illegal: https://docs.python.org/3/reference/simple_stmts.html#assignment-statements -- components: Interpreter

[issue23275] Can assign [] = (), but not () = []

2015-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: The starting point is recognizing that this has been around for very long time and is harmless. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23275

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file3/measure_build_set.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: Added file: http://bugs.python.org/file37776/limit2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: Patch timings give inconsistent results. GCC-4.9 generates faster code and CLang generates slower code :-( -- Added file: http://bugs.python.org/file37775/timings.txt ___ Python tracker rep...@bugs.python.org

[issue23269] Tighten-up search loops in sets

2015-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Either way the improvement doesn't look terrific, so I would suggest not to bother with this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23269 ___