New submission from Antony Lee:
I would like to suggest allowing passing "delete=False" to the
TemporaryDirectory constructor, with the effect that the directory is not
deleted when the TemporaryDirectory context manager exits, or when the
TemporaryDirectory object is deleted.
I re
New submission from Antony Lee:
http://bugs.python.org/issue21423 and http://bugs.python.org/issue24980 suggest
adding an initializer/on_new_thread argument to {Thread,Process}PoolExecutor.
I would like to suggest a more unified API, that would allow not only handling
initialization, but
New submission from Antony Lee:
The docs of pkgutil.get_data say "The resource argument should be in the form
of a relative filename, using / as the path separator. The parent directory
name .. is not allowed, and nor is a rooted name (starting with a /)."
In fact (on Python 3.
New submission from Antony Lee:
The output of pydoc for Path.samefile currently reads
pathlib.Path.samefile = samefile(self, other_path)
Return whether `other_file` is the same or not as this file.
(as returned by os.path.samefile(file, other_file)).
It should arguably be something
Antony Lee added the comment:
Actually there's also an extra dot at the end of the first line of the
docstring (redundant with the one on the second line).
--
___
Python tracker
<http://bugs.python.org/is
New submission from Antony Lee:
Initially suggested in #25330: it would be helpful to provide text mode support
(returning unicode, and handling universal newlines) for pkgutil.get_data
(either as a keyword argument, or as a separate function).
--
components: Library (Lib)
messages
New submission from Antony Lee:
$ echo 'from numpy import repeat\nrepeat(2, 3)' | 2to3 -
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer
New submission from Antony Lee:
The additional unpack generalizations provided by Python3.5 rely on a new set
of opcodes, BUILD_{TUPLE,LIST,DICT,SET}_UNPACK, that are not documented in the
docs for the dis module.
--
assignee: docs@python
components: Documentation
messages: 254715
New submission from Antony Lee:
There are a couple of places in the docs where it would be appropriate to
replace __name__ by __spec__.__name__ in order to support the case where the
module is executed as the __main__ module:
- logging.getLogger should certainly use __spec__.__name__ so that
New submission from Antony Lee:
Consider the following minimal example:
class readonlyprop:
__init__ = lambda self, func: None
__get__ = lambda self, inst, cls=None: None
class C:
def bar(self):
pass
@readonlyprop
def foo(self
New submission from Antony Lee:
For a class whose __init__ has no docstring, e.g.
class C:
def __init__(self, arg):
pass
pydoc outputs
<... cropped ...>
class C(builtins.object)
| Methods defined here:
|
| __init__(sel
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
#
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
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
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
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
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
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
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
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
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
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
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
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
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
Changes by Antony Lee :
--
nosy: -Antony.Lee
___
Python tracker
<http://bugs.python.org/issue26240>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Antony Lee :
--
nosy: -Antony.Lee
___
Python tracker
<http://bugs.python.org/issue24459>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Antony Lee :
--
nosy: -Antony.Lee
___
Python tracker
<http://bugs.python.org/issue26072>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antony Lee added the comment:
PYTHONUSERBASE is also missing.
--
nosy: +Antony.Lee
___
Python tracker
<http://bugs.python.org/issue24459>
___
___
Python-bug
Changes by Antony Lee :
--
nosy: -Antony.Lee
___
Python tracker
<http://bugs.python.org/issue24459>
___
___
Python-bugs-list mailing list
Unsubscribe:
201 - 230 of 230 matches
Mail list logo