Martin Panter added the comment:
The ctypes overflow is probably the same as described in Issue 28169 and Issue
15119
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue46
Martin Panter added the comment:
Maybe the same as Issue 42766?
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue46756>
___
___
Pytho
Change by Martin Panter :
--
superseder: -> Generate HTML 5 with SimpleHTTPRequestHandler.list_directory
___
Python tracker
<https://bugs.python.org/issu
Martin Panter added the comment:
The linked code is for urllib.parse.urlencode, looking something like
try:
if len(query) and not isinstance(query[0], tuple):
raise TypeError
except TypeError:
ty, va, tb = sys.exc_info()
raise TypeError("not a valid non-string seq
Martin Panter added the comment:
Perhaps this is a duplicate of Issue 12756?
--
nosy: +martin.panter
superseder: -> datetime.datetime.utcnow should return a UTC timestamp
___
Python tracker
<https://bugs.python.org/issu
Martin Panter added the comment:
The subprocess module only uses the file object to get a file handle by calling
the "fileno" method. See Issue 19992 about documenting this. For Python to
compress the output of the child process, you would need a pipe.
Gzip file objects provide t
Martin Panter added the comment:
Looks like you forgot to encode the length of ten in hexadecimal.
I don't think the HTTP server module has any special handling for chunked
responses, so this up to the user and isn't a bug in Python.
--
nosy: +martin.panter
resolution: -&
Martin Panter added the comment:
Looks like the same as Issue 32917. I presume there are two newlines at the end
of the file because there are two newlines following every config section.
IMO this is a minor cosmetic annoyance, just like writing a key with an empty
value gets you a trailing
Martin Panter added the comment:
Issue 21109 has been open for a while and is the same as this, if I am not
mistaken.
--
nosy: +martin.panter
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> tarfile: Traversal attack v
Martin Panter added the comment:
Another workaround:
>>> '{:{brace}>10d}'.format(5, brace='{')
'{5'
--
nosy: +martin.panter
___
Python tr
Martin Panter added the comment:
I presume this is because you are running a Unix shell, and it's nothing to do
with Python. Look up how quoting and variable substitution with dollar signs $
works.
$ set -o nounset
$ python3 -c "import urllib.parse; print
(urllib.parse.quote(
Martin Panter added the comment:
I suspect this comes from Issue 27657. Consider how similar URLs like tel:123
or javascript:123 should be parsed.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue44
Martin Panter added the comment:
Anselm's pull request PR 15175 looked hopeful to me. I've been using those
changes in our builds at work for a while.
--
___
Python tracker
<https://bugs.python.o
Martin Panter added the comment:
I don't have a strong opinion, but it does seem a sensible change that matches
the high-level nature of the "cookiejar" module, with low risk of users relying
on the current file permissions. On the other hand, the "curl" command
Change by Martin Panter :
--
type: security -> resource usage
___
Python tracker
<https://bugs.python.org/issue43292>
___
___
Python-bugs-list mailing list
Un
Martin Panter added the comment:
Perhaps this can be handled with Issue 25707, which is open for adding an API
to close the file, similar to how "os.scandir" iterator implements a context
manager and "close" method.
--
nosy: +martin.panter
superseder: -> A
Martin Panter added the comment:
Sounds the same as Issue 37788, which is still open.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue43
Change by Martin Panter :
--
keywords: +3.7regression
___
Python tracker
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Perhaps this is caused by Issue 37788. Python 3.7.4 introduced a leak for any
thread that doesn't get its "join" method called. Timer is a subclass of
Thread, so to confirm, see if calling "timer.join()" after "cance
Martin Panter added the comment:
Maybe this is related to (or duplicate of) Issue 37788? Python 3.7 has a
regression where threads that are never joined cause leaks; previous code was
written assuming you didn't need to join threads.
Do you still see the leak even if you don't
Change by Martin Panter :
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue42263>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
There is related discussion in Issue 41254, about duration formats more
generally.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue42
Martin Panter added the comment:
According to the documentation at
<https://docs.python.org/3.8/library/socket.html#socket.AF_PACKET> and Issue
25041 it is only available on Linux. What documentation are you looking at?
--
nosy: +martin.
Martin Panter added the comment:
There is a comment in the HTTPResponse class regarding these methods:
# For compatibility with old-style urllib responses.
They were there for the "urlopen" API in "urllib.request", not for the
"http.client" module on its own. I
Martin Panter added the comment:
Perhaps a duplicate of Issue 2651, closed because it was too hard to fix
without breaking compatibility.
--
nosy: +martin.panter
superseder: -> Strings passed to KeyError do not round trip
___
Python trac
Martin Panter added the comment:
Perhaps this is a duplicate of Issue 27674, where I think parsing is aborted
when a double-quote is seen?
--
nosy: +martin.panter
superseder: -> Quote mark breaks http.cookies, Cookie.py processing
___
Pyt
Martin Panter added the comment:
Issue 31122 is also open about fixing this long-term, but I agree it would be
good to document this quirk / bug.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue41
Martin Panter added the comment:
Previous report about Requests to the Python bug tracker: Issue 33620.
I suspect this is an unavoidable race condition with trying a POST (or other
non-idempotent) request on an idle HTTP connection. I think it has to be up to
the higher-level application or
Change by Martin Panter :
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue18861>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
I don't know how much support this will get since there is already a
str(timedelta) operation defined with a different format. But I don't like that
format much. The day[s] part is too verbose, the H:MM:SS part could too easily
be interpreted as D:
Martin Panter added the comment:
Perhaps this is the same as Issue 37788, introduced in 3.7.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue40
Martin Panter added the comment:
The file descriptor created by "os.dup" is not inherited by child processes by
default since Python 3.4.
https://docs.python.org/3/library/os.html#os.dup
Does it work if you use "os.set_inheritable" or "os.dup2" (which appa
Martin Panter added the comment:
I’m not an expert on the topic, but it sounds like this might be a duplicate of
Issue 23434, which has more discussion.
--
nosy: +martin.panter
resolution: -> duplicate
status: open -> pending
superseder: -> support encoded filename i
Martin Panter added the comment:
See also Issue 39509, proposing to add 103 and "425 Too Early"
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.o
Martin Panter added the comment:
Please don’t use “from None” in library code. It hides exceptions raised by the
calling application that would help debugging. E.g.
<https://bugs.python.org/issue30097#msg293185>
--
nosy: +martin.panter
___
Martin Panter added the comment:
Closing in favour of Issue 39574 where a new wording is proposed
--
nosy: +martin.panter
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> str.__doc__ is misleading
__
Martin Panter added the comment:
Thanks Victor
--
___
Python tracker
<https://bugs.python.org/issue39353>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Of course I would prefer “crc_hqx” to stay, because we use it at work. But I
understand if you think it is not popular enough to justify maintaining it.
But I was more asking if the deprecation notice should point the way forward.
This function is no longer
Martin Panter added the comment:
Building and verifying the checksum in "RTA protocol" that uses this:
<https://rms.nsw.gov.au/business-industry/partners-suppliers/documents/specifications/tsi-sp-003.pdf>.
But I understand CRC-CCITT is one of the two popular 16-bit CRC polyn
Martin Panter added the comment:
Is there a recommended replacement for calculating CRC-CCITT? Do it yourself in
Python code, or use a particular external module?
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue39
Martin Panter added the comment:
FTR I have been trialling a patched Python 3.7 based on Maru's changes
(revision 6ac217c) + review suggestions, and it has reduced the size of the
leak (hit 1 GB over a couple days, vs only 60 MB increase over three days). The
remaining leak cou
Change by Martin Panter :
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue37788>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Another workaround might be to set the new "block_on_close" flag (Issue 33540)
to False on the server subclass or instance.
Victor: Replying to <https://bugs.python.org/issue37193#msg345817> "What do I
think of also using a weakref
Martin Panter added the comment:
Previously Issue 12215 and a couple of other duplicates were opened about this.
Writing after reading with TextIOWrapper doesn't work as people expect. The
report was closed apparently because Victor thought there wasn't enough
interest in it.
FWI
Martin Panter added the comment:
I suggest to keep the discussion with Issue 12455
--
nosy: +martin.panter
superseder: -> urllib2 forces title() on header names, breaking some requests
___
Python tracker
<https://bugs.python.org/issu
Change by Martin Panter :
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue29979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Looks like the change causing this is revision cc3fa20. I would remove the
reference to pdict['CONTENT-LENGTH'].
--
keywords: +3.7regression
nosy: +martin.panter
___
Python tracker
<https://bu
Change by Martin Panter :
--
resolution: -> duplicate
superseder: -> tempfile module misinterprets access denied error on Windows
___
Python tracker
<https://bugs.python.org/i
Martin Panter added the comment:
Perhaps a duplicate of Issue 22107?
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue37477>
___
___
Martin Panter added the comment:
Same thing going on as in Issue 30154. The shell is probably spawning the
“sleep” command as a child process (grandchild of Python), and waiting for it
to exit. When Python times out, it will kill the shell process, leaving the
grandchild as an orphan. The
Martin Panter added the comment:
Looking at the code, this would be caused by Issue 31233. I expect 3.7+ is
affected. 3.6 has similar code, but the leaking looks to be disabled by
default. 2.7 doesn't collect a "_threads" list at all.
Looks like Victor was aware of the leak
Martin Panter added the comment:
FYI the change here to remember all the thread objects ever created looks to be
the cause of the memory leak reported in Issue 37193
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue31
Change by Martin Panter :
--
nosy: +cocoatomo
title: Mistranslation -> Mistranslation (Japanese)
___
Python tracker
<https://bugs.python.org/issue37290>
___
_
Martin Panter added the comment:
Some of the problems brought up here (which sibling or subclass, and which
parameter’s MRO) also came up a few years ago in Issue 23674.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.
Martin Panter added the comment:
Problems with long-running iterators are already discussed in:
Issue 31815: rejected proposal to check for interrupts
Issue 33939: proposal to flag iterators as being infinite
--
nosy: +martin.panter
___
Python
Martin Panter added the comment:
The “cmd” module doesn’t use “argparse” as far as I can see. You might have to
provide more information or code for someone to make sense of or reproduce your
bug.
Also, see Issue 14191 which added new “parse_[known]_intermixed_args” APIs in
3.7, and have a
Martin Panter added the comment:
Python 3.7 added the "capture_output" parameter, for Issue 32102. Before that
change, you could use "subprocess.PIPE":
https://docs.python.org/3.6/library/subprocess.html#subprocess.run
“To [capture output], pass PIPE for the ‘stdout’ and/o
Martin Panter added the comment:
I think this is a duplicate of Issue 29256. Issue 25680 also discusses platform
differences with no file descriptors.
--
nosy: +martin.panter
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Windows sel
Martin Panter added the comment:
Test_http_cookies line 19 has the following test case:
{'data': 'keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"',
'dict': {'keebler' : 'E=mc2; L="Loves"; fudge=\012;'},
'repr
Martin Panter added the comment:
I think LCatro is saying that Python should accept the cookies and discard only
the offending attributes. This makes sense to me and tends to agree with the
specifications, but the three cases seem all seem unimportant to me.
PoC 1, Max-age:
>>> fro
Martin Panter added the comment:
Karthikeyan, it looks like your test will pass even when the bug is not fixed.
A test calling code that writes error message does not necessarily mean the
test itself will fail, I don’t think.
I suggest you look at raising an exception when the UserWarning is
Martin Panter added the comment:
The original report comes from <https://code.djangoproject.com/ticket/2806>.
Anders was trying to parse a HTTP request Cookie field, something like:
BaseCookie('sessionid=a2be2e7debe71af8d88d350c4d14d768;$Path=/;$Domain=192.168.0.2;$Port="8000
Change by Martin Panter :
--
resolution: -> rejected
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue23930>
___
___
Python-bugs-
Change by Martin Panter :
--
superseder: -> Add "necessarily inclusive" groups to argparse
___
Python tracker
<https://bugs.python.org/issue23298>
___
Martin Panter added the comment:
I haven’t looked at the code, but I suspect Idle implements a custom
“sys.displayhook”:
>>> help(sys.displayhook)
Help on function displayhook in module idlelib.rpc:
displayhook(value)
Override standard display hook to use non-locale
Martin Panter added the comment:
This is caused by Serhiy’s first change to 2.7 in Issue 21448. Compare
Mercurial rev. 1b1f92e39462 (3.4 branch) with ba90bd01c5f1 (2.7). In 2.7, he
applied the Python 3 version of the code, which used “str.splitlines” rather
than a regular expression
Martin Panter added the comment:
The “urllib” package also contains “urllib.parse”, which is a lot more
lightweight than “urllib.request”. In a quick experiment, importing
“urllib.request” is more than 2 times slower than importing “urllib.parse” on
its own. And importing “urllib” by itself
Martin Panter added the comment:
Victor, if you run the test suite, one of the test cases should trigger the
overflow. I used to compile with Undefined Behaviour Sanitizer to print
messages when these errors occur; see
<https://bugs.python.org/issue1621#msg271118> for my setup at the t
Martin Panter added the comment:
A real use case that I have had was with a protocol to activate a device with a
daily schedule. The protocol takes start and end hours and minutes of the day.
To test the device by activating it over the next few minutes, my ideal way
would have taken the
Martin Panter added the comment:
Does the test still depend on real-world posts? If so, see Issue 19613. I don’t
think the problem has been fixed.
--
nosy: +martin.panter
superseder: -> test_nntplib: sporadic failures, test_article_head_b
Martin Panter added the comment:
Gregory, I haven’t tried recent Python code, but I expect the problem with
percent decoding is still there. If you did try my example, what results did
you see? Be aware that these techniques only work if the OS co-operates and
connects to localhost when you
Change by Martin Panter :
--
resolution: -> duplicate
___
Python tracker
<https://bugs.python.org/issue36293>
___
___
Python-bugs-list mailing list
Unsubscrib
Martin Panter added the comment:
I wasn’t sure about closing it, in case Cyker came back with more details. E.g.
what was the use case? Were they mislead by the documentation? Do they just
think the error should be different, or do they think there should be no error
in this case?
But I
Change by Martin Panter :
--
superseder: -> http.server module sets incorrect mimetype for WebAssembly files
___
Python tracker
<https://bugs.python.org/issu
Martin Panter added the comment:
According to Issue 34758, this was already added to 3.8’s “mimetypes”.
--
nosy: +martin.panter
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bug
Martin Panter added the comment:
Did you read the bracketed paragraph directly below, or try running the code
with your “break” statement? I expect it would stop at the first prime number
(two). But the output continues with more prime numbers.
--
nosy: +martin.panter
resolution
Martin Panter added the comment:
On Linux, Gnu’s “install” command is happy if the target directory already
exists; it just changes the mode (-m) etc. So the race isn’t a big deal.
This is like the race I described (theoretical at the time) at
<https://bugs.python.org/issue25696#msg255
Martin Panter added the comment:
This is a regression in the 3.7+ documentation. It previously said “To [capture
output], pass PIPE for the ‘stdout’ and/or ‘stderr’ arguments”. This was
removed by Bo Bayles in Issue 32102.
--
keywords: +3.7regression
nosy: +bbayles, gregory.p.smith
Martin Panter added the comment:
I suspect this is caused by TextIOWrapper guessing if it is writing the start
of a file versus in the middle, and being confused by “seekable” returning
False. GzipFile implements some “seek” calls in write mode, but LZMAFile and
BZ2File do not.
Using this
Martin Panter added the comment:
The general problem of non-blocking reads with BufferedIOBase is covered by
Issue 13322. The documentation and implementations do not agree. I suggest to
not rely on any particular behaviour reading BufferedIOBase objects in
non-blocking mode.
The problem of
Martin Panter added the comment:
This is the same story as in Issue 35762. Both “sys.stdin” and
“subprocess.Popen.stderr” (when universal_newlines=True is enabled) use the
TextIOWrapper class, which I don’t think was implemented with non-blocking mode
in mind.
Issue 24560 is similar, but is
Change by Martin Panter :
--
stage: -> resolved
status: pending -> closed
___
Python tracker
<https://bugs.python.org/issue25476>
___
___
Python-bugs-list
Martin Panter added the comment:
This is the result that I see:
>>> output = StringIO()
>>> csv.writer(output, lineterminator='\n').writerow(["Whoa!\rNewlines!"])
16
>>> output.getvalue()
'Whoa!\rNewlines!\n'
For comparison, this is th
Martin Panter added the comment:
Probably the same as Issue 29353. I remember than enabling "headersonly" can
create inconsistencies in the message object. But I don't remember the details.
According to Issue 29991 (another duplicate), my patch for Issue 24363 might
help. Bu
Martin Panter added the comment:
The documentation
<https://docs.python.org/dev/library/csv.html#module-contents> says you should
“open the files with newline=''.” IMO this is an unfortunate quirk of the CSV
module. Everything else that I know of in the Python built-in libra
Martin Panter added the comment:
In Issue 28503, “crypt_r” was added to Python 3.7 and 3.8+, and it looks like
it is still there.
Regarding error handling for “crypt”, it is not documented, but the Python
function returns None on error. You would have to consider backwards
compatibility to
Martin Panter added the comment:
The 1 MiB limit was added for Issue 1296004; apparently some platforms were
overallocating multiple buffers and running out of memory. I suspect the loop
in "_safe_read" was inherited from Python 2, which has different kinds of file
objects. Th
Martin Panter added the comment:
I agree the documentation is insufficient. It should have said if “data” is
iterated, it must yield bytes-like objects.
I agree it is unwise to yet more special cases for the uploaded data types.
When Lye passed the dictionary of three keys and values, I
Change by Martin Panter :
--
resolution: -> not a bug
status: open -> pending
title: urllib.request.urlopen error -> urllib.request.urlopen
CERTIFICATE_VERIFY_FAILED error
___
Python tracker
<https://bugs.python.or
Martin Panter added the comment:
I'm not sure it is wise for the Python documentation to suggest inserting null
bytes in general. This seems more like an application-specific hack. There is
nothing in Python that handles these null bytes specially, and I expect they
will be seen i
Martin Panter added the comment:
Suggest closing this assuming it is a duplicate, unless Jarry can give more
information.
--
resolution: -> duplicate
status: open -> pending
superseder: -> pty.spawn hangs on FreeBSD 9.3, 10.x
___
Pytho
Martin Panter added the comment:
For 3.7+ (where iterable objects are supported), I suggest:
1. Document the problem as a limitation of handlers like
AbstractBasicAuthHandler, and consider raising an exception instead of trying
to upload a file or iterable a second time.
2. Clarify the
Change by Martin Panter :
--
dependencies: +Remove urllib.parse._splittype from mimetypes.guess_type
___
Python tracker
<https://bugs.python.org/issue22
Martin Panter added the comment:
I haven’t confirmed, but it looks like the original change here broke
bidirectional reading and writing with a single TextIOWrapper object; see Issue
35928.
--
___
Python tracker
<https://bugs.python.
Martin Panter added the comment:
Looking over the changelog, my guess (untested) is this is caused by commit
d6a283b3 for Issue 25862. That change looks like it drops the internal
TextIOWrapper decoding buffer for each successful write.
I don't have the right version of Python to test
Martin Panter added the comment:
Maybe related to Victor's "Issue 1" described in Issue 32085. That is also a
security bug about CRLF in the URL's path, but was opened before Issue 30500
was opened and the code changed, so I'm not sure if it is the same as this or
Martin Panter added the comment:
This is covered by Issue 13322. There are a few other BufferedReader methods
that contradict the documentation for non-blocking mode.
A while ago I posted a patch to change the implementation to match the
documentation, but nobody reviewed it or gave their
Martin Panter added the comment:
I agree that the documentation should be clearer about the first two points.
Considering that the "input" function and by default the "str.splitlines"
method both behave differently, I often had to re-learn this when I had less
Pyt
Martin Panter added the comment:
I think it would be more practical to fix the documentation (option 1). Do you
have a use case for “TextIOBase.readinto” raising ValueError (something more
concrete than someone having expectations)?
--
nosy: +martin.panter
Martin Panter added the comment:
The main cause of this behaviour is that whitespace (matching the ASCII RE
“\s”) is treated as separation between cookie “morsels”. It looks like this has
always been the behaviour, but I’m not sure it was intended.
>>> print(BaseCookie('first
1 - 100 of 4320 matches
Mail list logo