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
Changes by Jon Dufresne <jon.dufre...@gmail.com>:
--
pull_requests: +2015
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28867>
___
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 better dog
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 tra
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 argument
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__`, the d
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 more
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 code
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
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
Changes by Jon Dufresne <jon.dufre...@gmail.com>:
--
keywords: +patch
Added file:
http://bugs.python.org/file45783/namedtemporaryfile-resourcewarning.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
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 <...>". I've noti
Changes by Jon Dufresne <jon.dufre...@gmail.com>:
--
nosy: +jdufresne
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22431>
___
_
Changes by Jon Dufresne <jon.dufre...@gmail.com>:
--
nosy: +jdufresne
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20361>
___
_
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
keywords: patch
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
Changes by Jon Dufresne jon.dufre...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file37729/http-only-case.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23250
Changes by Jon Dufresne jon.dufre...@gmail.com:
--
nosy: +jdufresne
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7651
___
___
Python-bugs-list
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 BOM. MS Excel
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
21 matches
Mail list logo