[issue26072] pdb fails to access variables closed over

2016-01-09 Thread Antony Lee
New submission from Antony Lee: Consider the following example: def f(x=1): def g(): y = 2 raise Exception g() f() $ python -mpdb -ccontinue example.py <... traceback ...> > /tmp/example.py(4)g() -> raise Exception (Pdb) p x #

[issue26120] pydoc: move __future__ imports out of the DATA block

2016-01-14 Thread Antony Lee
New submission from Antony Lee: Currently, for a module that uses __future__ imports, the DATA section of `pydoc foo` contains these imports interspersed with the "real" data from the module. Even though it is fully-featured _Feature objects that are imported, it probably makes sen

[issue26127] Broken link in docs for tokenize

2016-01-15 Thread Antony Lee
New submission from Antony Lee: The docs for `tokenize.detect_encoding` state `Use open() to open Python source files: it uses detect_encoding() to detect the file encoding.` Unfortunately, clicking on `open` redirects to the builtin `open` function, not to `tokenize.open` as it should

[issue26240] Docstring of the subprocess module should be cleaned up

2016-01-29 Thread Antony Lee
New submission from Antony Lee: subprocess.__doc__ currently contains copies for the docstrings of a bunch of functions in the module (... but not subprocess.run). The docs for the Popen class should be moved into that class' docstring. The module's docstring also mentions the li

[issue26453] SystemError on invalid numpy.ndarray / Path operation

2016-02-27 Thread Antony Lee
New submission from Antony Lee: Running ``` from pathlib import Path import numpy as np np.arange(30) / Path("foo") ``` raises ``` TypeError: argument should be a path or str object, not During handling of the above exception, another exception occurred: SystemError: returne

[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Antony Lee
New submission from Antony Lee: The docstring of struct.unpack currently reads Unpack from the buffer buffer (presumably packed by pack(fmt, ...)) according to the format string fmt. The result is a tuple even if it contains exactly one item. The buffer must contain exactly the amount of data

[issue26535] Minor typo in the docs for struct.unpack

2016-03-10 Thread Antony Lee
Antony Lee added the comment: I think mentioning calcsize is still helpful, so perhaps something like "The buffer must contain exactly as many bytes (I think this is clearer than "the amount of data") as required by the format (this number can be obtained as `struct.calcsize

[issue20012] Re: Allow Path.relative_to() to accept non-ancestor paths

2016-03-23 Thread Antony Lee
Antony Lee added the comment: Kindly bumping the issue. I'd suggest overriding `PurePath.relative_to` in the `Path` class, to something like `PurePath.relative_to(self, other, *, allow_ancestor=False): ...`, which would resolve each ancestor of `self` successively to check whether it is

[issue26792] docstrings of runpy.run_{module,path} are rather sparse

2016-04-17 Thread Antony Lee
New submission from Antony Lee: $ pydoc runpy run_module(mod_name, init_globals=None, run_name=None, alter_sys=False) Execute a module's code without importing it Returns the resulting top level namespace dictionary run_path(path_name, init_globals

[issue23596] gzip argparse interface

2015-03-05 Thread Antony Lee
New submission from Antony Lee: The attached patch reimplements gzip's already existing command-line interface using argparse, both to provide command-line help and to avoid manual argument parsing. -- components: Library (Lib) files: gzip-argparse-cli.patch keywords: patch mes

[issue23871] turning itertools.{repeat, count} into indexable iterables

2015-04-04 Thread Antony Lee
New submission from Antony Lee: itertools.repeat and itertools.count could be made into indexable iterables (rather than iterators), rather than iterators, like range is right now. -- components: Library (Lib) messages: 240096 nosy: Antony.Lee priority: normal severity: normal status

[issue23991] ZipFile sanity checks

2015-04-17 Thread Antony Lee
New submission from Antony Lee: ZipFile.{open,read} could raise IsADirectoryError when called on a directory entry, rather than return an empty bytes. ZipFile.writestr could fail writing non-empty bytes to a directory entry. Use case for open and read: I was trying to write a zip merger

[issue24111] Valgrind suppression file should be updated

2015-05-02 Thread Antony Lee
New submission from Antony Lee: Since PEP445, the suppressions should target _PyObject_{Free,Realloc} instead of PyObject_{Free,Realloc}. -- messages: 242382 nosy: Antony.Lee priority: normal severity: normal status: open title: Valgrind suppression file should be updated versions

[issue24253] pydoc for namespace packages indicates FILE as built-in

2015-05-20 Thread Antony Lee
New submission from Antony Lee: All's in the title: the output of "pydoc foo" where foo is a namespace package (... e.g. any directory in the cwd) says that the package is defined as a builtin (under the FILE entry) -- which is certainly incorrect. -- component

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-17 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker <http://bugs.python.org/issue26240> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-11-13 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker <http://bugs.python.org/issue24459> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue26072] pdb fails to access variables closed over

2016-11-15 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker <http://bugs.python.org/issue26072> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-11-19 Thread Antony Lee
Antony Lee added the comment: PYTHONUSERBASE is also missing. -- nosy: +Antony.Lee ___ Python tracker <http://bugs.python.org/issue24459> ___ ___ Python-bug

[issue24459] Mention PYTHONFAULTHANDLER in the man page

2016-11-19 Thread Antony Lee
Changes by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker <http://bugs.python.org/issue24459> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    1   2   3