New submission from Jon Dufresne:
After upgrading to Python 3.6, I'm working towards cleaning up
"DeprecationWarning: invalid escape sequence". I've noticed that the
Deprecation warning only appears on the first run. It looks like once the code
is compiled to `__pycache
Jon Dufresne added the comment:
I see.
I think if the goal is for developers to see and fix these DeprecationWarnings,
it would help if the warnings were reproducible without taking steps different
from normal Python development. TBH, this is the first time I've ever used the
-B CLI arg
Jon Dufresne added the comment:
Understood. Thanks for the response. I'll have to keep this in mind as I debug
these warnings in the future.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python
New submission from Jon Dufresne:
Lib has some patterns that could be easily discovered and cleaned up. Doing so
will reduce the number of unnecessary temporary lists in memory and unnecessary
function calls. It will also take advantage of Python's own rich features in a
way that bette
Changes by Jon Dufresne :
--
pull_requests: +2015
___
Python tracker
<http://bugs.python.org/issue28867>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jon Dufresne :
Here: https://docs.python.org/3/reference/datamodel.html#object.__get__
The __get__ signature is defined as:
object.__get__(self, instance, owner)
But here: https://docs.python.org/3/howto/descriptor.html#descriptor-protocol
It is defined as:
descr
New submission from Jon Dufresne:
When using unittest, I'll frequently enable -Wall to help catch code smells and
potential bugs.
One feature of this, I'm told when files aren't explicitly closed with an error
like: "ResourceWarning: unclosed file <...>"
Changes by Jon Dufresne :
--
keywords: +patch
Added file:
http://bugs.python.org/file45783/namedtemporaryfile-resourcewarning.patch
___
Python tracker
<http://bugs.python.org/issue28
Jon Dufresne added the comment:
Thanks for the review. I have updated the patch. Now all warnings during tests
handled. Please let me know if there are any other concerns with the changes.
--
Added file:
http://bugs.python.org/file45789/namedtemporaryfile-resourcewarning-2.patch
Jon Dufresne added the comment:
Just for some context, the e.close() is handling this bit of code:
https://github.com/python/cpython/blob/d8132c4da7c46587221c5a244224b770d03860b6/Lib/urllib/request.py#L739-L754
When there is no error, http_error_302() will close the passed fp, on error, it
Jon Dufresne added the comment:
I've taken a new approach to resolve the urllib issues.
I believe HTTPError _should not_ warn when __del__ is called as HTTPError wraps
an existing resource instead of generating its own. IIUC, in this case, I
believe it falls to the responsibility of
Jon Dufresne added the comment:
I decided to try a new direction.
Instead of modifying _TemporaryFileCloser to handle urllib, I've changed urllib
classes to not inherit from _TemporaryFileCloser. The urllib classes are not
temporary files as built by tempfile, so I believe this makes
New submission from Jon Dufresne:
The csv.writer.writerow() does not accept a generator as input. I find this
counter-intuitive and against the spirit of similar APIs. If the generator is
coerced to a list, everything works as expected. See the following test script
which fails on the line
Jon Dufresne added the comment:
I have created an initial patch such that writerow() now allows generators. I
have also added a unit test to demonstrate the fix.
The code now coerces iterators (and generators) to a list, then operates on the
result. I would have preferred to simply iterate
New submission from Jon Dufresne:
The following test script demonstrates that Python's csv library does not
handle a BOM. I would expect the returned row to be equal to expected and to
print 'True' to stdout.
In the wild, it is typical for other CSV writers to add a B
Changes by Jon Dufresne :
--
nosy: +jdufresne
___
Python tracker
<http://bugs.python.org/issue7651>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jon Dufresne:
See http://tools.ietf.org/html/rfc6265#section-5.2.6
Relevant section:
---
5.2.6. The HttpOnly Attribute
If the attribute-name case-insensitively matches the string HttpOnly", the user
agent MUST append an attribute to the cookie-attribute-list wi
Changes by Jon Dufresne :
--
keywords: +patch
Added file: http://bugs.python.org/file37729/http-only-case.patch
___
Python tracker
<http://bugs.python.org/issue23
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
keywo
Changes by Jon Dufresne :
--
nosy: +jdufresne
___
Python tracker
<http://bugs.python.org/issue20361>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Jon Dufresne :
--
nosy: +jdufresne
___
Python tracker
<http://bugs.python.org/issue22431>
___
___
Python-bugs-list mailing list
Unsubscribe:
21 matches
Mail list logo