Martin Panter added the comment:
Regarding the compressed data generator, it would be better if there were no
restrictions on the generator yielding empty chunks. This would match how the
upload “body” parameter for HTTPConnection.request can be an iterator without
worrying about empty
Martin Panter added the comment:
I prefer Cornelius’s current proposal (rev 4f8137b) because it fixes both
sites, rather than just patching the immediate problem site.
I don’t think read(1) is a big problem, just less efficient. But if you prefer
to do larger reads, that should be fine too
Martin Panter added the comment:
The change in handling KeyboardInterrupt was my intention in Issue 23430. I
hope it isn’t a problem on its own :)
Running the module with “python -m http.server” uses the HTTPServer class,
based on socketserver.TCPServer. This only accepts one connection at a
Martin Panter added the comment:
.
Actually take back a lot of what I wrote above. I forgot that
SimpleHTTPRequestHandler only supports HTTP 1.0; I don’t think it uses
keep-alive or persistent connections, so it should close its TCP connections
promptly. There may be something else going on
Change by Martin Panter :
--
Removed message: https://bugs.python.org/msg303440
___
Python tracker
<https://bugs.python.org/issue31639>
___
___
Python-bugs-list m
Martin Panter added the comment:
There’s already a bug open for this: Issue 19251. Only equal-length strings
should be supported.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue31
Martin Panter added the comment:
Presumuing your file descriptor 3 is the read end of the pipe to the child’s
output, then there is probably a process somewhere that could still write to
the write end. Normally “check_output” waits until it has read all possible
output from the pipe(s
Martin Panter added the comment:
Scanning over the Open SSH commits for 7.3p1
https://github.com/openssh/openssh-portable/compare/V_7_2_P2...V_7_3_P1
it looks like this commit
https://github.com/openssh/openssh-portable/commit/d2d6bf864e52af8491a60dd507f85b74361f5da3
may fix your problem
Martin Panter added the comment:
Looks the same as Issue 31374
--
nosy: +martin.panter
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> expat: warning: "_POSIX_C_SOURCE" redefined
___
Martin Panter added the comment:
Sorry, I meant Net BSD not Free BSD
--
___
Python tracker
<https://bugs.python.org/issue31800>
___
___
Python-bugs-list mailin
Martin Panter added the comment:
FWIW it looks like “strptime” in glibc, and Open and Free BSD support parsing
this and even more formats (RFC 822 and RFC 3339; includes “Z”, U.S. time
zones, ±HH). Also, there is Issue 24954 for adding “%:z” like Gnu “date”.
--
nosy: +martin.panter
Martin Panter added the comment:
The patches would mask an OSError raised by the “readfp” call, which would be a
change in behaviour. But moving the call does not seem to be necessary; why not
leave it outside the “try” statement?
--
nosy: +martin.panter
Martin Panter added the comment:
Closing because I understand it is too late to do anything for 3.5 now.
--
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Martin Panter added the comment:
I’m unlikely to soon, but I don’t mind if someone else uses my patch.
--
___
Python tracker
<https://bugs.python.org/issue22
Martin Panter added the comment:
Ken Kundert started a related discussion a while back on Python-ideas:
<https://www.mail-archive.com/search?l=mid&q=20160830203427.ge2...@kundert.designers-guide.com>.
This was about SI-prefixed units in general; not restricted to bytes. Also,
t
Martin Panter added the comment:
Are you sure it is a “system” bug? As far as I understand, at least Posix does
not require support for local time before 1970. See
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16>.
But why is localtime(14400) relevan
New submission from Martin Ritter :
Hi,
I tried to use
subprocess.run(..., stdout=subprocess.PIPE, timeout=N)
to run some test scripts with a given timeout.
This works as expected with simple scripts. However if the script itself
creates other children which write to stdout then
Martin Panter added the comment:
This proposal sounds like a race condition. Closing the output pipe as a child
exits means you risk missing recent output. On the other hand, if you don’t
care about the output any more, close the pipe first and then wait for the
child.
Related discussions
Martin Panter added the comment:
Issue 31945 proposes adding a “blocksize” parameter to HTTPConnection objects,
so I suggest to closing in favour of that one.
--
resolution: -> rejected
superseder: -> Configurable blocksize in HTTP(S)Conn
Martin Panter added the comment:
I find the model in terms of “bit_length” hard to understand. You have to
understand what bit_length returns, and why you added 1. Bit_length is awkward
for negative numbers. It only uses the absolute value, which would give
off-by-one problems with negative
Martin Panter added the comment:
https://github.com/python/cpython/pull/4283 adds a secondary timeout, which
defaults to 1 s when there is no main timeout. But this seems complicated and
arbitrary. As I understand, the main use case discussed here was waiting
without a timeout for a child
Martin Panter added the comment:
The documentation says “On . . . destruction of the temporary directory object
the newly created temporary directory and all its contents are removed”. If you
had enabled warnings, you may have seen a hint:
$ python -Wdefault -c 'import tempfile;
Change by Martin Panter :
--
nosy: +serhiy.storchaka
resolution: wont fix -> not a bug
stage: -> resolved
___
Python tracker
<https://bugs.python.org/i
Martin Panter added the comment:
Perhaps you can compress the tar file using the “gzip.GzipFile” class. It
accepts a custom “mtime” parameter (see Issue 4272, added in 2.7 and 3.1+):
>>> gztar = BytesIO()
>>> tar = GzipFile(fileobj=gztar, mode="w", mtime=0)
>&g
Martin Panter added the comment:
This looks the same as Issue 25259. The trigger is that multiple lines are
generated at the same time, but Python only expects the first line.
--
nosy: +martin.panter
resolution: -> duplicate
stage: -> resolved
status: open -> closed
s
New submission from Martin Drawitsch :
I think I found a bug in the new print syntax suggestion introduced by
https://bugs.python.org/issue30597.
When the following code is executed by Python 3.6.3 inside of a .py file:
def f():
print '%d' % 2
, then Python gives the
Martin Panter added the comment:
If it helps, here is a basic test case I wrote for “pty.spawn”. I hope that it
exposes the problem on Free BSD, but I have only tested it on Linux.
parent = r'''\
import pty, sys
pty.spawn((sys.executable, "-c", sys.argv[1]))
Martin Panter added the comment:
Victor opened Issue 32128 with the same complaint. I think I found the
offending article:
>>> server = NNTP_SSL("nntp.aioe.org")
>>> [response, count, first, last, name] = server.group("comp.lang.python")
>>>
Martin Panter added the comment:
Issue 11671 is closely related and has a patch proposing to ban control
characters including CRLF (but not spaces).
Also see Issue 22928 which added header field validation to the HTTP client
module.
--
dependencies: +Security hole in
Change by Martin Panter :
--
type: -> security
___
Python tracker
<https://bugs.python.org/issue30458>
___
___
Python-bugs-list mailing list
Unsubscrib
Martin Panter added the comment:
The square □ in the strings represents a space.
Issue 1 (CRLF in HTTP request path): it looks like the %0D%0A would have to be
decoded by an earlier step in the chain to "http://127.0.0.1:25/\r\nHELO . .
.". This becomes like the header injection I
Martin Panter added the comment:
Actually, the CRLF + space can be injected via percent encoding, so just
dealing with literal CRLFs and spaces wouldn’t be enough. You would have to
validate the hostname after it is decoded.
urlopen("http://127.0.0.1%0D%0A%20SLAVEOF . . .
Martin Panter added the comment:
The first two bugs ("foo/dir?baz" and "foo/dir?baz/") were solved by Issue
23112. The third (".../foo.html/") was solved by Issue 17324.
That leaves the fourth complaint, which I don’t understand: ‘translate_path()
does not
Martin Panter added the comment:
Maybe a good fix would be to “escape” the double slash with “/.”:
if os.path.isdir(path):
url = self.path
if url.startswith('//'): # E.g. "//www.python.org/%2f.."
url = "/." + url # Becomes "
Martin Panter added the comment:
I read in PEP 11 that Mac OS 9 support was dropped in Python 2.4.
I agree that eliminating “.” and “..” components makes sense, since that is how
they should be handled when resolving relative URLs. But it seems low priority,
since this doesn’t happen on
Martin Panter added the comment:
The doc string for the result object, and the main Python 2 documentation, both
say that the result is a 10-tuple. So perhaps any new field should only be an
attribute, and the tuple should stay the same size, to maintain compatibility.
This was done in other
Martin Richard added the comment:
FWIW, PyOpenSSL allows to load certificates and keys from a memory buffer and
much more. It's also fairly easy to switch from ssl to PyOpenSSL.
It's probably a viable alternative in many cases.
--
Martin Panter added the comment:
Issue 32185 proposes to stop sending IP addresses in the TLS SNI protocol.
Maybe this will help; it depends if it will catch IP address strings with with
whitespace or if there are other ways to inject invalid hostnames.
--
dependencies
Martin Panter added the comment:
Michael Felt: if you still want the code compatible with Python 2 and 3 (and
others are happy with that), I suggest documenting that in a code comment.
--
___
Python tracker
<https://bugs.python.org/issue26
Martin Panter added the comment:
The new “finditer” behaviour seems to contradict the documentation about
excluding empty matches if they touch the start of another match.
>>> list(re.finditer(r"\b|:+", "a::bc"))
[, , , , ]
An empty match at (1, 1) is incl
Martin Panter added the comment:
FWIW I find Mark’s suggestion pretty good:
“Each bitwise operation has the same result as though carried out in two's
complement using a bit-width that's large enough to represent the inputs.”
--
___
Pyth
Martin Panter added the comment:
P-ganssle seems to be proposing to limit parsing to exactly what
“datetime.isoformat” produces; i.e. whole number of seconds, milliseconds or
microseconds. Personally I would prefer it without this limitation, like in
Mathieu’s patches. But P-ganssle has done
Martin Panter added the comment:
The other difference is Mattieu guarantees ValueError for invalid input
strings, which I think is good.
--
___
Python tracker
<https://bugs.python.org/issue15
Martin Panter added the comment:
Similar changes were made in Issue 32150 and PR 3892 (tabs) and Mercurial
revision 98d1788c905c (trailing space and indentation). All the other tabs in
these patches appear to have been removed with other work: #29524, #31891,
#30747, #31373, PR 4275, #25658
Change by Martin Panter :
--
superseder: -> add exist_ok to shutil.copytree
___
Python tracker
<https://bugs.python.org/issue32247>
___
___
Python-bugs-lis
Change by Martin Panter :
--
dependencies: +Online doc does not include inspect.classify_class_attrs
___
Python tracker
<https://bugs.python.org/issue17
Martin Panter added the comment:
Regarding Matthieu’s RFC 3339 parser, Victor wanted to use the
round-half-to-even rule to get a whole number of microseconds. But considering
the “time” class cannot represent 24:00, how do you round up in the extreme
case past 23:59?
time.fromisoformat(&qu
Martin Panter added the comment:
Not if the time is associated with a particular day. Imagine implementing
datetime.fromisoformat by separately calling date.fromisoformat and
time.fromisoformat. The date will be off by one day if you naively rounded
2017-12-18 23:59 “up” to 2017-12-18 00:00
Martin Panter added the comment:
This was documented for the “getfullargspec” function in Issue 7422 (long
before “signature” existed). The error message was also clarified in Issue
6905. However IMO the term “Python function” is too subtle and ambiguous.
--
nosy: +martin.panter
New submission from Martin Liska :
The documentation for pathlib.Path.resolve says: "Make the path absolute,
resolving any symlinks."
On Windows, the behavior doesn't always match the first part of the statement.
Example:
On a system with an existing, but empty directory C:\Te
Martin Panter added the comment:
My guess is there is no message because in Python 3, errors are encoded
according to PYTHONIOENCODING. Perhaps it works as you expect if you bypass
sys.excepthook:
$ PYTHONIOENCODING=undefined python -c 'import sys, os; sys.excepthook = lambda
*exc: os.
Martin Panter added the comment:
FWIW a few years ago I wrote a patch for Issue 17546 that documents three
personalities of “locals”, including:
* At the module level, the dictionary returned is the global symbol table, also
returned by :func:`globals`.
--
nosy: +martin.panter
Martin Panter added the comment:
I wrote an incremental base-64 decoder for the "codecs" module in Issue 27799,
which you could use. It just does some preprocessing using a regular expression
to pick four-character chunks before passing the data to a2b_base64. Or maybe
imple
Martin Panter added the comment:
In the server, the send_header("Connection", "close") call sets the
“close_connection” flag. This shuts down the connection once “do_GET” returns.
Without the flag set, the server will wait and read another request.
If you want th
Martin Panter added the comment:
Sorry William, I forgot the client was waiting to read. But I don’t understand
why your Connection field (which comes after the status line) allows the Python
client to read the status line. Perhaps there is some malware scanner,
firewall, or other proxy that
Martin Panter added the comment:
Thanks, although the fact that “Content-Length: 0” doesn’t work kills my theory
about the proxy.
The “close_connection” flag is also a documented public API of Python:
<https://docs.python.org/3/library/http.server.h
Martin Panter added the comment:
FWIW there was documentation in the README about the Setup files, removed in
Subversion r57681 (= Git revision 1c896e3). It looks like it still survives in
the 2.7 version.
--
nosy: +martin.panter
___
Python
Martin Panter added the comment:
Perhaps this can be treated as a duplicate of Issue 31639.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue32
Change by Martin Panter :
--
superseder: HTTPServer can't deal with persistent connection properly ->
http.server and SimpleHTTPServer hang after a few requests
___
Python tracker
<https://bugs.python.org
Martin Panter added the comment:
Looks like you want to use a "readinto" method to reduce data copying.
One problem is that it is not specified exactly what kind of object
"copyfileobj" supports reading from. The documentation only says "file-like".
Accordi
Martin Panter added the comment:
Maybe this is the same as Issue 28584, about the ${CC} variable rather than
“sysroot”. In any case, the patch looks unrelated.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue33
Martin Panter added the comment:
Don’t forget about updating __all__.
--
___
Python tracker
<https://bugs.python.org/issue12486>
___
___
Python-bugs-list mailin
Martin Panter added the comment:
Sorry I haven’t made a PR for ctypes_v2.patch, but I don’t mind if someone else
takes over. I understand the HAVE_LONG_LONG check may no longer necessary for
newer Python versions.
--
___
Python tracker
<ht
Martin Panter added the comment:
Perhaps your “ctypes” problems may be helped by my ctypes_v2.patch in Issue
1621. Or perhaps they are already documented in Issue 15119 and/or Issue 28169.
--
nosy: +martin.panter
___
Python tracker
<ht
Martin Panter added the comment:
Maybe worth checking if this is fixed due to the changes in Issue 31373 for
3.6+.
--
nosy: +martin.panter
resolution: -> out of date
superseder: -> demoting floating float values to unrepresentable types is
undefined be
Martin Panter added the comment:
I don’t know; I haven’t tested it. I was anticipating that it is fixed, but
perhaps I should leave the resolution alone instead?
--
___
Python tracker
<https://bugs.python.org/issue20
Martin Husemann added the comment:
You need to exit the parent shell, to get the original stdin revoke(2)'d.
That is: the Ctrl-D in the original descritpion is not line noise. Sorry,
should have been more explicit (or used "exit" or so
Martin Panter added the comment:
I presume this is about parsing a URL like
>>> urlsplit("//user:[@host")
Traceback (most recent call last):
File "", line 1, in
File "/home/proj/python/cpython/Lib/urllib/parse.py", line 431, in urlsplit
raise Va
Martin Panter added the comment:
According to Wikipedia, there were 24 leap seconds before Feb 2009. So my guess
is Eitan’s “gmtime” implementation is calculating the date as if the timestamp
(1234567899) includes leap seconds, as in
<https://en.wikipedia.org/wiki/Unix_time#TAI-based_vari
Martin Panter added the comment:
Looks like this is what my thread.patch was fixing in
<https://bugs.python.org/issue1621#msg271057>. You’re welcome to use my patch,
but I won’t have time to work on it myself.
--
nosy: +martin.panter
___
Martin Panter added the comment:
This sounds like the existing bug Issue 31014
--
nosy: +martin.panter
superseder: -> webbrowser._synthesize uses outdated calling signature for
webbrowser.register
___
Python tracker
<https://bugs.pyth
Martin Panter added the comment:
I was making suggestions, not demanding anything. Except for the quirk with
__del__, Gary’s changes (revision fb28362) look okay to add on their own as a
bug fix.
I wouldn’t claim that IOBase is “fully implemented” however, until the return
values for “seek
Martin Panter added the comment:
I think it is an implementation detail whether the result subclasses IOBase or
just implements its API. Why do you want to check the base class, and why
IOBase in particular, rather than BufferedIOBase, RawIOBase, or TextIOBase
Martin Panter added the comment:
What is your use case, Poul-Henning?
It looks like the module has never set the file mode, at least since it was
added to Python in 1994. I suggest just remove the dead code and fix the
documentation. At least you shouldn’t make this change in bug fix
Martin Panter added the comment:
Looks like poor application of a Python 3 patch in Issue 24118. The second
request was meant to be for /parrot.spam.
--
nosy: +benjamin.peterson, martin.panter
___
Python tracker
<https://bugs.python.
New submission from Martin Liska :
When calling asyncio.Server.close, the method calls
asyncio.AbstractEventLoop._stop_serving for each of its sockets in turn.
The implementation of this method in asyncio.ProactorEventLoop calls the
_stop_accept_futures method which seems to cancel "a
Martin Panter added the comment:
It is worth checking if at least the first half of the report was fixed by
Issue 30654
--
nosy: +martin.panter
superseder: -> signal module always overwrites SIGINT on interpreter shutdown
___
Python trac
Martin Panter added the comment:
Issue 33550 was opened about Mike’s case of ignoring broken pipe conditions.
BTW a side effect of closing sys.stderr is that error messages reported by
interpreter shutdown will be missing (even if there was no broken pipe). For
example, exception messages
Martin Panter added the comment:
I doubt it is a race condition. “Waitpid” only returns after the child has
terminated, and the file should be created as the child starts, before it
terminates. Surely it is just the buggy glibc opening the DBDBDB file, when the
test case expects it to create
Martin Panter added the comment:
I think I intended the third option to include all comma-separated lists,
including:
a, b, c = x # No brackets
(a, b, c) = x # Round brackets
[a, b, c] = x # Square brackets
a, = x # Single target with comma
Perhaps something like this would be clearer
Martin Panter added the comment:
I think it is okay to leave out the options for the unpacking case. But I think
it is worth clarifying that the single-target case also applies without
parentheses, but that it doesn’t apply if there is a trailing comma. So:
‘‘‘
If the target list is a single
Change by Martin Scherer :
--
keywords: +patch
pull_requests: +7517
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue24935>
___
___
Py
Change by Martin Panter :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> datetime: add ability to parse RFC 3339 dates and times
___
Python tracker
<https://bugs.python
Change by Martin Panter :
--
superseder: -> make install fails: no module _ctypes
___
Python tracker
<https://bugs.python.org/issue32401>
___
___
Python-
Martin Panter added the comment:
Ctypes is meant to be (at least it used to be) an optional module. If you don’t
actually care about building ctypes, this might be the same as Issue 31652.
Using “configure --without-ensurepip” was suggested as a workaround.
If you do want ctypes to be built
Martin Panter added the comment:
In <https://bugs.python.org/issue32401#msg308926> Chi-Hsuan suggests “configure
--without-ensurepip” as a workaround.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/i
Martin Panter added the comment:
The problem as I understand it is that Msys uses a pipe, but Python by default
limits interactive REPL mode to terminals only. The same thing happens if you
start Python on a pipe some other way, for instance “cat | python” vs “cat |
python -i”.
I would
New submission from Martin Bammer :
Hi,
the old and slow python implementation of pickle didn't block background
thread.
But the newer C-implementation blocks other threads while dump/load is
running.
Wouldn't it be possible to allow other threads during this time?
Especially could
Martin Bammer added the comment:
Maybe an optional parameter with the desired interval would be good idea. So
that the coder can decide if he wants/needs that feature and which interval he
needs for his application.
Otherwise it is hard to define a specific interval which fits for everyone
Change by Martin Panter :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> mingw-meta: build interpeter core
___
Python tracker
<https://bugs.python
Martin Panter added the comment:
Similar to Issue 31882
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue29253>
___
___
Python-bug
Change by Martin Panter :
--
superseder: -> Cygwin: asyncio and asyncore test suites hang indefinitely due
to bug in Cygwin
___
Python tracker
<https://bugs.python.org/issu
Martin Panter added the comment:
Can’t you use Python’s existing CLI
<https://docs.python.org/3.6/using/cmdline.html#cmdoption-w> and environment
variable <https://docs.python.org/3.6/using/cmdline.html#envvar-PYTHONWARNINGS>
to control the ResourceWarning messages?
Warnings w
Martin Panter added the comment:
Closing in faviour of Issue 30154, which suggests documentation or adjusting
the timeout implementation. There is also Issue 26534 proposing a new
“kill_group” option when using the timeout feature.
--
resolution: -> duplicate
stage: -> re
Martin Panter added the comment:
FWIW more oddities with this paragraph could be fixed by:
* removing the first “and” from “HH is . . ., [and] MM is . . ., SS is . . .
and uu is”,
* changing the condition for omitting “uu” from “a whole number of
[minutes]” to “seconds”, and
Change by Martin Altmayer :
--
keywords: +patch
pull_requests: +8048
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue34263>
___
___
Py
Martin Altmayer added the comment:
Added a small PR. Shall we update the doc? With this PR there is no reason
anymore to disallow timeouts greater than one day in asyncio.
Greetings from the sprints @ Edinburgh!
--
nosy: +MartinAltmayer
New submission from Eric Martin :
After entering a line number, clicking OK brings to the foreground and makes
active the first hidden window (in the simplest case where we have just one
window for a .py file and the Shell window, the former being in the foreground,
clicking OK brings the
Martin Panter added the comment:
This may be a very old regression (from 2002) caused by Issue 591713 and
Mercurial rev. 554f975073a0. The original check for the double slash, added in
0d6bd391acd8, “escapes” a path beginning with a double slash by prefixing it
with two more slashes (empty
Martin Panter added the comment:
Issue 34276 was opened about a similar case for “file:” URLs. I believe both
“file:” scheme and no-scheme cases are a regression and could be fixed by
adding another pair of slashes (an empty “netloc” part):
>>> urlparse("foo.com&
701 - 800 of 8156 matches
Mail list logo