Change by Daniel Lenski :
--
keywords: +patch
pull_requests: +28748
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30548
___
Python tracker
<https://bugs.python.org/issu
Daniel Lenski added the comment:
Due to this bug, any user of this function in Python 3.0+ *already* has to be
able to handle all of the following outputs in order to use it reliably:
decode_header(...) -> [(str, None)]
or decode_header(...) -> [(bytes, str)]
or decode_
Daniel Lenski added the comment:
I recently ran into this bug as well.
For those looking for a reliable workaround, here's an implementation of a
'decode_header_to_string' function which should Just Work⢠in all possible
cases:
#!/usr/bin/python3
impo
Daniel Lenski added the comment:
Why was this closed?
As I wrote in a previous comment, this situation can be automatically
identified and addressed via static analysis in the vastly-predominant case,
where the Exception object is assigned via an `exception ... as exc:` clause
Daniel Lenski added the comment:
> There is no way to know through static analysis that the subscript is on an
> object of type exception. I think this should be closed as won't fix.
In almost all cases, the variable in question will receive its value via
`except ... as e
Daniel Lenski added the comment:
Like many others here, I've run into this issue because I'm trying to parse
timestamps from JSON.
(Specifically, I'm trying to parse timestamps from JSON serialization of Java
POJOs and/or Kotlin data classes, as serialized by the Jackso
Change by Daniel Lenski :
--
nosy: +dlenski
___
Python tracker
<https://bugs.python.org/issue35829>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Lenski added the comment:
This can be closed.
--
___
Python tracker
<https://bugs.python.org/issue2190>
___
___
Python-bugs-list mailing list
Unsub
Daniel Lenski added the comment:
Issue #38976 is a duplicate of this one, and now closed by
https://github.com/python/cpython/pull/17471
--
___
Python tracker
<https://bugs.python.org/issue2
Change by Daniel Lenski :
--
pull_requests: +22196
pull_request: https://github.com/python/cpython/pull/22798
___
Python tracker
<https://bugs.python.org/issue38
Daniel Lenski added the comment:
This issue is essentially a duplicate of the very-longstanding #2190.
My PR (https://github.com/python/cpython/pull/22798) was submitted before this
one, but this one was accepted and merged first.
--
nosy: +dlenski
Daniel Lenski added the comment:
@terry.reedy, it looks like my PR just needs a core developer to review it.
Would you mind taking a look? :-)
https://github.com/python/cpython/pull/22798
--
___
Python tracker
<https://bugs.python.org/issue2
Change by Daniel Lenski :
--
title: MozillaCookieJar ignore HttpOnly cookies -> MozillaCookieJar ignores
HttpOnly cookies
___
Python tracker
<https://bugs.python.org/iss
Daniel Lenski added the comment:
I've got a patch that will address both loading and saving of "HTTP-only"
cookies: https://github.com/python/cpython/compare/master...dlenski:patch-1
Testing/feedback before I submit as a PR would be very welcome.
--
versions: +Pyth
Daniel Lenski added the comment:
Also confused about why this was closed.
This format is still frequently used. In the absence of a solution in the
standard library, I'm using this kludge to strip the leading `#HttpOnly_`.
from tempfile import NamedTemporaryFile
from http.cook
New submission from Daniel Lenski:
Python 2.7 allows indexing an Exception object to access its args list.
>>> e=Exception('foo','bar','baz')
>>> assert e[0] is e.args[0]
This doesn't work in 3.5:
>>> e=Exception('foo',
Changes by Daniel Lenski :
--
nosy: +dlenski
___
Python tracker
<http://bugs.python.org/issue30155>
___
___
Python-bugs-list mailing list
Unsubscribe:
Daniel Lenski added the comment:
I agree on the nastiness of this bug. It's been plaguing my production code for
months and I had been at a loss to explain why I've been getting duplicate rows
until I found this SO post:
http://stackoverflow.com/questions/27624049/python-sqli
Daniel Lenski added the comment:
Here's the class I have been using for reading namedtuples from CSV files:
from collections import namedtuple
from itertools import imap
import csv
class CsvNamedTupleReader(object):
__slots__ = ('_r', 'row',
Daniel Lenski added the comment:
Serhiy,
52 usec/loop doesn't seem like much overhead. This is not 52 usec per row
fetched, but just 52 usec per cursor.execute(). An example where >1 row is
fetched for each cursor would show this more clearly.
The advantage of namedtuple is that it&
Daniel Lenski added the comment:
Richard, I think the problem with this is that it spreads the non-portable
or OS-dependent parts of the code over several places rather than
concentrating them all in one place.
After close_without_unlink(), what would happen when the context manager
exits or
Daniel Lenski added the comment:
Davide, the @contextlib.contextmanager decorator effectively wraps the
yield statement in the necessary glue so that everything prior to the yield
statement occurs in the __enter__() method of the contextmanager, while
everything subsequent occurs in the
Daniel Lenski added the comment:
Tim Golden,
My preferred solution would be to replace the binary delete argument of the
current NamedTemporaryFile implementation with finer-grained options:
delete=False # don't delete
delete=True # delete after file closed, cu
Changes by Daniel Lenski :
--
nosy: +dlenski
___
Python tracker
<http://bugs.python.org/issue14243>
___
___
Python-bugs-list mailing list
Unsubscribe:
24 matches
Mail list logo