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
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__):
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;
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
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
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:
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
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
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
Changes by Demian Brecht demianbre...@gmail.com:
--
nosy: +demian.brecht
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23255
___
___
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
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
___
___
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
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'],
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':
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
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:
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
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):
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
___
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
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
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
Changes by Gregory P. Smith g...@krypto.org:
--
nosy: -gregory.p.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3566
___
___
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
Serhiy Storchaka added the comment:
LGTM.
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23280
___
___
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
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
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
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
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
Berker Peksag added the comment:
Good catch, thank you Martin.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20898
___
___
Python-bugs-list
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 %
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
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
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
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
___
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
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
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +pitrou, serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23269
___
___
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
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
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
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
___
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
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
Changes by Jean-Paul Calderone jean-p...@hybridcluster.com:
--
nosy: -exarkun
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1103213
___
___
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
Changes by Berker Peksag berker.pek...@gmail.com:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14218
___
___
Python-bugs-list
Changes by Cesar Kawakami cesarkawak...@gmail.com:
--
nosy: +Cesar.Kawakami
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23275
___
___
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
___
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,
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.
--
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
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
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
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
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
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
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
___
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
___
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
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
___
63 matches
Mail list logo