Anthony Flury added the comment:
But the __next__ is a method on the iterator;
So long as __iter__ returns a valid iterator (which it does in my pull
request), it will by definition support __next___
Although it is entirely possible that I have misunderstood what you are saying
Anthony Singleton added the comment:
Fuck you
--
components: +Cross-Build, Extension Modules
nosy: +Alex.Willmer, Anthony Singleton
___
Python tracker
<https://bugs.python.org/issue33
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +8005
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue19891>
___
___
Py
Anthony Sottile added the comment:
I was able to reproduce both the `PermissionError` and the `FileNotFoundError`
under these circumstances:
$ docker run --user 123:123 -ti python python
Python 3.7.0 (default, Jul 17 2018, 11:04:33)
[GCC 6.3.0 20170516] on linux
Type "help",
New submission from Anthony Guevara :
When using tailf with Python2.7 there are no issues. When using tailf with
Python3.4 some print statements use the old version 2 style. Python3 also
complains about an implicit conversion. I have included a patch.
--
components: Distutils
files
Anthony Flury added the comment:
The lack of dunder_iter support on mock_open has been resolved in Issue 32933
(Git Hub 5974).
Can I suggest that once the above PR is merged into 3.8 (due imminently
allegedly ), that we should then backport that fix into 3.5, 3.6 & 3.7
as a minimum ?
Anthony Flury added the comment:
Berker,
Thanks for your work on getting this complete.
I would strongly support backporting if possible.
3.5 and 3.6 will be in common use for a while (afaik 3.6 has only now got
delivered to Ubuntu as the default Python 3), and this does fix does allow full
Anthony Flury added the comment:
I still support backporting to 3.6 and 3.7 :
Yes it is correct that this fix could change the behavior of existing test
code, but only if someone has written a test case for a function where :
1. The function under test uses dunder_iter iteration
2. The
Anthony Flury added the comment:
Thank you.
--
___
Python tracker
<https://bugs.python.org/issue32933>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Flury added the comment:
It seems to me that we have three alternatives :
1. Refuse to create the mock object with a suitable Exception (rather than a
crash
2. Copy the object and simply ignore the missing dunder_name (so that funcopy
dunder_name is not set
3. Set funcopy
Anthony Flury added the comment:
Am not a big fan of special casing,
I think the functools.update_wrapper is the way to go - will have a look later
and produce a pull request with some test cases.
--
___
Python tracker
<https://bugs.python.
New submission from Anthony Flury :
On the Multi-processing page
<https://docs.python.org/3/library/multiprocessing.html> (just above the
reference section) there is a warning that the examples wont work from the
interpreter.
This is not entirely accurate in that the examples do wo
Anthony Flury added the comment:
An example that does work :
$ python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue12782>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Sottile added the comment:
It appears it has always had this bug since introduction of absolute/relative
imports in
https://github.com/python/cpython/commit/f7f438ba3b05eb4356e7511401686b07d9dfb6d8
Agree with changing this to `# type: int` and correcting the documentation
Anthony Sottile added the comment:
In fact, trying to use an `ImportFrom` without an integer `level` results in a
`ValueError`:
>>> x = ast.parse('from os import path')
>>> x.body[0].level = None
>>> compile(x, '', 'exec')
Traceback (
Anthony Sottile added the comment:
Here's a simpler reproduction without involving a third party library:
>>> import cProfile
>>> from datetime import timedelta
>>> pr = cProfile.Profile()
>>> timedelta.total_seconds(-25200)
Traceback (most recent cal
Anthony Sottile added the comment:
Hmmm, I don't think mypy has an annotation for "sometimes has an attribute" --
`Optional[T]` is `Union[T, None]` (why I tried `None`).
But you're right, `FromImport` is constructable without a `level` -- it seems
to behave as `level=0`
Change by Anthony Sottile :
--
pull_requests: +9361
___
Python tracker
<https://bugs.python.org/issue16806>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Sottile added the comment:
This change in behaviour is breaking pycodestyle:
https://github.com/PyCQA/pycodestyle/issues/786
Perhaps it shouldn't have been backported (especially all the way to python2.7?)
--
nosy: +Anthony So
Anthony Sottile added the comment:
I'm surprised this was classified as a bug! Though that's subjective so I get
that it's difficult to decide what is and what isn't ¯\(ツ)/¯
--
___
Python tracker
<https://bug
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue33944>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +9494
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Anthony Sottile added the comment:
Does this actually make sense for the `os` module? `PWD` is a variable set by
your interactive shell and doesn't really make sense outside that context.
I expect this function to be too easily confused with `os.getcwd()` and a
source of bugs whe
New submission from Anthony Sottile :
This may be intentional, but the behaviour changed between python2 and python3.
Want to make sure it's intentional as we're working (hacking) around this in
pytest: https://github.com/pytest-dev/pytest/pull/4284
The actual impact on pytest is
Anthony Sottile added the comment:
arbitrary, sure, but deriving from `Exception` maybe?
--
___
Python tracker
<https://bugs.python.org/issue35137>
___
___
Pytho
New submission from Anthony Sottile :
```
import multiprocessing
class E(Exception):
def __init__(self, a1, a2):
Exception.__init__(self, '{}{}'.format(a1, a2))
def f(_):
raise E(1, 2)
multiprocessing.Pool(1).map(f, (1,))
```
Running this causes a hang:
```
$ py
Anthony Sottile added the comment:
`concurrent.futures` is affected as well:
```
import concurrent.futures
class E(Exception):
def __init__(self, a1, a2):
Exception.__init__(self, '{}{}'.format(a1, a2))
def f(_):
raise E(1, 2)
with concurrent.futures.ProcessPool
New submission from Anthony Sottile :
related to https://bugs.python.org/issue35311
encountered here: https://gitlab.com/pycqa/flake8/issues/473
minimal reproduction:
class TestPickleableException(unittest.TestCase):
def test_ParseError(self):
err = ParseError('msg', 2
Change by Anthony Sottile :
--
title: lib2to3.pgen2.parser.ParseError is not roundtrip pickleable ->
lib2to3.pgen2.parse.ParseError is not roundtrip pickleable
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +9960
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35312>
___
___
Py
Anthony Sottile added the comment:
The current prompt works fine for me on zsh -- what's the bug here?
zsh $ virtualenv venv --prompt '(wat)'
Using real prefix
'/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
New python executable in /priva
Change by Anthony Sottile :
--
pull_requests: +10317
___
Python tracker
<https://bugs.python.org/issue26704>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Sottile added the comment:
I've opened a PR with the test included:
https://github.com/python/cpython/pull/11085
--
___
Python tracker
<https://bugs.python.org/is
Anthony Sottile added the comment:
to be honest, I don't recall exactly given it's been 2 and a half years since
the original report with no activity.
if I recall correctly, this was encountered while upgrading the `mock` backport
in yelp's monolithic repository.
I want to
New submission from C Anthony Risinger:
http://hg.python.org/cpython/file/d499189e7758/Tools/scripts/gprof2html.py#l1
...should be self explanatory.
i didn't run into this myself, but i saw that the Archlinux package was fixing
it via `sed`, without the customary link to upstream... so
Changes by Anthony S Valencia :
--
nosy: +antvalencia
___
Python tracker
<http://bugs.python.org/issue25931>
___
___
Python-bugs-list mailing list
Unsubscribe:
Gijsbert Anthony van der Linden added the comment:
Updated the patch and added tests. Fixed a problem with the previous patch:
result of map function was assumed to be list, however map in Python3 returns
an interator. So I replaced it with a list comprehension.
--
nosy
701 - 738 of 738 matches
Mail list logo