[issue26704] unittest.mock.patch: Double patching instance method: AttributeError: Mock object has no attribute '__name__'

2018-12-10 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +10317 ___ Python tracker <https://bugs.python.org/issue26704> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Anthony Sottile
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

[issue35312] lib2to3.pgen2.parse.ParseError is not roundtrip pickleable

2018-11-25 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +9960 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35312> ___ ___ Py

[issue35312] lib2to3.pgen2.parse.ParseError is not roundtrip pickleable

2018-11-25 Thread Anthony Sottile
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

[issue35312] lib2to3.pgen2.parser.ParseError is not roundtrip pickleable

2018-11-25 Thread Anthony Sottile
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

[issue35311] exception unpickling error causes `multiprocessing.Pool` to hang forever

2018-11-25 Thread Anthony Sottile
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

[issue35311] exception unpickling error causes `multiprocessing.Pool` to hang forever

2018-11-25 Thread Anthony Sottile
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

[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread Anthony Sottile
Anthony Sottile added the comment: arbitrary, sure, but deriving from `Exception` maybe? -- ___ Python tracker <https://bugs.python.org/issue35137> ___ ___ Pytho

[issue35137] Exception in isinstance when __class__ property raises

2018-11-01 Thread Anthony Sottile
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

[issue1154351] add get_current_dir_name() to os module

2018-10-28 Thread Anthony Sottile
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

[issue34364] problem with traceback for syntax error in f-string

2018-10-28 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +9494 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue33944] Deprecate and remove pth files

2018-10-27 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile ___ Python tracker <https://bugs.python.org/issue33944> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-21 Thread Anthony Sottile
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

[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-10-21 Thread Anthony Sottile
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

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2018-10-20 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +9361 ___ Python tracker <https://bugs.python.org/issue16806> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35001] ImportFrom level cannot be optional

2018-10-16 Thread Anthony Sottile
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

[issue35004] Odd behavior when using datetime.timedelta under cProfile

2018-10-16 Thread Anthony Sottile
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

[issue35001] ImportFrom level cannot be optional

2018-10-16 Thread Anthony Sottile
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

[issue35001] ImportFrom level cannot be optional

2018-10-16 Thread Anthony Sottile
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

[issue12782] Multiple context expressions do not support parentheses for continuation across lines

2018-10-12 Thread Anthony Sottile
Change by Anthony Sottile : -- nosy: +Anthony Sottile ___ Python tracker <https://bugs.python.org/issue12782> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34891] Multi-processing example inaccurate warning

2018-10-06 Thread Anthony Flury
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

[issue34891] Multi-processing example inaccurate warning

2018-10-04 Thread Anthony Flury
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

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-09-16 Thread Anthony Flury
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.

[issue32153] mock.create_autospec fails if an attribute is a partial function

2018-09-15 Thread Anthony Flury
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

[issue32933] mock_open does not support iteration around text files.

2018-09-14 Thread Anthony Flury
Anthony Flury added the comment: Thank you. -- ___ Python tracker <https://bugs.python.org/issue32933> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32933] mock_open does not support iteration around text files.

2018-09-14 Thread Anthony Flury
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

[issue32933] mock_open does not support iteration around text files.

2018-09-12 Thread Anthony Flury
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

[issue21258] Add __iter__ support for mock_open

2018-09-12 Thread Anthony Flury
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 ?

[issue34352] Using tailf with python3.4

2018-08-07 Thread Anthony Guevara
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

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2018-07-26 Thread Anthony Sottile
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",

[issue19891] Exiting Python REPL prompt with user without home directory throws error in atexit._run_exitfuncs

2018-07-26 Thread Anthony Sottile
Change by Anthony Sottile : -- keywords: +patch pull_requests: +8005 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue19891> ___ ___ Py

[issue33336] [imaplib] MOVE is a legal command

2018-07-21 Thread Anthony Singleton
Anthony Singleton added the comment: Fuck you -- components: +Cross-Build, Extension Modules nosy: +Alex.Willmer, Anthony Singleton ___ Python tracker <https://bugs.python.org/issue33

[issue32933] mock_open does not support iteration around text files.

2018-07-09 Thread Anthony Flury
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

[issue23835] configparser does not convert defaults to strings

2018-07-02 Thread Anthony Sottile
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"

[issue17909] Autodetecting JSON encoding

2018-06-03 Thread Anthony Sottile
Change by Anthony Sottile : -- pull_requests: +6992 ___ Python tracker <https://bugs.python.org/issue17909> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-22 Thread Anthony Sottile
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(

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-22 Thread Anthony Sottile
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

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-22 Thread Anthony Sottile
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

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-16 Thread Anthony Sottile
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

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-15 Thread Anthony Sottile
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

[issue33405] PYTHONCOERCECLOCALE no longer being respected

2018-05-02 Thread anthony shaw
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

[issue33006] docstring of filter function is incorrect

2018-04-30 Thread Anthony Flury
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

[issue32933] mock_open does not support iteration around text files.

2018-04-06 Thread Anthony Flury
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

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Anthony Sottile
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

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Anthony Sottile
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://

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-03-20 Thread Anthony Sottile
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-

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Anthony Sottile
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

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Anthony Sottile
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

[issue31550] Inconsistent error message for TypeError with subscripting

2018-03-19 Thread Anthony Sottile
Change by Anthony Sottile <asott...@umich.edu>: -- pull_requests: +5909 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31550> ___

[issue33006] docstring of filter function is incorrect

2018-03-07 Thread Anthony Flury
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

[issue28955] Not matched behavior of numeric comparison with the documentation

2018-03-05 Thread Anthony Flury
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

[issue32933] mock_open does not support iteration around text files.

2018-03-04 Thread Anthony Flury
Change by Anthony Flury <anthony.fl...@btinternet.com>: -- pull_requests: +5743 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32933] mock_open does not support iteration around text files.

2018-03-04 Thread Anthony Flury
Change by Anthony Flury <anthony.fl...@btinternet.com>: -- pull_requests: +5742 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32933] mock_open does not support iteration around text files.

2018-03-04 Thread Anthony Flury
Change by Anthony Flury <anthony.fl...@btinternet.com>: -- pull_requests: +5741 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python

[issue32933] mock_open does not support iteration around text files.

2018-03-04 Thread Anthony Flury
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

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2018-03-01 Thread Anthony Sottile
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

[issue32933] mock_open does not support iteration around text files.

2018-02-25 Thread Anthony Flury
Change by Anthony Flury <anthony.fl...@btinternet.com>: -- type: -> behavior ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32933] mock_open does not support iteration around text files.

2018-02-24 Thread Anthony Flury
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.

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile
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

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile
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)

[issue30945] loop.create_server does not detect if the interface is IPv6 enabled

2018-02-09 Thread Anthony Sottile
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] ==

[issue32770] collections.counter examples are misleading

2018-02-05 Thread Anthony Flury
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

[issue32770] collections.counter examples are misleading

2018-02-05 Thread Anthony Flury
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

[issue32770] collections.counter examples are misleading

2018-02-04 Thread Anthony Flury
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

[issue32539] os.listdir(...) on deep path on windows in python2.7 fails with errno 123

2018-01-12 Thread Anthony Sottile
Change by Anthony Sottile <asott...@umich.edu>: -- keywords: +patch pull_requests: +5023 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32539] os.listdir(...) on deep path on windows in python2.7 fails with errno 123

2018-01-12 Thread Anthony Sottile
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

[issue30697] segfault in PyErr_NormalizeException() after memory exhaustion

2017-12-19 Thread Anthony Sottile
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

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-15 Thread Anthony Sottile
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

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-11 Thread Anthony Sottile
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

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-11 Thread Anthony Sottile
Change by Anthony Sottile <asott...@umich.edu>: -- keywords: +patch pull_requests: +4696 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue32277] SystemError via chmod(symlink, ..., follow_symlinks=False)

2017-12-11 Thread Anthony Sottile
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) ```

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-12-10 Thread Anthony Sottile
Change by Anthony Sottile <asott...@umich.edu>: -- pull_requests: +4684 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31940> ___

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
Change by Anthony Sottile <asott...@umich.edu>: -- keywords: +patch pull_requests: +4230 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
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

[issue31940] copystat on symlinks fails for alpine -- faulty lchmod implementation?

2017-11-03 Thread Anthony Sottile
New submission from Anthony Sottile <asott...@umich.edu>: Fortunately, this can be reproduced with the testsuite: ``` == ERROR: test_copystat_symlinks (__main__.Test

[issue31766] Python 3.5 missing from documentation

2017-10-12 Thread Anthony Flury
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

[issue31766] Python 3.5 missing from documentation

2017-10-11 Thread Anthony Flury
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

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-24 Thread Anthony Sottile
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

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-22 Thread Anthony Sottile
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

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-21 Thread Anthony Sottile
Changes by Anthony Sottile <asott...@umich.edu>: -- keywords: +patch pull_requests: +3679 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue31550] Inconsistent error message for TypeError with subscripting

2017-09-21 Thread Anthony Sottile
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

[issue29298] argparse fails with required subparsers, un-named dest, and empty argv

2017-09-20 Thread Anthony Sottile
Changes by Anthony Sottile <asott...@umich.edu>: -- keywords: +patch pull_requests: +3669 stage: -> patch review ___ Python tracker <rep...@bugs.python.org> <https://bugs.pyt

[issue9253] argparse: optional subparsers

2017-09-15 Thread Anthony Sottile
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/

[issue9253] argparse: optional subparsers

2017-08-14 Thread Anthony Sottile
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

[issue26510] [argparse] Add required argument to add_subparsers

2017-08-14 Thread Anthony Sottile
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>

[issue31204] Support __fspath__ in shlex.quote

2017-08-14 Thread Anthony Sottile
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 ___

[issue31204] Support __fspath__ in shlex.quote

2017-08-14 Thread Anthony Sottile
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

[issue26510] [argparse] Add required argument to add_subparsers

2017-08-08 Thread Anthony Sottile
Changes by Anthony Sottile <asott...@umich.edu>: -- pull_requests: +3061 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26510> ___

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2017-07-09 Thread Anthony Sottile
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 "

[issue30338] LC_ALL=en_US + io.open() => LookupError: (osx)

2017-05-10 Thread Anthony Sottile
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

[issue30210] No Documentation on tkinter dnd module

2017-04-29 Thread Anthony Flury
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

[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2017-04-24 Thread Anthony Tuininga
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

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
Changes by anthony shaw <anthonys...@apache.org>: -- stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
Changes by anthony shaw <anthonys...@apache.org>: -- pull_requests: +1215 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30029> ___

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
anthony shaw added the comment: yey! I figured it out!! -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30029> ___ ___ Pyth

[issue30029] Compiler "'await' outside function" error message is unreachable

2017-04-09 Thread anthony shaw
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

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-18 Thread Anthony Zhang
Changes by Anthony Zhang <azha...@gmail.com>: -- pull_requests: +127 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29110> ___ _

[issue15451] PATH is not honored in subprocess.Popen in win32

2017-02-03 Thread Anthony Scopatz
Changes by Anthony Scopatz <scop...@gmail.com>: -- nosy: +Anthony Scopatz versions: +Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29258] __init__.py required for pkgutil.walk_packages in python3

2017-01-12 Thread Anthony Sottile
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

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2017-01-10 Thread Anthony Scopatz
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

<    1   2   3   4   5   6   7   8   >