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
Change by Martin Hosken :
--
versions: +Python 3.6
___
Python tracker
<https://bugs.python.org/issue36300>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Martin Hosken :
The following code fails:
>>> lcls = {'w': 100}
>>> eval('[w for x in ("hello", "world")]', None, lcls)
Traceback (most recent call last):
File "", line 1, in
File &
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 added the comment:
Our production system hit this issue using Python 3.6.7 once a few days ago, so
presumably the race is still possible with the applied patch, just less likely?
```
RuntimeError: dictionary changed size during iteration
at _decompose (/usr/lib/python3.6/enum.py:858
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
Change by Martin Panter :
--
stage: test needed -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue2212>
___
___
Pyth
Martin Panter added the comment:
Same as Issue 11315, where Éric suggested documenting the behaviour.
--
nosy: +martin.panter
resolution: -> duplicate
superseder: -> unicode support in Cookie module
___
Python tracker
<https://bugs.p
Martin Panter added the comment:
Sorry, but changing to bytes after ten years of using str in this module in
Python 3 is not going to happen. Let’s just document the state of Python 2 (see
Éric: https://bugs.python.org/issue11315#msg129448).
--
assignee: -> docs@python
compone
Martin Panter added the comment:
I think the solution here is to document what “SimpleCookie.value_encode”
really does: RFC 2109 quoted-string escaping. If you want to a generate
RFC-6265-compliant Set-Cookie string, do not include non-compliant characters
in the cookie value, and consider
Martin Panter added the comment:
Ment to point to previous bug report: Issue 23220
--
___
Python tracker
<https://bugs.python.org/issue35833>
___
___
Python-bug
Martin Panter added the comment:
I suspect Idle just passes control characters directly to an underlying Text or
similar TK widget. As far as I know, TK only documents behaviour for tabs and
newlines, not other control characters.
Last time this was brought up, Terry added a sentence under
Martin Panter added the comment:
I presume MeiK wants to use BaseCookie to parse the Set-Cookie header field, as
in
>>> BaseCookie('Hello=World; Expires=Thu, 31 Jan 2019 05:56:00 GMT;')
>>> BaseCookie('Hello=World; Expires=Thu,31 Jan 2019 05:56:00 GMT;')
Martin Panter added the comment:
I think making a comma start a new cookie is dangerous, and perhaps this
proposal should be rejected.
I’m not an expert on web programming, but this reminds me of some security
problems that already affected Python:
<https://translate.google.com/translat
Martin Panter added the comment:
Yes, universal newlines mode uses the TextIOWrapper class to read the pipe,
which isn’t really designed for non-blocking mode. This is the same problem
described by Izbyshev at <https://bugs.python.org/issue13322#msg307763>.
Raising TypeError isn’t idea
Martin Panter added the comment:
Issue 35762 was opened specifically about Izbyshev’s case: TextIOWrapper
behaviour with a non-blocking file. Calling “os.fdopen” with mode='r' (text
mode) returns a TextIOWrapper object.
--
___
Pyth
Martin Panter added the comment:
The “urllib.parse” module generally follows RFC 3986, which does not allow a
literal backslash in the “userinfo” part:
userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
unreserved = ALPHA / DIGIT / "-" / "." / &quo
Martin Panter added the comment:
Today I read RFC 3986, and I think the URLs in the bug reports are valid, and
are already parsed correctly. The path is allowed to have a literal “at” symbol:
path-abempty = *( "/" segment )
segment = *pchar
pchar = unreserved / pct-encoded /
Martin Panter added the comment:
FWIW I understand the backslash should be percent-encoded in URLs, otherwise
the URL is not valid.
This reminds me of a few other bugs:
* Issue 30500: Made the behaviour of fragment (#. . .) versus userinfo (. . .@)
consistent, e.g. in //www.google.com
Change by Martin Panter :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue35483>
___
___
Martin Panter added the comment:
About “lexists”, I meant using it instead of “os.path.exits” (not “islink”). On
Linux:
>>> targetpath = 'target'
>>> os.symlink('nonexistant', dst=targetpath) # Make a broken symlink
>>> os.system('ls -l
Martin Panter added the comment:
This was changed in Python 3.2+ in Issue 16723. The response object no longer
sets the “closed” attribute when it runs out of data; it is only set when the
“close” method is called. Perhaps the example should be amended so that it
checks if “read” returned an
Martin Panter added the comment:
Is this related to Issue 23882? That one is about making discovery work when
“__init__.py” files are removed.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue35
Martin Panter added the comment:
Seems to be a lot of overlap with Issue 26859 by Xavier. Looks like Xavier
included a test case, but Bassemʼs changes on Git Hub seem more thorough in the
impementation and doc strings.
--
nosy: +martin.panter
Martin Panter added the comment:
FWIW this happens with the built-in IDNA codec, and Amaury gave a demonstration
under <https://bugs.python.org/issue17404#msg184045>.
I don’t think the “TextIOWrapper.flush” method should use final=True, but
“close” and “detach” probably
Martin Panter added the comment:
It is documented that buffering=0 is not supported in text mode. Look a handful
of paragraphs down from
<https://docs.python.org/release/3.7.2/library/functions.html#open>:
“Pass 0 to switch buffering off (only allowed in binary mode)”
Amaury’s proble
Martin Panter added the comment:
Are you aware of the “add_unredirected_header” method? Maybe that is enough to
avoid your problem.
https://docs.python.org/dev/library/urllib.request.html#urllib.request.Request.add_unredirected_header
--
nosy: +martin.panter
title: urllib may leak
Martin Panter added the comment:
The first aspect, incorrectly assuming the OS does not support symlinks, is
described at <https://bugs.python.org/issue23228#msg265146>. Lars proposed a
fix <https://bugs.python.org/file42780/windowserror.diff> which will let the OS
exception e
Martin Panter added the comment:
I’m not sure if this should be considered a bug fix, but if it goes into 2.7 it
would overlap with Issue 10761 and Issue 12088. In 2.7 existing directory
entries (including broken symlinks, but not including subdirectories) may be
replaced by symbolic and
Martin Panter added the comment:
The problem with WindowsError should only exist in 3.4+. 2.7 doesn’t support
creating symlinks on Windows.
Michael’s fix is the same as already done in 2.7 for Issue 10761 and (part of)
Issue 12088. However I’m not sure that is the best approach for a bug fix
Martin Panter added the comment:
The only problem with the 3.7+ documentation is the note about 3.2. Several
paragraphs under
<https://docs.python.org/release/3.7.1/library/subprocess.html#subprocess.Popen>,
it still says
“Changed in version 3.2: The default for ‘close_fds’ was change
Martin Panter added the comment:
It doesn’t make sense to move the “except” line without moving the matching
“print” line. According to
<https://docs.python.org/3.7/reference/compound_stmts.html#index-1>, “A clause
consists of a header and a ‘suite’.” So when it talks about reversi
Martin Panter added the comment:
That would not include the custom error message for the first two cases I
listed. I suggest closing this.
--
___
Python tracker
<https://bugs.python.org/issue35
Martin Panter added the comment:
Code in question:
try:
# non-sequence items should not work with len()
# non-empty strings will fail this
if len(query) and not isinstance(query[0], tuple):
raise TypeError
# [. . .]
except TypeError:
ty, va, tb = sys.exc_info
Martin Panter added the comment:
Previous related reports:
* Issue 35260: “2to3” doesn’t parse Python 3’s “print” function by default
because it is supposed to translate Python 2 syntax
* Issue 2412: “2to3” should support “from __future__ import print_function”.
That frees up the “print
Martin Panter added the comment:
This problem is common to structure fields in general, not just "c_void_p". I
recently encountered it with a different type (don't remember the type now, but
I notice plain types like c_int share the problem). I found
<https://stackover
Martin Panter added the comment:
Yeah, the TarFile class would fix up the header when the user calls “close”. I
think this is how it was done for ZipFile (implemented in Issue 26039).
Yes currently you would have to build the tarinfo object by hand. I think a
helper function would be nice
Martin Panter added the comment:
The missing “crypt” symbol is probably this function:
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/crypt.html>. It is
defined by the OS or a separate library, not by Python. You may need to link
the “_crypt” Python module to the librar
Martin Panter added the comment:
If something like your “addbuffer” method existed, then you won’t need to get
the size first, right? We don’t need the changes in “gettarinfo” for
“addbuffer” to be useful.
BTW have you considered returning a file writer rather than accepting a file
reader
Martin Panter added the comment:
Sounds very similar to Issue 25894, discussing how to deal with tests where
different subtests errored, failed, skipped and passed.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue35
Martin Panter added the comment:
The changes at <https://github.com/python/cpython/pull/10714/files/11ca0f0>
have various other behaviour changes which are not discussed here. They seem to
be there just so that you can use the TCP socket from “urlopen” with
“gettarinfo”. But “gettarin
Martin Panter added the comment:
Regarding the first point, “finish” is no longer called after an exception.
This was apparently changed in 2.7.4 (see Issue 14574), but Geoffrey was
referring to older documentation.
Regarding the second point, about ECONNRESET vs graceful shutdown, this
Martin Panter added the comment:
I added the Py_FinalizeEx API in Issue 5319, but was relying on input from
others about dealing with Py_LIMITED_API. After reading the documentation
<https://docs.python.org/3.6/c-api/stable.html>, I now see that the function
would be considered part
Martin Panter added the comment:
This is the same as Issue 26158. Truncating text files is not clearly
documented for a start, and truncating after reading doesn’t seem to be
considered much in the implementations.
Your question is answered at <https://bugs.python.org/issue26158#msg258
Martin Panter added the comment:
For the record, the more recent bug I mentioned was a complaint from 2015 (one
and a half years before Victor’s comment). Even if it is not worth supporting
writing after reading, the problem could be documented.
--
resolution: out of date -> wont
Change by Martin DeMello :
--
keywords: +patch
pull_requests: +9866
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35282>
___
___
Py
New submission from Martin DeMello :
It would be useful for lib2to3.refactor to return which files were actually
changed. Right now that information is logged but not returned.
--
components: 2to3 (2.x to 3.x conversion tool)
messages: 330149
nosy: martindemello
priority: normal
Martin Panter added the comment:
There are actually two “close” methods in the WSGI package: ServerHandler’s
implementation extends the BaseHandler implementation. Making the “close”
methods do nothing if called a second time would avoid the error about
“self.status” being None, but won’t
Martin Panter added the comment:
Looks like this is about about making “RawIOBase.read” delegate to “readinto”
with a “bytes” object. If so, there’s more discussion in Issue 15903.
--
nosy: +martin.panter
___
Python tracker
<ht
Martin Bijl-Schwab added the comment:
I will have a look.
--
___
Python tracker
<https://bugs.python.org/issue32409>
___
___
Python-bugs-list mailing list
Unsub
Change by Martin Bijl-Schwab :
--
pull_requests: +9681
___
Python tracker
<https://bugs.python.org/issue33694>
___
___
Python-bugs-list mailing list
Unsubscribe:
Martin Panter added the comment:
Looks like the error handling is broken by Issue 16220, which calls the
“BaseHandler.close” method before the exception is caught for the error
handler. Perhaps it is better to just close the iterator without messing with
the other attributes in the exception
Martin Panter added the comment:
There seem to be at least two different issues raised here (and in Issue 34547):
1. Double exceptions due to “self.environ” and “self.status” being None when
the error handler is called. This problem was specifically raised in Issue
29183.
2. What to do
Martin Bijl-Schwab added the comment:
I meant https://bugs.python.org/issue35148
--
___
Python tracker
<https://bugs.python.org/issue32409>
___
___
Python-bug
Martin Bijl-Schwab added the comment:
it does not work as expected on swiss german (and likely other
internationalised) windows systems. See https://bugs.python.org/issue32409
--
nosy: +Martin Bijl-Schwab
___
Python tracker
<ht
New submission from Martin Bijl-Schwab :
There is a small bug in the activate.bat script causing problems on
internationalized Windows systems.
C:\repo\gui>python -m venv venv
C:\repo\gui>call venv\Scripts\activate.bat
Parameterformat falsch - 850.
This translates to "Wrong para
Change by Martin Panter :
--
Removed message: https://bugs.python.org/msg328245
___
Python tracker
<https://bugs.python.org/issue28960>
___
___
Python-bugs-list m
Change by Martin Panter :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
title: StreamIO truncate behavior of current position -> StringIO module
truncate behavior of current position
___
Python tracker
Change by Martin Panter :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue34920>
___
___
Martin Panter added the comment:
RFC 6265 says that only the first three letters of the month are significant,
and the rest of the token should be ignored. See
<https://tools.ietf.org/html/rfc6265#section-5.1.1>:
month = ( "jan" / "feb" / "mar" / &quo
Martin Panter added the comment:
Have you seen
<https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate>?
It already links to the tutorial.
--
nosy: +martin.panter
___
Python tracker
<https://bugs.p
Martin Panter added the comment:
Déjà vu. Maybe duplicate of Issue 34624?
--
nosy: +martin.panter
superseder: -> -W option does not accept module regexes
___
Python tracker
<https://bugs.python.org/issu
201 - 300 of 9844 matches
Mail list logo