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:
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 /private/tmp/venv/bin/python3.7
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +9960
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue35312>
___
___
Py
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
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, None, (1
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.ProcessPoolExecutor(2
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:
```
$ python3.7 t2
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 :
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 the use
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 when
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +9494
stage: needs patch -> patch review
___
Python tracker
<https://bugs.python.org/issu
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue33944>
___
___
Python-bugs-list mailing list
Unsubscribe:
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://bugs.python.org/issue33
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 Sottile
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:
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` (I guess a
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 call las
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 (most recent call last):
File
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
Change by Anthony Sottile :
--
nosy: +Anthony Sottile
___
Python tracker
<https://bugs.python.org/issue12782>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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 d
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.
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:
Thank you.
--
___
Python tracker
<https://bugs.python.org/issue32933>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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:
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 ?
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 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",
Change by Anthony Sottile :
--
keywords: +patch
pull_requests: +8005
stage: -> patch review
___
Python tracker
<https://bugs.python.org/issue19891>
___
___
Py
Anthony Singleton added the comment:
Fuck you
--
components: +Cross-Build, Extension Modules
nosy: +Alex.Willmer, Anthony Singleton
___
Python tracker
<https://bugs.python.org/issue33
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 Sottile added the comment:
Unclear if this regression (from this patch) is intentional or not:
```
$ python3.6 -c 'import configparser; configparser.ConfigParser(defaults={"a":
None})'
$ python3.7 -c 'import configparser; configparser.ConfigParser(defaults={"a"
Change by Anthony Sottile :
--
pull_requests: +6992
___
Python tracker
<https://bugs.python.org/issue17909>
___
___
Python-bugs-list mailing list
Unsubscribe:
Anthony Sottile <asott...@umich.edu> added the comment:
The bug is orthogonal, you can trigger it without the `required=` keyword
argument via the (currently suggested) monkeypatch workaround which restores
the pre-3.3 behaviour:
import argparse
parser = argparse.ArgumentParser(
Anthony Sottile <asott...@umich.edu> added the comment:
That's a separate issue (also a bug introduced by the bad 3.3 patch):
https://bugs.python.org/issue29298
I have an open PR to fix it as well but it has not seen review action:
https://github.com/python/cpython/pul
Anthony Sottile <asott...@umich.edu> added the comment:
Is there then no pathway for actually fixing the bug? aka how can I get
`required=True` to be the default.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Anthony Sottile <asott...@umich.edu> added the comment:
Considering the huge popularity of these SO questions, I don't think this
should be reverted:
- https://stackoverflow.com/questions/23349349/argparse-with-required-subparser
-
https://stackoverflow.com/questions/22990977/wh
Anthony Sottile <asott...@umich.edu> added the comment:
According to the other bugs, the change in 3.3 was an inadvertent regression.
The fact that it didn't get fixed for so long is mostly due to the unmaintained
state of argparse in the stdlib. The change in behaviour here is the
New submission from anthony shaw <anthony.p.s...@gmail.com>:
observing a behaviour on Python 3.7 b2 that doesn't match what's documented in
PEP 538
PEP 538 states that the locale coercion behaviour can be disabled through the
PYTHONCOERCECLOCALE environment variable.
I would then
Anthony Flury <anthony.fl...@btinternet.com> added the comment:
Strictly speaking the official Python2 reference document isn't a great example
- for instance:
' If function is None, the identity function is assumed, that is, all elements
of iterable that are false are removed.'
I
Anthony Flury <anthony.fl...@btinternet.com> added the comment:
No - it isn't related.
In the case of mock_open; it isn't intended to be a simple MagicMock - it is
meant to be a mocked version of open, and so to be useful as a testing tool, it
should emulate a file as much as po
Anthony Sottile <asott...@umich.edu> added the comment:
Yeah, I picked the default value `True` because I couldn't actually find a user
of subparsers that _wanted_ optional subparsers. ¯\_(ツ)_/¯
--
___
Python tracker <rep...@bugs.python.or
Anthony Sottile <asott...@umich.edu> added the comment:
Grabbed the wrong SO link, I believe this is the one I meant to link to:
https://stackoverflow.com/a/18283730/812183
--
___
Python tracker <rep...@bugs.python.org>
<https://
Anthony Sottile <asott...@umich.edu> added the comment:
The intention of the change in issue 26510 was to pick the least surprising
behaviour for the default value of subparsers -- the compatiblity with the
behaviour before the regression was introduced in 3.3 was a nice side-
Anthony Sottile <asott...@umich.edu> added the comment:
I think the main concern here is ease in portability coupled with the
incorrectness of the current message (pointed out in
https://bugs.python.org/issue31550#msg302738)
For instance it was consistent in 2.7.1, but not later on in t
Anthony Sottile <asott...@umich.edu> added the comment:
I made a new PR which instead *reverts* the python2.7 patch to restore
consistency
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Change by Anthony Sottile <asott...@umich.edu>:
--
pull_requests: +5909
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31550>
___
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
keywords: +patch
pull_requests: +5782
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
keywords: +patch
pull_requests: +5748
stage: needs patch -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
pull_requests: +5743
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
pull_requests: +5742
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
pull_requests: +5741
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
keywords: +patch
pull_requests: +5740
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Anthony Sottile <asott...@umich.edu> added the comment:
Still a problem in 3.7:
$ python3.7
Python 3.7.0b2 (default, Feb 28 2018, 06:59:18)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information
Change by Anthony Flury <anthony.fl...@btinternet.com>:
--
type: -> behavior
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from Anthony Flury <anthony.fl...@btinternet.com>:
Using the unittest.mock helper mock_open with multi-line read data, although
readlines method will work on the mocked open data, the commonly used iterator
idiom on an open file returns the equivalent of an empty file.
Anthony Sottile <asott...@umich.edu> added the comment:
Applying this patch makes the tests pass for me, but I don't think the patch is
appropriate (just hides the bug):
```
$ git diff
diff --git a/Lib/test/test_asyncio/test_unix_events.py
b/Lib/test/test_asyncio/test_unix_events.py
Anthony Sottile <asott...@umich.edu> added the comment:
Actually, my issue seems to be something more strange.
The host being passed in is `localhost` which resolves to:
```
>>> pprint.pprint(socket.getaddrinfo('localhost', 80))
[(,
,
6,
'',
('127.0.0.1', 80)
Anthony Sottile <asott...@umich.edu> added the comment:
Seeing this as well when running the cpython test suite in docker:
```
$ ./python -m test.test_asyncio
...
[18 similar traces omitted]
==
Anthony Flury <anthony.fl...@btinternet.com> added the comment:
Cheryl :
When you iterate around a counter instance it does return keys in the order
they are first encountered/inserted - so I agree with you that it is an ordered
collection from Python 3.7 onwards (although the ite
Anthony Flury <anthony.fl...@btinternet.com> added the comment:
Raymond,
I completely understand your comment but I do disagree.
My view would be that the documentation of the stdlib should document the entry
level use cases.
The first example given uses nothing special from the Counter
New submission from Anthony Flury <anthony.fl...@btinternet.com>:
The first example given for collections.Counter is misleading - the
documentation ideally should show the 'best' (one and only one) way to do
something and the example is this :
>>> # Tally occurrences of
Change by Anthony Sottile <asott...@umich.edu>:
--
keywords: +patch
pull_requests: +5023
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from Anthony Sottile <asott...@umich.edu>:
On windows, a deep path can be accessed by prefixing the path with \\?\
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx?f=255=-2147217396#maxpath
The call to `listdir()` fails because it uses a
Anthony Sottile <asott...@umich.edu> added the comment:
Should this have landed in python3.6? It removes a public symbol
`PyExc_RecursionErrorInst` (abi break?)
--
nosy: +Anthony Sottile
___
Python tracker <rep...@bugs.python.or
Anthony Sottile <asott...@umich.edu> added the comment:
if I'm reading the manpage correctly: `readlink` tells the filename that the
symlink points to. lchmod is concerned with setting the `stat` on the link
itself (which only some platforms actually s
Anthony Sottile <asott...@umich.edu> added the comment:
I noticed it when I changed the test preconditions in
https://github.com/python/cpython/pull/4783
I tried changing a test to trigger this (in this branch) but I found I was just
implementing exactly the test in the `skip` condition
Change by Anthony Sottile <asott...@umich.edu>:
--
keywords: +patch
pull_requests: +4696
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from Anthony Sottile <asott...@umich.edu>:
While investigating https://bugs.python.org/issue31940 I noticed the following
is raised as `SystemError` instead of the expected `NotImplementedError`
(note: you need a platform with fchmodat but does not support nofollow)
```
Change by Anthony Sottile <asott...@umich.edu>:
--
pull_requests: +4684
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31940>
___
Change by Anthony Sottile <asott...@umich.edu>:
--
keywords: +patch
pull_requests: +4230
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Anthony Sottile <asott...@umich.edu> added the comment:
Here's one idea for a patch (inspired by the rest of the function):
```
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 464ee91..2099289 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -213,6 +213,13 @@ def copystat(sr
New submission from Anthony Sottile <asott...@umich.edu>:
Fortunately, this can be reproduced with the testsuite:
```
==
ERROR: test_copystat_symlinks (__main__.Test
Anthony Flury <anthony.fl...@btinternet.com> added the comment:
Isn't Python 2.7 in Security Fix only as well ?
It seems strange; Python 3.5 probably the most heavily installed Python 3
release (every Ubuntu installation has Python 3.5 installed by default - and
neither Python 3.6
New submission from Anthony Flury <anthony.fl...@btinternet.com>:
In the Python version pull down list on docs.python.org, Python3.5 used to be
listed, but has now been removed; the list only contains 2.7, 3.6 & 3.7.
Python 3.5 is still the official Python 3.5 release in the Ubuntu
Anthony Sottile added the comment:
Shouldn't you wait for Raymond's arguments before outright closing the PR?
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/i
Anthony Sottile added the comment:
All I'm really looking for is consistency -- should the change to 2.7 be
reverted instead?
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/i
Changes by Anthony Sottile <asott...@umich.edu>:
--
keywords: +patch
pull_requests: +3679
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from Anthony Sottile:
There's a bit of history I don't understand and couldn't find the appropriate
trail for.
The original error message from the 2.6 era:
$ python2.6 -c 0[0]
Traceback (most recent call last):
File "", line 1, in
TypeError: 'int' object is unsub
Changes by Anthony Sottile <asott...@umich.edu>:
--
keywords: +patch
pull_requests: +3669
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Anthony Sottile added the comment:
My patch mainly addresses the regression pointed out by mike bayer (zzzeek)'s
comment.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/
Anthony Sottile added the comment:
I've attempted to address some of the backward/forward compatibility issue with
subparsers becoming optional by default (vs required by default in python2)
with this pull request: https://github.com/python/cpython/pull/3027 (would love
to get a review
Anthony Sottile added the comment:
I've added a patch for this https://github.com/python/cpython/pull/3027
Would love to get a review so it could be included
--
nosy: +Anthony Sottile
___
Python tracker <rep...@bugs.python.org>
Anthony Sottile added the comment:
Ah oops, I'm incorrect here, the __fspath__ object I was dealing with supported
__str__ and that's how subprocess was converting it -- not via __fspath__.
--
stage: -> resolved
status: open -> closed
___
New submission from Anthony Sottile:
Given shlex.quote often is used closely with calls in `subprocess`, should it
also support quoting __fspath__ objects?
I'll write up a quick patch for this
--
components: Library (Lib)
messages: 300270
nosy: Anthony Sottile
priority: normal
Changes by Anthony Sottile <asott...@umich.edu>:
--
pull_requests: +3061
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26510>
___
Anthony Sottile added the comment:
pypy seems to have this right (though I don't know enough about their internals
to know if cpython can benefit from their patch)
$ venvpypy/bin/pythonPython 2.7.10 (3260adbeba4a, Apr 19 2016, 17:42:20)
[PyPy 5.1.0 with GCC 4.8.4] on linux2
Type "
New submission from Anthony Sottile:
Originally seen here: https://github.com/Microsoft/vscode/issues/26227
```
$ LC_ALL=en_US python -c 'import io; io.open("/dev/null")'
Traceback (most recent call last):
File "", line 1, in
LookupError: unknown encoding:
```
Admi
New submission from Anthony Flury:
There is a level of drag and drop support within the tkinter package - namely
the tkinter.dnd module. However there is no documentation at this time about
drag and drop either on docs.python.org or on the tkinter reference manual.
The only documentation
New submission from Anthony Tuininga:
Right now there is no documented way to create a datetime instance with a
tzinfo instance. The documented macros all hard code the value Py_None for the
tzinfo parameter. Using the PyObject_Call() method instead of the macro for
creating a datetime
Changes by anthony shaw <anthonys...@apache.org>:
--
stage: -> resolved
status: open -> closed
___
Python tracker <rep...@bugs.python.org>
<http://bugs.
Changes by anthony shaw <anthonys...@apache.org>:
--
pull_requests: +1215
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30029>
___
anthony shaw added the comment:
yey! I figured it out!!
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30029>
___
___
Pyth
New submission from anthony shaw:
This is related to issue26188,
Using await in a simple statement (outside of an async def method) raises
SyntaxError with the unhelpful message "invalid syntax".
It seems obvious once you've read PEP492 in detail, but I think that as more
and more
Changes by Anthony Zhang <azha...@gmail.com>:
--
pull_requests: +127
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29110>
___
_
Changes by Anthony Scopatz <scop...@gmail.com>:
--
nosy: +Anthony Scopatz
versions: +Python 3.6
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Anthony Sottile:
PEP420 makes __init__.py files optional:
https://docs.python.org/3/whatsnew/3.3.html#pep-420-implicit-namespace-packages
Though it seems without them, pkgutil.walk_packages does not function as
desired: https://docs.python.org/3/library/pkgutil.html
Anthony Scopatz added the comment:
It certainly seems related. Attached is an image that displays the scaling of
the cache example. The full notebook that generated this image is at [1]. The
notebook shows that it does seem to converge towards a value of 1/6th.
1. https://gist.github.com
501 - 600 of 734 matches
Mail list logo