Jelle Zijlstra added the comment:
Looks like there's nothing left to do here.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jelle Zijlstra added the comment:
As of Python 3.10, thanks to Larry Hastings inspect.signature will have a new
eval_str= parameter that lets you evaluate string annotations. This isn't quite
what you're asking for, though, because typing.get_type_hints does more work
than eval_str does
Jelle Zijlstra added the comment:
We have typing.get_args() as of 3.8.
--
nosy: +Jelle Zijlstra
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jelle Zijlstra added the comment:
Looks like this is no longer relevant.
--
nosy: +Jelle Zijlstra
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Jelle Zijlstra added the comment:
We could add a new argument to `@functools.wraps()` to differentiate between a
wrapper with the same signature and one with a different signature.
Here's a possible design:
* functools.wraps adds a new keyword-only argument signature_changed. It
defaults
Jelle Zijlstra added the comment:
That's because inspect.signature by default follows the `.__wrapped__`
attribute, so it gives you the signature for the *wrapped* function. That
behavior is occasionally problematic (I ran into it in the context of
https://github.com/quora/pyanalyze/issues
Jelle Zijlstra added the comment:
We should not do this, because the wrapping function may have different
defaults, and updating __defaults__ would make it use the wrapped function's
defaults.
Example:
>>> def f(y=1):
... print(y)
...
>>> f()
1
>>>
Jelle Zijlstra added the comment:
You're right, the file doesn't exist on master. I guess there must be some sort
of caching. For what it's worth, I found it by going to the module
documentation on an earlier version and using the dropdown to navigate to 3.10.
If you go to the dataclasses
New submission from Jelle Zijlstra :
symbol is being removed in 3.10, but
https://docs.python.org/3.10/library/symbol.html still exists and claims it
will be removed in "future versions". It was removed in bpo-40939 / GH-21005.
--
assignee: docs@python
components: Doc
Change by Jelle Zijlstra :
--
nosy: +lukasz.langa, ned.deily, pablogsal
___
Python tracker
<https://bugs.python.org/issue44000>
___
___
Python-bugs-list mailin
Jelle Zijlstra added the comment:
PEP 440 applies to Python packages, not to CPython itself. The "+" convention
has been used in CPython for a long time, and changing it without a strong
justification seems risky.
--
nosy: +Jelle Zijlstra -lukasz.langa, ned.deily,
New submission from Jelle Zijlstra :
After the changes from bpo-42345, the Literal documentation claims that
"Literal objects will now raise a TypeError exception during equality
comparisons if one of their parameters are not immutable." But in fact it's
*unhashable* types
Jelle Zijlstra added the comment:
For what it's worth, I checked grep.app and found only one usage of del on
__annotations__, in a test suite:
https://github.com/go-python/gpython/blob/master/py/tests/function.py#L82.
Changing its behavior seems very low risk.
--
nosy: +Jelle
Jelle Zijlstra added the comment:
Like Mark I'm opposed to this change. It requires little work in CPython
itself, but numbers.Integral has now been a part of the language for many years
and the name is used in numerous third-party projects. Forcing all of them to
change doesn't seem
Jelle Zijlstra added the comment:
I agree with Guido that it's better to design inspect.signature to not throw an
error for annotations that don't eval() cleanly.
I use inspect.signature for getting information about callables (third-party
and first-party) in my type checker:
https
Change by Jelle Zijlstra :
--
nosy: +Jelle Zijlstra
___
Python tracker
<https://bugs.python.org/issue43817>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Jelle Zijlstra :
--
keywords: +patch
nosy: +Jelle Zijlstra
nosy_count: 4.0 -> 5.0
pull_requests: +24074
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/25339
___
Python tracker
Jelle Zijlstra added the comment:
It's a bit worse: the actual name is "ptr", the function docstrings say "addr",
and the documentation
(https://docs.python.org/3.9/library/ctypes.html#ctypes.string_at) has
"address". I'd favor updating them all to say &q
Change by Jelle Zijlstra :
--
keywords: +patch
pull_requests: +24029
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25298
___
Python tracker
<https://bugs.python.org/issu
Change by Jelle Zijlstra :
--
assignee: -> Jelle Zijlstra
___
Python tracker
<https://bugs.python.org/issue43783>
___
___
Python-bugs-list mailing list
Un
New submission from Jelle Zijlstra :
Currently, typing.ParamSpec.args and ParamSpec.kwargs are just object()
instances, which makes them useless for runtime inspection of __annotations__.
This type was introduced by PEP 612.
Instead, I propose to make them return some special helper object
Change by Jelle Zijlstra :
--
pull_requests: +23916
pull_request: https://github.com/python/cpython/pull/25174
___
Python tracker
<https://bugs.python.org/issue37
Change by Jelle Zijlstra :
--
keywords: +patch
pull_requests: +23915
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/25174
___
Python tracker
<https://bugs.python.org/issu
New submission from Jelle Zijlstra :
Followup from issue37804: deprecate the remaining camelCase aliases, such as
threading.currentThread. PR coming soon.
--
assignee: Jelle Zijlstra
components: Library (Lib)
messages: 390165
nosy: Jelle Zijlstra, pitrou
priority: normal
severity
Jelle Zijlstra added the comment:
Sure, I can submit a PR. While we're at it, we should probably also deprecate
the setter/getter methods that you mention.
Here's what I propose doing:
- On 3.10 (or 3.11 if it's too late for 3.10), make getName and friends throw a
DeprecationWarning
Jelle Zijlstra added the comment:
The threading documentation for 3.9 still claims "While they are not listed
below, the camelCase names used for some methods and functions in this module
in the Python 2.x series are still supported by this module." It would be
better to me
Jelle Zijlstra added the comment:
Could you post code that fully reproduces the problem?
I suspect the root cause for the bug is in lxml (a third-party library), not in
CPython itself.
--
nosy: +Jelle Zijlstra
___
Python tracker
<ht
New submission from Jelle Zijlstra :
$ gdb ./python
...
(gdb) r
...
Python 3.9.0b1 (tags/v3.9.0b1:97fe9cfd9f8, May 30 2020, 05:26:48)
...
>>> import io
>>> io.FileIO(0).name
0
>>>
Program received signal SIGSEGV, Segmentation fault.
_PyInterpreterState_G
Jelle Zijlstra added the comment:
Thanks Serhyi! I can confirm that the issue I posted is fixed.
--
priority: release blocker -> normal
___
Python tracker
<https://bugs.python.org/issu
Jelle Zijlstra added the comment:
The most recent change here caused a regression. The following file:
```
from typing import Generic, TypeVar, Union
class CannotTransform(Exception): pass
T = TypeVar("T")
E = TypeVar("E", bound=Exception)
class Ok(Generic[T]): pass
Jelle Zijlstra added the comment:
As Ned and Christian hinted, the issue might be related to
--enable-optimizations. Have you tried compiling without that flag?
--
nosy: +Jelle Zijlstra
___
Python tracker
<https://bugs.python.org/issue37
Change by Jelle Zijlstra :
--
pull_requests: +13417
___
Python tracker
<https://bugs.python.org/issue33482>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Jelle Zijlstra :
--
pull_requests: +13416
stage: test needed -> patch review
___
Python tracker
<https://bugs.python.org/issue33482>
___
___
Python-
Jelle Zijlstra added the comment:
> How people can get Iterable[FrameSummary] as an input and pass it to
> format_list()?
If I want to format a traceback, but omit traceback lines that refer to a
particular module (for example, code for a coroutine runner), I could write
`forma
Jelle Zijlstra added the comment:
Do these really need to be builtins?
They seem too specialized to be widely useful; I've personally never needed
them in any async code I've written. It would make more sense to me to put them
in a module like operators.
--
nosy: +Jelle Zijlstra
Change by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
keywords: +patch
pull_requests: +6623
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
Jelle Zijlstra <jelle.zijls...@gmail.com> added the comment:
Makes sense. I can provide a patch to the docs.
--
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:
https://docs.python.org/3.7/library/stdtypes.html#mutable-sequence-types lists
.copy() among the methods provided by mutable sequences. However,
MutableSequence does not actually define .copy():
https://github.com/python/c
Change by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
keywords: +patch
pull_requests: +6465
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:
codecs.StreamRecoder.writelines is implemented as:
def writelines(self, list):
data = ''.join(list)
data, bytesdecoded = self.decode(data, self.errors)
return self.writer.write(data)
It can'
Change by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +5900
___
Python tracker <rep...@bugs.python.org>
<https://bugs.python
New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.connection.Client
claims that there is an "authenticate" argument, but it does not exist in the
implementation
(https://github.com/python/cpy
Change by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
keywords: +patch
pull_requests: +3900
stage: -> patch review
___
Python tracker <rep...@bugs.python.org>
<https://bugs.pyt
New submission from Jelle Zijlstra <jelle.zijls...@gmail.com>:
See https://github.com/python/cpython/pull/1669#pullrequestreview-67229284
--
assignee: Jelle Zijlstra
components: Interpreter Core
messages: 303739
nosy: Jelle Zijlstra, yselivanov
priority: low
severity: normal
New submission from Jelle Zijlstra:
The documentation for traceback.format_tb says "Return a list of
“pre-processed” stack trace entries extracted from the traceback object tb. It
is useful for alternate formatting of stack traces. The optional limit argument
has the same me
Jelle Zijlstra added the comment:
Thanks Joe! I adapted your benchmark suite to also run my implementation. See
https://github.com/JelleZijlstra/cnamedtuple/commit/61b6fbf4de37f8131ab43c619593327004974e52
for the code and results. The results are consistent with what we've seen
before.
Joe's
Jelle Zijlstra added the comment:
I benchmarked some common namedtuple operations with the following script:
#!/bin/bash
echo 'namedtuple creation'
./python -m timeit -s 'from collections import namedtuple' 'x = namedtuple("x",
["a", "b", "c"])'
ech
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
resolution: rejected ->
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Jelle Zijlstra added the comment:
Should we consider a C-based implementation like
https://github.com/ll/cnamedtuple? It could improve speed even more,
but would be harder to maintain and test and harder to keep compatible. My
sense is that it's not worth it unless benchmarks show
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +2796
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Jelle Zijlstra added the comment:
I'm also concerned that the slowness of namedtuple creation is causing people
to avoid using it. I can see why we wouldn't want a complicated solution like
using Argument Clinic, but it's not clear to me why Serhiy's approach in
namedtuple-no-compile.patch
New submission from Jelle Zijlstra:
This code in sre_parse (line 738 and down):
warnings.warn(
'Flags not at the start of the expression %s%s'
% (
source.string[:20], # truncate long regexes
Jelle Zijlstra added the comment:
Sounds like the issue is with numpy, not CPython, so there's little reason to
keep this CPython bug open.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jelle Zijlstra added the comment:
The error is
/home/travis/virtualenv/python3.7-dev/lib/python3.7/site-packages/numpy/core/multiarray.cpython-37m-x86_64-linux-gnu.so:
undefined symbol: PyTraceMalloc_Untrack. On a quick look I couldn't find any
recent changes in CPython related to tracemalloc
Jelle Zijlstra added the comment:
Thanks for doing the merge and backport!
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jelle Zijlstra added the comment:
This is likely an issue with the setup of your project, not with type aliases.
You haven't given enough information to tell me what the real problem is.
I'm not sure what you mean by "I still can't compile 'Blocks'".
--
nosy: +Jell
Jelle Zijlstra added the comment:
I could reproduce this on 3.4, but not on 3.3, 2.7, or master.
--
nosy: +Jelle Zijlstra
versions: +Python 3.4
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jelle Zijlstra added the comment:
Even with the patch, I don't think it's safe to modify os.environ while it's
being accessed concurrently in another thread. The other thread's modification
could arrive while the dict() call in your patch is running (in CPython the GIL
might protect you
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
stage: -> needs patch
versions: +Python 3.7
___
Python tracker <rep...@bugs.python.org>
<h
New submission from Jelle Zijlstra:
Running `make pydoc-topics` in Doc/ on master fails with
$ make pydoc-topics
sphinx-build -b pydoc-topics -d build/doctrees -D latex_elements.papersize= .
build/pydoc-topics
Running Sphinx v1.6.1
making output directory...
loading pickled environment
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
nosy: +Jelle Zijlstra
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +1763
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
According to PEP 492, async and await should be full keywords in Python 3.7,
but this hasn't been implemented yet. I have a patch ready that I'll submit as
a PR soon.
--
components: Interpreter Core
messages: 293976
nosy: Jelle Zijlstra
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +1546
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
Like other ABCs, contextlib.AbstractContextManager should support the pattern
where setting a method to None disables structural subtyping, which was
introduced across the standard library in issue 25958. Ivan Levkivskyi
suggested making
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +1520
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
It would be useful to have an abstract base class for asynchronous context
managers, similar to the existing contextlib.AbstractContextManager. We can
then also add this class to typing and use it as a PEP 544 Protocol.
I have code ready
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +1501
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +1476
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
According to PEP 519, it should. I'll submit a PR soon.
--
components: Library (Lib)
messages: 292642
nosy: Jelle Zijlstra, brett.cannon, tarek
priority: normal
severity: normal
status: open
title: shutil.unpack_archive doesn't support PathLike
New submission from Jelle Zijlstra:
The bytes1 ArgumentDescriptor is duplicated in pickletools.py.
--
messages: 292364
nosy: Jelle Zijlstra, alexandre.vassalotti
priority: normal
pull_requests: 1408
severity: normal
status: open
title: Duplicate code in pickletools.py
Jelle Zijlstra added the comment:
The example is actually correct; I just confirmed by running it in my shell.
Type annotations on local variables are not evaluated at runtime; see PEP 526.
--
nosy: +Jelle Zijlstra
___
Python tracker <
Jelle Zijlstra added the comment:
I agree with George that supporting None here is the better option.
This problem also applies to collections.deque. tuple, list, and deque all have
very similar index implementations, and it would be nice to merge their
argument parsing boilerplate
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +735
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Jelle Zijlstra added the comment:
Thanks, I'll add a PR. This doesn't need to be documented, right?
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from Jelle Zijlstra:
pathlib.Path.__new__ takes **kwargs, but doesn't do anything with them
(https://github.com/python/cpython/blob/master/Lib/pathlib.py#L979). This
doesn't appear to be documented.
This feature should presumably be either documented or removed (probably
Jelle Zijlstra added the comment:
I don't think this is a bug; it is known and expected that you can do all kinds
of bad things by writing bytecode manually. (You can already make Python write
to random memory by giving it LOAD_FAST or STORE_FAST opcodes with incorrect
offsets.)
This doesn't
Jelle Zijlstra added the comment:
I'll look into creating a PR when I have some time.
It would also be useful to tweak the Travis/coverage configuration so that it
fails loudly if one of the tests doesn't pass in the coverage check.
--
___
Python
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
nosy: +Jelle Zijlstra
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
A few tests fail in the coverage Travis target (see e.g.
https://travis-ci.org/python/cpython/jobs/206480468): test_traceback and
test_xml_etree.
I extracted the actual failures by running in verbose mode locally
Jelle Zijlstra added the comment:
Thanks, I'll address your PR comments.
issue 29302 is asking for AsyncExitStack, but that can be an independent
change. I haven't personally felt the need for AsyncExitStack.
--
___
Python tracker <
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
pull_requests: +307
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
An async equivalent of @contextmanager would be an obvious use case for async
generators and the async with statement. In my own code, I have several async
context objects that could have been written more concisely if
@asynccontextmanager was available
Jelle Zijlstra added the comment:
Fixed the typo
--
Added file: http://bugs.python.org/file46445/issue29310-3.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Jelle Zijlstra added the comment:
Thanks! Uploaded a revised patch.
--
Added file: http://bugs.python.org/file46442/issue29310-2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
assignee: Jelle Zijlstra ->
___
Python tracker <rep...@bugs.python.org>
<http://bugs.pyt
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
keywords: +patch
Added file: http://bugs.python.org/file46410/issue29310.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
Document https://github.com/python/typing/pull/338
I should have a patch in the next few days; creating this issue to remind
myself.
--
assignee: Jelle Zijlstra
components: Documentation
messages: 285740
nosy: Jelle Zijlstra
priority: normal
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
Added file: http://bugs.python.org/file46220/typingindentation.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
Added file: http://bugs.python.org/file46219/asyncgenerator3.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
--
keywords: +patch
Added file: http://bugs.python.org/file46215/issue29205.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Jelle Zijlstra added the comment:
The col_offset is actually correct when there is a decorator:
In [26]: code = '@decorator\nasync def f(): pass'
In [27]: tree = ast.parse(code)
In [28]: tree.body[0].col_offset
Out[28]: 0
The same issue appears with async for and async with:
In [31]: code
New submission from Jelle Zijlstra:
The col_offset attribute for ast.AsyncFunctionDef objects points to the "def"
keyword, not to the "async" keyword that actually starts the node.
Test case:
In [18]: code = 'async def f(): pass'
In [19]: tree = ast.parse(code)
In [20]:
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
Added file: http://bugs.python.org/file46203/asyncgenerator2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
New submission from Jelle Zijlstra:
PEP 525 async generators weren't added to typing.py, probably by oversight.
I sent pull requests to typing and typeshed on GitHub to add an AsyncGenerator
class and stub:
- https://github.com/python/typing/pull/346
- https://github.com/python/typeshed/pull
Jelle Zijlstra added the comment:
This might be due to issue22995.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28967>
___
___
New submission from Jelle Zijlstra:
Calling copy.copy on a threading.local subclass copies attributes over
correctly in Python 2.7, but creates an empty object in Python 3.3-3.5 and
fails with a pickle-related error in 3.6.
Marking this as a release blocker and assigning to Ned because
New submission from Jelle Zijlstra:
$ cat baderror.py
class BadError(Exception):
def __init__(self):
self.i = 0
def __hash__(self):
self.i += 1
return self.i
e = BadError()
raise e from e
$ ./python.exe -V
Python 3.5.2+
$ ./python.exe baderror.py
Segmentation
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
Added file: http://bugs.python.org/file45872/issue28603-list.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Changes by Jelle Zijlstra <jelle.zijls...@gmail.com>:
Added file: http://bugs.python.org/file45871/issue28603-ignore.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
301 - 400 of 501 matches
Mail list logo