Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 5.0 -> 6.0
pull_requests: +30158
pull_request: https://github.com/python/cpython/pull/32069
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
keywords: +patch
pull_requests: +29941
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31841
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
Discussed on typing-sig at
https://mail.python.org/archives/list/typing-...@python.org/thread/GULRKYI7XOB3FLAEFC6OYSTBS5FIA5PU/
--
components: Library (Lib)
messages: 415023
nosy: JelleZijlstra, hauntsaninja
priority: normal
severity: normal
status: open
Change by Shantanu :
--
keywords: +patch
pull_requests: +29649
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/31522
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
https://github.com/python/cpython/blob/cf345e945f48f54785799390c2e92c5310847bd4/Python/compile.c#L2537
```
/* ultimately generate code for:
= __build_class__(, , *, **)
where:
is a function/closure created from the class body
Shantanu added the comment:
This is now PEP 680: https://www.python.org/dev/peps/pep-0680/
Currently being discussed at:
https://discuss.python.org/t/pep-680-tomllib-support-for-parsing-toml-in-the-standard-library/13040
--
___
Python tracker
Shantanu added the comment:
We've started a PEP draft.
https://github.com/hauntsaninja/peps/blob/toml-pep/pep-.rst shows a
rendered version.
https://github.com/hauntsaninja/peps/pull/1 is a PR from the toml-pep branch to
main, to help ease of review / discussion.
If you're
Shantanu added the comment:
pradyunsg kindly pointed me to an ongoing thread in Packaging discuss:
https://discuss.python.org/t/adopting-recommending-a-toml-parser/4068/84
So seems like a PEP will be necessary. I'm happy to do legwork for that. (The
PEP that I'll write di
Shantanu added the comment:
> You will need to address where the code is coming from, why that code should
> be used, what's the API, etc.
Happy new year, potentially-toml-wanting friends!
I wrote up a draft of a proposal here:
https://gist.github.com/h
Shantanu added the comment:
Given that this currently seems blocked on the broad question of "how should
additions and removals to the stdlib be managed", I'd like to not focus too
hard just yet on the specifics of tomli. I assume it's unlikely, but for all we
know, th
Shantanu added the comment:
Hopefully tomli being less than a year old should not be a blocker, after all,
TOML v1.0.0 is itself less than a year old.
Despite tomli being new code, it's pretty widely used. Reverse dependencies
include pip, pytest, mypy, black, flit, coverage, setuptool
Shantanu added the comment:
I'd love it if we could make this happen for Python 3.11. What can I do to
help, e.g. would it be helpful if I drafted a PEP?
Several projects have switched to using tomli
(https://github.com/hukkin/tomli), which is fully compatible with TOML v1.0.0
and is
Shantanu added the comment:
Sorry if my message was confusing. Hopefully the following makes things clear:
3.9.6: snippet runs without error
3.9.7, with bpo-44806: (a probably reasonable) TypeError, but a breaking change
main, with bpo-45081: RecursionError
Shantanu added the comment:
As I mentioned in the post, bpo-45081 actually makes this issue worse, since we
get a RecursionError.
I think `TypeError: Protocols cannot be instantiated` is probably okay
behaviour (as opposed to RecursionError), more just unfortunate that it seems
to be an
Change by Shantanu :
--
nosy: +lukasz.langa
___
Python tracker
<https://bugs.python.org/issue45121>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Shantanu :
Consider:
```
from typing import Protocol
class P(Protocol):
...
class C(P):
def __init__(self):
super().__init__()
C()
```
This code passes without error on 3.9.6.
With 3.9.7, we get:
```
Traceback (most recent call last):
File "/
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 6.0 -> 7.0
pull_requests: +24506
pull_request: https://github.com/python/cpython/pull/25820
___
Python tracker
<https://bugs.python.org/issu
Shantanu added the comment:
Do you see what's generating it? As far as I can tell, the RST was removed a
while ago in https://github.com/python/cpython/pull/21624
--
nosy: +hauntsaninja
___
Python tracker
<https://bugs.python.org/is
Shantanu added the comment:
FYI, probably unavoidable, but this appears to have broken pytest
https://github.com/pytest-dev/pytest/issues/8539
--
nosy: +hauntsaninja
___
Python tracker
<https://bugs.python.org/issue43
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 12.0 -> 13.0
pull_requests: +22798
pull_request: https://github.com/python/cpython/pull/23951
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 8.0 -> 9.0
pull_requests: +22577
pull_request: https://github.com/python/cpython/pull/23715
___
Python tracker
<https://bugs.python.org/issu
Shantanu added the comment:
You're right that Callable[[P], int] is invalid, so a flat representation isn't
currently ambiguous. But a flat representation would foist the responsibility
for checking that to all users of `__args__`. If your code isn't ParamSpec
aware, you
Shantanu added the comment:
I think ((int, int), str) is superior to the others and if it can be made to
work, that's what we should do.
Note that if variadic type proposals go anywhere
(https://docs.google.com/document/d/1oXWyAtnv0-pbyJud8H5wkpIk8aajbkX-leJ8JXsE318/edit#)
Shantanu added the comment:
My implementation in PR 22848 turns callable into a type and uses `__new__`. It
isn't too bad. It does appear to affect performance of callable though.
Here's some data on how often typing imports are used. This is the number of
files in which `from typ
Shantanu added the comment:
Sure, I put together a draft PR here:
https://github.com/python/cpython/pull/22848 Tests pass cleanly, though timeit
indicates callable is slower.
I haven't added instancecheck, which we should consider doing, since
`isinstance(x, callable)` would now r
Change by Shantanu :
--
keywords: +patch
pull_requests: +21796
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22848
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
In the post PEP 585 world, it seems like a bit of a stumbling block for
builtins.callable to not able to be parametrised (in a runtime context). Post
PEP 604, I'd expect typing.Callable to be the most used typing import after
typing.Any, so much of PEP
Shantanu added the comment:
Bumping again!
--
___
Python tracker
<https://bugs.python.org/issue28002>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Shantanu :
--
keywords: +patch
pull_requests: +21159
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22069
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
To quote the docs (https://docs.python.org/3/library/asyncio-dev.html):
```
By default asyncio runs in production mode. In order to ease the development
asyncio has a debug mode.
There are several ways to enable asyncio debug mode:
Setting the
Change by Shantanu :
--
pull_requests: +21145
pull_request: https://github.com/python/cpython/pull/22048
___
Python tracker
<https://bugs.python.org/issue39
Change by Shantanu :
--
pull_requests: +21123
pull_request: https://github.com/python/cpython/pull/22023
___
Python tracker
<https://bugs.python.org/issue39
Shantanu added the comment:
I was working on updating typeshed stubs to reflect this change. It looks like
the parameter wasn't actually added to the base class
(https://github.com/python/cpython/blob/c3a651ad2544d7d1be389b63e9a4a58a92a31623/Lib/concurrent/futures/_base.py#L608),
Shantanu added the comment:
I was looking at adding stubs for these to typeshed. Is it intentional that we
ignore the flags and address arguments in the implementation?
--
nosy: +hauntsaninja
___
Python tracker
<https://bugs.python.org/issue28
Shantanu added the comment:
Just bumping this issue, as per dev guide, since
https://github.com/python/cpython/pull/19612 has been ready for about two
months. Would be grateful for review :-)
--
___
Python tracker
<https://bugs.python.
Change by Shantanu :
--
pull_requests: +19718
pull_request: https://github.com/python/cpython/pull/20466
___
Python tracker
<https://bugs.python.org/issue40
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 8.0 -> 9.0
pull_requests: +19695
pull_request: https://github.com/python/cpython/pull/20438
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 6.0 -> 7.0
pull_requests: +19694
pull_request: https://github.com/python/cpython/pull/20438
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 5.0 -> 6.0
pull_requests: +19505
pull_request: https://github.com/python/cpython/pull/20208
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
keywords: +patch
pull_requests: +19499
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20200
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
To do all the functions in csv, we'd need to have support for **kwargs, tracked
in https://bugs.python.org/issue20291. Am attaching a PR for the ones that can
be made to work today.
--
components: Argument Clinic
messages: 369314
nosy: hauntsa
Change by Shantanu :
--
keywords: +patch
pull_requests: +19496
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20196
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
pull_requests: +19467
pull_request: https://github.com/python/cpython/pull/20168
___
Python tracker
<https://bugs.python.org/issue13
Shantanu added the comment:
The code works on 3.8 for me, but has regressed on 3.9 master. Looks like this
is caused by https://bugs.python.org/issue36287
(https://github.com/python/cpython/pull/18843)
--
nosy: +hauntsaninja
___
Python tracker
Change by Shantanu :
--
keywords: +patch
pull_requests: +19463
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20163
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
As the title says! Am submitting a PR.
--
components: Argument Clinic
messages: 369153
nosy: hauntsaninja, larry
priority: normal
severity: normal
status: open
title: Use Argument Clinic for bisect
___
Python tracker
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 4.0 -> 5.0
pull_requests: +19440
pull_request: https://github.com/python/cpython/pull/20135
___
Python tracker
<https://bugs.python.org/issu
Shantanu added the comment:
I'm wondering if this should be mentioned in Python 3.9's What's New,
potentially at https://docs.python.org/3.9/whatsnew/3.9.html#sys ?
This change broke one of mypy's tests on 3.9 and it was a little tricky to find
what had chang
Shantanu added the comment:
This looks like a duplicate of https://bugs.python.org/issue38786, which was
fixed in https://github.com/python/cpython/pull/17143
That PR wasn't backported, but maybe it should be.
--
nosy: +hauntsaninja
___
P
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 6.0 -> 7.0
pull_requests: +19428
pull_request: https://github.com/python/cpython/pull/19806
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
keywords: +patch
pull_requests: +19390
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20086
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
```
~/dev/cpython master λ ./python.exe --version --version
Python 3.9.0a6+ (heads/master:a15c9b3a05, May 14 2020, 00:31:47)
[Clang 11.0.0 (clang-1100.0.33.17)]
# should raise a syntax error, instead crashes
~/dev
New submission from Shantanu :
```
~master λ python3.8
Python 3.8.2 (default, Apr 21 2020, 00:39:48)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> impor
Change by Shantanu :
--
nosy: +hauntsaninja
nosy_count: 7.0 -> 8.0
pull_requests: +19226
pull_request: https://github.com/python/cpython/pull/19911
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
keywords: +patch
pull_requests: +19205
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19894
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
Currently fails if we don't have any arguments before *args and **kwargs
```
~ λ python3.9
Python 3.9.0a6+ (heads/master:c95e691, May 3 2020, 19:57:46)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "
Change by Shantanu :
--
keywords: +patch
pull_requests: +19204
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19893
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
```
~ λ python3.9
Python 3.9.0a6+ (heads/master:c95e691, May 3 2020, 19:57:46)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> impo
Change by Shantanu :
--
keywords: +patch
nosy: +hauntsaninja
nosy_count: 3.0 -> 4.0
pull_requests: +19145
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19824
___
Python tracker
<https://bugs.python.org/i
Shantanu added the comment:
If it helps triage, this is the BPO for where the changes to compileall were
made: https://bugs.python.org/issue38112
--
___
Python tracker
<https://bugs.python.org/issue40
New submission from Shantanu :
Python 3.9 added the stripdir argument to compileall functions. From
https://docs.python.org/3.9/library/compileall.html#compileall.compile_file:
> The stripdir, prependdir and limit_sl_dest arguments correspond to the -s, -p
> and -e options described
Change by Shantanu :
--
keywords: +patch
pull_requests: +19127
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19806
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
While the signature was updated in the documentation, the text below wasn't,
and still reflects the old default of 10.
https://docs.python.org/3.9/library/compileall.html#compileall.compile_dir
--
assignee: docs@python
components: Documentation
mes
Change by Shantanu :
--
nosy: +hauntsaninja
___
Python tracker
<https://bugs.python.org/issue40222>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Shantanu :
With Python 3.8:
```
Python 3.8.1 (default, Jan 23 2020, 23:36:06)
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>&g
Change by Shantanu :
--
keywords: +patch
pull_requests: +18946
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/19612
___
Python tracker
<https://bugs.python.org/issu
Shantanu added the comment:
Now that `ast.unparse` is being added to stdlib, I thought I'd bump this
thread. The third party library `astunparse` (which attempts to support
multiple Python versions while staying very close to Tools/parser/unparse.py)
has an implementation that work
Shantanu added the comment:
Sounds good, thought I'd check! :-) Definitely looks annoying to remove from
the Python version too.
--
___
Python tracker
<https://bugs.python.org/is
Change by Shantanu :
--
keywords: +patch
pull_requests: +17969
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18602
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
Currently io.open_code (added in Python 3.8) only accepts str arguments. As per
PEP 519, it should probably also accept PathLike. It might be worth extending
it to accept bytes as well, both for convenience and because documentation
claims it should be
New submission from Shantanu :
The dunder methods on decimal.Decimal accept an extra context argument in the
pure Python version which the C version does not (violating PEP 399).
This came up in https://github.com/python/typeshed/pull/3633, where Sebastian
provided the following summary of
Change by Shantanu :
--
keywords: +patch
pull_requests: +17966
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18599
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
The softspace attribute of files was removed in Python 3 (mentioned in
https://raw.githubusercontent.com/python/cpython/master/Misc/HISTORY)
However, tempfile.SpooledTemporaryFile still has a softspace property that
attempts to return read the softspace
Change by Shantanu :
--
keywords: +patch
pull_requests: +17965
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18598
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
Changed in version 3.8 section of https://docs.python.org/3/library/token.html
should mention the addition of TYPE_IGNORE and COLONEQUAL
--
assignee: docs@python
components: Documentation
messages: 362436
nosy: docs@python, hauntsaninja
priority: normal
Shantanu added the comment:
Github code search isn't great, but I was unable to find any usage of
`uuid.getnode(getters=`, whereas I was able to find usage of `uuid.uuid1(node=`
(even though `node` is optional and can be passed positionally). I'd be
surprised if it was used i
Change by Shantanu :
--
keywords: +patch
pull_requests: +17743
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18369
___
Python tracker
<https://bugs.python.org/issu
Change by Shantanu :
--
pull_requests: +17744
pull_request: https://github.com/python/cpython/pull/18369
___
Python tracker
<https://bugs.python.org/issue28
New submission from Shantanu :
>From the documentation of `inspect.signature` it seems we should never have a
>RuntimeError:
```
Raises ValueError if no signature can be provided, and TypeError if that type
of object is not supported.
```
The easiest thing to do is just turn the Runtim
Change by Shantanu :
--
keywords: +patch
pull_requests: +17650
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18275
___
Python tracker
<https://bugs.python.org/issu
Shantanu added the comment:
Based on
https://github.com/python/cpython/blob/master/Modules/_elementtree.c#L2700 and
the behaviour at runtime, something like the following patch could work:
```
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py
index c8d898f328
New submission from Shantanu :
The C accelerated version of `xml.etree.ElementTree.TreeBuilder.start` has a
default value for `attrs`, whereas the pure Python version does not.
```
In [41]: sys.version
Change by Shantanu :
--
keywords: +patch
pull_requests: +17642
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18265
___
Python tracker
<https://bugs.python.org/issu
New submission from Shantanu :
Hello!
typing.py has the following definition of `closed`:
https://github.com/python/cpython/blob/master/Lib/typing.py#L1834
```
@abstractmethod
def closed(self) -> bool:
pass
```
This is inconsistent with the behaviour at runtime:
```
In
84 matches
Mail list logo