Ivan Levkivskyi added the comment:
New changeset 4dc5a9df59837446ec1dc5b7a0e6ce95ae5b5cec by Ivan Levkivskyi
(Batuhan Taşkaya) in branch 'master':
bpo-39019: Implement missing __class_getitem__ for subprocess classes (GH-17558)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
New changeset 09c482fad11c769be38b2449f1056e264b701bb7 by Ivan Levkivskyi
(Batuhan Taşkaya) in branch 'master':
bpo-39019: Implement missing __class_getitem__ for SpooledTemporaryFile
(GH-17560)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
This issue came up few times before (although I can't find an issue here on
b.p.o., maybe it was on typing-sig list). Although in micro-benchmarks the
impact may seem big, in vast majority of applications it is rarely more that a
percent or so.
O
Ivan Levkivskyi added the comment:
OK, here is the original issue https://github.com/python/typing/issues/681. I
asked the author to open an issue here instead, but likely they didn't open one.
--
___
Python tracker
<https://bugs.py
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue39204>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ivan Babrou :
I noticed that a program (SaltStack) is a lot slower under Python 3. After some
stracing I was able to find that inspect module is to blame.
In strace output I can see a ton of calls like this:
05:31:56.698829 newfstatat(AT_FDCWD, "",
0x7
Ivan Levkivskyi added the comment:
> Once PEP 585 is implemented these should be rolled back and replaced with
> that, right?
I would say that ideally yes.
--
___
Python tracker
<https://bugs.python.org/i
New submission from Ivan Bykov :
multiprocessing module creates duplicates of .pyc files
in __pycache__ dirs
because subprocess._args_from_interpreter_flags()
ignores "-X pycache_prefix=PATH" option.
--
components: Library (Lib)
messages: 362974
nosy: ivb
priority: norma
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue39810>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 34b0598295284e3ff6cedf5c05e159ce1fa54d60 by Furkan Önder in
branch 'master':
bpo-40086: Update/fix test_etree test case in test_typing (GH-19189)
https://github.com/python/cpython/commit/34b0598295284e3ff6cedf5c05e159
New submission from Ivan Ivanyuk :
Due to the combination of the logic here:
https://github.com/python/cpython/blob/master/Lib/asyncio/sslproto.py#L483 and
changes introduced in the issue https://bugs.python.org/issue37035, the
assumption that "Not-logged exceptions are not skippe
Ivan Levkivskyi added the comment:
FWIW I like the idea. There are many objects in typing module that are not
classes, it would be great to display docs for them.
--
___
Python tracker
<https://bugs.python.org/issue40
Ivan Levkivskyi added the comment:
New changeset a25a04fea5446b1712cde0cff556574be139285a by HongWeipeng in branch
'master':
bpo-39942:Fix failure in `TypeVar` when missing `__name__` (GH-19616)
https://github.com/python/cpython/commit/a25a04fea5446b1712cde0cff55657
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
I think it should return empty tuple: First, for consistency with other things
like get_args(Tuple) == () and get_args(List) == (). Second, although Callable
is equivalent to Callable[..., Any] in the static world, authors of some
runtime checkers might
Ivan Levkivskyi added the comment:
Oh my, this looks like another bug. I don't have Python 3.8 at hand so just
tried `typing_inspect` on Python 3.6. I think this may be caused by the "double
use" of _GenericAlias for which you ope
Ivan Babrou added the comment:
The issue in Salt should be fixed by the following PR:
* https://github.com/saltstack/salt/pull/57062
Still, I think Python itself could do better.
--
___
Python tracker
<https://bugs.python.org/issue39
Ivan Levkivskyi added the comment:
> But this behavior is not specified and is not covered by tests.
FWIW, to be most close to the static type checkers behavior, both D[int][str]
and D[int, str] should fail for D = Dict[T, List]. Not important however, since
this is a really rare cor
Ivan Levkivskyi added the comment:
Here I think the behavior of typing.Callable is correct.
--
___
Python tracker
<https://bugs.python.org/issue40494>
___
___
Ivan Levkivskyi added the comment:
Yes, this is as expected. A recommended workaround is to define a type alias
like `Match = re.Match` before the class body. You can also suppress the
exception with `from __future__ import annotations` (so that the annotations
are not evaluated), but
Ivan Levkivskyi added the comment:
I think a better question is why the `typing` in site packages is ever
imported? I thought that an stdlib module always takes precedence over an
installed one with the same name.
--
nosy: +levkivskyi
___
Python
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue40606>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
This is actually a specified behavior (motivated by memory savings for class
objects, that are already pretty large). If you scroll down the link you posted
it says:
> Note that if annotations are not found statically, then the
> ``__annotat
Change by Ivan Marton :
--
keywords: +patch
nosy: +martonivan
nosy_count: 1.0 -> 2.0
pull_requests: +23445
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24660
___
Python tracker
<https://bugs.python.org/i
Change by Ivan Marton :
--
nosy: +martonivan
___
Python tracker
<https://bugs.python.org/issue43382>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ivan Savin :
How to reproduce:
>>> import email.message
>>> message = email.message.EmailMessage()
>>> message['From'] = 'hey@'
Traceback (most recent call last):
File
"/home/ivan/.pyenv/versions/3.9.0a5/lib/pyth
Ivan Ivanyuk added the comment:
Was there some solution in progress here? We would like to use dataclasses and
seems this problem currently limits their usefulness to us.
We recently came upon the same behaviour
https://mail.python.org/pipermail/python-list/2020-June/897502.html and I was
Ivan Levkivskyi added the comment:
> I was thinking that similarly to __required_keys__ and __optional_keys__, the
> TypedDict could preserve its original bases in a new dunder attribute, and
> get_type_hints could work off of that instead of MRO when it is dealing with
> a
Ivan Levkivskyi added the comment:
FWIW I like Guido's suggestion in the PR, I would rather use "importance order"
than alphabetical order.
--
___
Python tracker
<https://bugs.pyt
New submission from Ivan Sorokin :
See attached sample. Well-known unzip command line tool lists its contents
correctly:
$ unzip -l 23.zip
Archive: 23.zip
Length DateTimeName
- -- -
81408 2012-10-23 19:03 Β' ΦΑΣΗ ΠΕ06 ΣΧΟΛΕΙΑ ΕΑΕΠ (ΙΝΤ
New submission from Ivan Sorokin :
ZipFile has problems with filename charset in .zip archives having filenames
charset encoded in OEM code page.
ZipFile assumes that OEM code page always means "cp437". Actually many popular
.zip packers (for example, Windows internal "zip fol
Ivan Sorokin added the comment:
Grand unified algorithm to read filenames from zip files correctly:
1. Do zip entry have «Unicode Path Extra Field» (0x7075)? Use it for file name.
2. Is Unicode flag (0x800) set in «Flags» Field of zip entry? Assume «Filename»
Field is in UTF-8.
3. Do «HostOS
Changes by Ivan Herman :
--
components: None
nosy: ivan_herman
priority: normal
severity: normal
status: open
title: urlparse on tel: URI-s misses the scheme in some cases
type: behavior
versions: Python 2.7
___
Python tracker
<h
New submission from Ivan Herman :
I think that the screen dump below is fairly clear:
10:41 Ivan> python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits"
Ivan Levkivskyi added the comment:
> I don't think there's an actionable bug here.
OK, then taking into account there is a decent workaround, I am closing this.
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue36881>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Is PEP the best place for such updates? Maybe we can add a `versionchanged`
note in
https://docs.python.org/3/reference/simple_stmts.html#annotated-assignment-statements
instead?
--
___
Python tracker
<ht
Ivan Levkivskyi added the comment:
I think this is related to how `__subclasscheck__` is implemented in `ABCMeta`.
I just checked this also happens in Python 3.6 (i.e. it is not something
specific to the C version introduced in Python 3.7
Ivan Levkivskyi added the comment:
New changeset 4c7a46eb3c009c85ddf2eb315d94d804745187d4 by Ivan Levkivskyi (Paul
Dagnelie) in branch 'master':
bpo-36972: Add SupportsIndex (GH-13448)
https://github.com/python/cpython/commit/4c7a46eb3c009c85ddf2eb315d94d804745187d4
-
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
New changeset 933e1509ec6efa8e6ab8c8c7ce02059ce2b6d9b9 by Ivan Levkivskyi
(Michael J. Sullivan) in branch 'master':
bpo-36878: Track extra text added to 'type: ignore' in the AST (GH-13479)
https://github.com/p
Change by Ivan Levkivskyi :
___
Python tracker
<https://bugs.python.org/issue36985>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/o
New submission from Ivan Levkivskyi :
The actual implementation is performed by type checkers like mypy. We just need
to add the names to the `typing` module.
--
assignee: levkivskyi
components: Library (Lib)
messages: 343501
nosy: gvanrossum, levkivskyi, msullivan
priority: normal
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13479
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13571
___
Python tracker
<https://bugs.python.org/issu
New submission from Ivan Levkivskyi :
The actual implementation is performed by type checkers like mypy. We just need
to add `Literal` to the `typing` module.
--
assignee: levkivskyi
components: Library (Lib)
messages: 343503
nosy: gvanrossum, levkivskyi, michael0x2a
priority: normal
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13480
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13572
___
Python tracker
<https://bugs.python.org/issu
New submission from Ivan Levkivskyi :
The actual implementation is performed by type checkers like mypy. We just need
to add `TypedDict` to the `typing` module.
--
assignee: levkivskyi
components: Library (Lib)
messages: 343506
nosy: gvanrossum, levkivskyi
priority: normal
severity
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13481
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13573
___
Python tracker
<https://bugs.python.org/issu
Ivan Levkivskyi added the comment:
New changeset f367242d10ef36db38133a39ab7627f63099cba4 by Ivan Levkivskyi in
branch 'master':
bpo-37045: PEP 591: Add final qualifiers to typing module (GH-13571)
https://github.com/python/cpython/commit/f367242d10ef36db38133a39ab7627
Ivan Levkivskyi added the comment:
New changeset b891c465bb7d38a597c5c2ad547d7b19194f4dad by Ivan Levkivskyi in
branch 'master':
bpo-37046: PEP 586: Add Literal to typing module (#13572)
https://github.com/python/cpython/commit/b891c465bb7d38a597c5c2ad547d7b
Ivan Levkivskyi added the comment:
New changeset 135c6a56e55d2f4f8718b3b9f03ce3c692b15f0f by Ivan Levkivskyi in
branch 'master':
bpo-37049: PEP 589: Add TypedDict to typing module (GH-13573)
https://github.com/python/cpython/commit/135c6a56e55d2f4f8718b3b9f03ce3
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
On the other hand, if this causes troubles, feel free to just replace u"bar"
with "bar" in that test. It is not really important.
--
nosy: +levkivskyi
___
Python tracker
<https://bug
Ivan Levkivskyi added the comment:
Duplicate of https://bugs.python.org/issue37053
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Ivan Levkivskyi :
The implementation would be basically copying some code from `typing_extension`
and fixing some important known issues (such as renaming @runtime to
@runtime_checkable and allowing sub-protocols of builtin protocols). Also
ideally we should get rid of
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13492
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13585
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
pull_requests: +13495
pull_request: https://github.com/python/cpython/pull/13588
___
Python tracker
<https://bugs.python.org/issue37
Ivan Levkivskyi added the comment:
New changeset 74d7f76e2c953fbfdb7ce01b7319d91d471cc5ef by Ivan Levkivskyi in
branch 'master':
bpo-37058: PEP 544: Add Protocol to typing module (GH-13585)
https://github.com/python/cpython/commit/74d7f76e2c953fbfdb7ce01b7319d9
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +13573
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/13685
___
Python tracker
<https://bugs.python.org/issu
Ivan Levkivskyi added the comment:
New changeset 4c23aff065fb28aba789a211937a2af974842110 by Ivan Levkivskyi in
branch 'master':
bpo-29262: Add get_origin() and get_args() introspection helpers to typing
(GH-13685)
https://github.com/python/cpyt
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.6
___
Python tracker
<https://bugs.python.or
Ivan Pozdeev added the comment:
Got this issue today in AppVeyor's PR check:
https://ci.appveyor.com/project/python/cpython/builds/24945165, so it's not
local to David's worker.
(At rerun, the test succeeeded, so the check status was not affected.)
--
nosy: +Ivan.P
Ivan Levkivskyi added the comment:
Guido, I remember you were against exposing `ForwardRef` as public at some
point, but recently you approved https://github.com/python/cpython/pull/13456
that added it to `typing.__all__`. I don't have any particular opinion on this,
but if you don
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
pull_requests: +13638
pull_request: https://github.com/python/cpython/pull/13757
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
Thanks! It looks like this was fixed in typing and then forward ported to
CPython.
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bug
Ivan Levkivskyi added the comment:
So what was the conclusion about PyCode_New()? Situation is quite similar here
(except that these functions are used less often). Should we just document the
changes in What's New?
--
___
Python tracker
&
Change by Ivan Levkivskyi :
--
pull_requests: +13679
pull_request: https://github.com/python/cpython/pull/13794
___
Python tracker
<https://bugs.python.org/issue35
Ivan Levkivskyi added the comment:
Likely, the unexpected success can be avoided with clearing generic caches in
test___all__ (it just imports whatever it can find and likely also
test/mod_generics_cache.py), but I am also fine with just skipping it for now.
Will you have time to make a PR
Ivan Levkivskyi added the comment:
I think we can proceed with option A, but only if doesn't cause visible
slow-down for creating ABCs (which is already slower that normal classes). TBH,
I don't want to document A as "official" recipe (maybe however mention the
pr
Ivan Levkivskyi added the comment:
> Would it be possible to document the change somewhere?
Most of these things are in the docs for ast module.
But indeed none of static typing related features have been added to What's
New. I have an item on mypy todo list to add four typing PEPs
Ivan Levkivskyi added the comment:
Typo: "mypy todo list" should be "my todo list" :-)
--
___
Python tracker
<https://bugs.python.org/issue35766>
___
_
Ivan Levkivskyi added the comment:
> Perhaps adding some section like "Notes on pickling dynamically-defined
> classes" in the `pickle` module would be more appropriate?
I think just a note with few sentences would be enough.
--
__
Change by Ivan Levkivskyi :
--
pull_requests: +14052
pull_request: https://github.com/python/cpython/pull/14214
___
Python tracker
<https://bugs.python.org/issue33
Change by Ivan Levkivskyi :
--
keywords: +patch
pull_requests: +14053
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/14216
___
Python tracker
<https://bugs.python.org/issu
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
pull_requests: +14058
pull_request: https://github.com/python/cpython/pull/14220
___
Python tracker
<https://bugs.python.org/issue36
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<https://bugs.python.org/issue37496>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
New changeset 110a47c4f42cf4db88edc1876899fff8f05190fb by Ivan Levkivskyi (Carl
Friedrich Bolz-Tereick) in branch 'master':
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
New changeset 430a9f44fe22f029ae8cfeecb46621d7e199414b by Ivan Levkivskyi (Carl
Friedrich Bolz-Tereick) in branch 'master':
bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)
https://github.com/python/cpyt
Ivan Levkivskyi added the comment:
New changeset 68bd9c5691c4899d21cc7fe6cce7cd22b2f5ccb0 by Ivan Levkivskyi (Miss
Islington (bot)) in branch '3.8':
bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)
(GH-14672)
https://github.com/python/cpyt
Change by Ivan Levkivskyi :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8, Python 3.9 -Python 3.5
___
Python tracker
<https://bugs.python.or
Ivan Levkivskyi added the comment:
You might want to look into how PEP 563 is implemented, it has a utility to
turn an AST back into a string (I assume this is what you want).
--
___
Python tracker
<https://bugs.python.org/issue37
Ivan Levkivskyi added the comment:
FWIW I like Serhiy's approach more. I have never seen a single metaclass
overriding type.__call__, while overriding type.__new__ is a common practice.
--
___
Python tracker
<https://bugs.python.org/is
Ivan Levkivskyi added the comment:
> I have a couple of questions about how to use `ast_unparse.c`'s
> `expr_as_unicode` function:
> 1. Should I create a new function in the `ast` module that exposes that C
> function in Python in order to use it in `Lib/inspect.py`?
> 2
Ivan Levkivskyi added the comment:
> If consensus has been reached on this, I am willing to do the work.
It looks like there is already an active PR
https://github.com/python/cpython/pull/14970, there are some non-implemented
comments from a core rev
Ivan Levkivskyi added the comment:
> FWIW, I had updated the docs for namedtuple() to link to typing.NamedTuple.
> I think that should suffice.
Thank you! I looked at the docs everything looks good. I think this can be
closed now.
--
assignee: -> docs@python
c
Change by Ivan Levkivskyi :
--
assignee: -> levkivskyi
___
Python tracker
<https://bugs.python.org/issue37806>
___
___
Python-bugs-list mailing list
Un
Ivan Levkivskyi added the comment:
Yes, you are right. Could you please make a PR at
https://github.com/python/cpython/pulls ?
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue30
New submission from Ivan Marroquin:
Hi all,
I am using an anaconda 4.3.18 64 bits installation on windows 7. the version of
python is 3.6.1 and numpy version is 1.12.1
In Python, I have this element wise multiplication:
import numpy as np
#read the input data from an ascii file into the
Changes by Ivan Levkivskyi :
--
assignee: -> levkivskyi
___
Python tracker
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailing list
Unsubscrib
Ivan Levkivskyi added the comment:
The last few weeks something bothered while working on Protocols PEP: protocols
should be ideally compact (and PEP already emphasizes this).
However, the only potential candidates for __getitem__ are Sequence and
Mapping, that are both quite bulky (half dozen
Ivan Levkivskyi added the comment:
Raymond,
> The existence of use ABCs like MutableMapping is being drowned-out by
> one-trick-ponies. We're developing an unfavorable ratio of theoretical
> building blocks versus the practical tools.
Why do you think they are "theoretic
Ivan Levkivskyi added the comment:
Names from collections.abc are re-exported to collections for backward
compatibility. IIRC Serhiy also wanted to stop re-exporting them. I am not sure
whether we need any "deprecation period" for this.
--
nosy: +serhiy
Ivan Levkivskyi added the comment:
The fact that it is a class is an implementation detail and may change before
Python 3.7 beta (situation is the same for Callable). Guido explicitly doesn't
like to "advertise" it as a class yet. Unless he changed his mind, I would
propose to
Ivan Levkivskyi added the comment:
This looks like a reasonable idea, if it is possible to implement this without
complications. Would you like to submit a PR at
https://github.com/python/typing ?
(We have a separate upstream repo for typing while it is provisional.)
--
nosy
101 - 200 of 953 matches
Mail list logo