[issue35878] ast.c: end_col_offset may be used uninitialized in this function

2019-02-02 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- keywords: +patch, patch pull_requests: +11636, 11637 stage: -> patch review ___ Python tracker <https://bugs.python.org/issu

[issue35878] ast.c: end_col_offset may be used uninitialized in this function

2019-02-10 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue35975] Put back the ability to parse files where async/await aren't keywords

2019-02-11 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue35975> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35987] Mypy and Asyncio import cannot be skipped

2019-02-13 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is not a Python issue, this should be reported on typeshed tracker (but likely a duplicate of the issue mentioned by Karthikeyan). -- resolution: -> third party stage: -> resolved status: open -&g

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-14 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- keywords: +patch pull_requests: +11889 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35992> ___ _

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, I think this is a bug. Created a PR with a possible simple fix. -- nosy: +gvanrossum ___ Python tracker <https://bugs.python.org/issue35

[issue36009] weakref.ReferenceType is not a valid typing type

2019-02-16 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This question appeared several times before, and the conclusion is that we are not going to do this. There are many cases in standard library that are generic in stubs (and by nature) but are not declared as such at runtime, so we simply can't prov

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset ac28147e78c45a6217d348ce90ca5281d91f676f by Ivan Levkivskyi in branch 'master': bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857) https://github.com/python/cpython/commit/ac28147e78c45a6217d348ce90ca52

[issue35992] Metaclasses interfere with __class_getitem__

2019-02-17 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36042] Setting __init_subclass__ and __class_getitem__ methods are in runtime doesnt make them class method.

2019-02-20 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I totally agree with Serhiy -- ___ Python tracker <https://bugs.python.org/issue36042> ___ ___ Python-bugs-list mailin

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-04 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +387 ___ Python tracker <http://bugs.python.org/issue29638> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > why not add corresponding clearing methods obj._abc_cache.clear and > obj._abc_negative_cache.clear to typing._cleanups ? OK, this is another possible solution. I didn't think about this, because now typing._cleanups only clear generic cach

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Are typing.ChainMap and others actually abstract classes? They are abstract classes in the sense that they are instances of abc.ABCMeta. However, for some reasons inspect checks __flags__ attribute. The latter probably reflects the fact that Deque etc.

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > What if explicitly set __abstractmethods__ = True for these types? Unfortunately this does not help. I think this is because dash_R_cleanup only clears caches for classes in collections.abc.__all__ and their immediate .__subclasses__(). Making t

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > If you just want to add a workaround in dash_R_cleanup, I think it would be > better to generate the list of all abstract classes and add three typing > classes to it. Yes, I just updated the PR. I have found something else unrelated to typing,

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Seems this has fixed issue25744. This is interesting, if I remember correctly the relevant typing classes were added only recently. I will take a look at how to back-port this (probably this will require some code chan

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +394 ___ Python tracker <http://bugs.python.org/issue29638> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29638] Spurious failures in test_collections in releak hunting mode after typing is imported

2017-03-05 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +395 ___ Python tracker <http://bugs.python.org/issue29638> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-03-05 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue29727> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28810] Document bytecode changes in 3.6

2017-03-08 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: It looks like there are still few things that are not covered in two open PRs. I will add these in an additional PR in the next few days. -- ___ Python tracker <http://bugs.python.org/issue28

[issue28810] Document bytecode changes in 3.6

2017-03-12 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +538 ___ Python tracker <http://bugs.python.org/issue28810> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28810] Document bytecode changes in 3.6

2017-03-14 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +547 ___ Python tracker <http://bugs.python.org/issue28810> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29822] inspect.isabstract does not work on abstract base classes during __init_subclass__

2017-03-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Serhiy, sorry for a distraction, but it looks like here is one more situation where inspect.isabstract is problematic, similar to what was discussed in http://bugs.python.org/issue29638 recently. -- nosy: +levkivskyi, serhiy.storchaka

[issue28980] ResourceWarning when imorting antigravity in 3.6

2017-03-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: It looks like this is fixed on master, but the problem still appears on 3.6 -- ___ Python tracker <http://bugs.python.org/issue28

[issue21253] unittest assertSequenceEqual can lead to Difflib.compare() crashing on mostly different sequences

2017-03-18 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- versions: +Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <http://bugs.python.org/issue21253> ___ ___ Python-bugs-list m

[issue24796] Deleting names referencing from enclosed and enclosing scopes

2017-03-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: It looks like it is safe to just remove this line from docs. This code >>> x = 1 >>> def f(): ... global x ... del x ... >>> f() >>> x Works as expected, i.e. raises NameError. (The same happens for

[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-03-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Something is strange: PRs 709, 723, 724 are shown as open in the "Pull Requests" section on this page. However, all four PRs are already merged. Are other see the same? Shouldn't status be automa

[issue29593] Improve UnboundLocalError message for deleted names

2017-03-21 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue29593> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2017-03-21 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue17792> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24796] Deleting names referencing from enclosed and enclosing scopes

2017-03-21 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +667 ___ Python tracker <http://bugs.python.org/issue24796> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28810] Document bytecode changes in 3.6

2017-03-24 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thanks Brett! I think this could be closed now. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29922] error message when __aexit__ is not async

2017-03-31 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue29922> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29966] typing.get_type_hints doesn't really work for classes with ForwardRefs

2017-04-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: You could try: glob = globals.copy() glob.update(a.__dict__) glob.update(b.__dict__) You can do this automatically following MyClass.__mro__ and then collecting relevant __module__ attributes on bases. However, there is little chance this will be fixed in

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-07 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue29974> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <http://bugs.python.or

[issue29727] collections.abc.Reversible doesn't fully support the reversing protocol

2017-04-26 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- assignee: -> levkivskyi stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue29727> ___ ___ Python-bugs-

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > 87c07fe9d908d0a2143fcc8369255c6ff3241503 should still be backported to 3.5 > and 3.6 branches so please don't close it yet. Thanks for making backport PRs! (and sorry for closing prematurely) -- ___

[issue29974] Change typing.TYPE_CHECKING doc example

2017-04-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Sorry for making a typo in your last name No problem! This actually happened maaany times with me :-) -- ___ Python tracker <http://bugs.python.org/issu

[issue30196] Add __matmul__ to collections.Counter

2017-04-28 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue30196> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30145] Create a How to or Tutorial documentation for asyncio

2017-04-28 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue30145> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue28556] typing.py upgrades

2017-04-30 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +1475 ___ Python tracker <http://bugs.python.org/issue28556> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue29262] Provide a way to check for *real* typing.Union instances

2017-05-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: The discussed functionality is published as a separate package: https://pypi.python.org/pypi/typing-inspect https://github.com/ilevkivskyi/typing_inspect After the API is settled, some introspection functions may be added directly to typing

[issue30359] A standard convention for annotating a function as returning an (async) context manager?

2017-05-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Or you can use typing.ContextManager[ret_type] if you like generics (typing.AsyncContextManager will be also added soon). Also this recent discussion seems relevant https://github.com/python/peps/pull/242 and the corresponding thread on python-dev: https

[issue30463] Add __slots__ to ABC convenience class

2017-05-26 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <http://bugs.python.org/issue30463> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30505] Performance of typing._ProtocolMeta._get_protocol_attrs and isinstance

2017-06-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thanks for reporting! The runtime implementation of protocol classes will be thoroughly reworked as a part of PEP 544, see also https://github.com/python/typing/pull/417 for a proof of concept runtime implementation. Also, there is another ongoing

[issue30518] Import type aliases from another module

2017-06-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Block = [int, Tuple[int]] > Blocks = List[Block] These are both invalid type aliases (I have no idea why PyCharm does not flag them, you could report this at PyCharm issue tracker). I am not sure what exactly you want. If you want a list of

[issue28556] typing.py upgrades

2017-06-10 Thread Ivan Levkivskyi
Changes by Ivan Levkivskyi : -- pull_requests: +2140 ___ Python tracker <http://bugs.python.org/issue28556> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36287] Make ast.dump() not output optional default fields

2019-03-15 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: We can probably also skip `type_ignores` list if it is empty (which will be the case in 99% situations). -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue36

[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Good idea! This should be easy to fix/update, this was initially discussed in https://github.com/python/typing/issues/339. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-03-29 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue36470> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-03-29 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +gvanrossum, levkivskyi ___ Python tracker <https://bugs.python.org/issue36466> ___ ___ Python-bugs-list mailing list Unsub

[issue36466] Adding a way to strip annotations from compiled bytecode

2019-04-03 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: +1 from me. There are two ways to enable this: * Add -OOO that would remove all three: asserts, docstrings, annotations * Add separate --O-asserts --O-docstrings --O-annotations (or similar) I think I like the second option more. @cary Please note that our

[issue36495] Out-of-bounds array reads in Python/ast.c

2019-04-05 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue31369] re.RegexFlag is not included in __all__, makes type inference less useful

2019-04-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I am totally fine with making RegexFlag public (this may be indeed useful for static typing purposes). -- ___ Python tracker <https://bugs.python.org/issue31

[issue36517] typing.NamedTuple does not support mixins

2019-04-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Hm, it looks like we can support this. I however don't think the proposed "patch" is the right way to fix it, since this makes the implementation with and without a mixin quite different. Also I am not sure I will have time to work on this

[issue36555] PEP484 @overload vs. str/bytes

2019-04-08 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Mypy already takes first overload for ambiguous arguments. This example is however genuinely unsafe from the static typing point of view. Please read the docs https://mypy.readthedocs.io/en/latest/more_types.html#type-checking-the-variants

[issue36591] Should be a typing.UserNamedTuple

2019-04-12 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is a duplicate of https://github.com/python/typing/issues/431 We can of course close the other issue and keep this one open, but the other one has much more discussion. So I am closing this one. -- resolution: -> duplicate stage: -> re

[issue36643] Forward reference is not resolved by dataclasses.fields()

2019-04-19 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue36643> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36679] duplicate method definition in Lib/test/test_genericclass.py

2019-04-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Oh, sorry, didn't notice the backport is missing! -- ___ Python tracker <https://bugs.python.org/issue36679> ___ ___

[issue36679] duplicate method definition in Lib/test/test_genericclass.py

2019-04-27 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +12904 stage: resolved -> patch review ___ Python tracker <https://bugs.python.org/issue36679> ___ ___ Python-

[issue36679] duplicate method definition in Lib/test/test_genericclass.py

2019-04-27 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thanks for fixing this! -- nosy: +levkivskyi resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36679] duplicate method definition in Lib/test/test_genericclass.py

2019-04-27 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: OK, backported the fix to 3.7. -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue36679] duplicate method definition in Lib/test/test_genericclass.py

2019-04-27 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset d111490a1f63db2dcc3714157726dc6a5c0fa1cd by Ivan Levkivskyi in branch '3.7': [3.7] bpo-36679: Rename duplicate test_class_getitem function (GH-12892) (GH-12978) https://github.com/python/cpython/commit/d111490a1f63db2dcc3714157726dc

[issue36679] duplicate method definition in Lib/test/test_genericclass.py

2019-04-27 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- status: closed -> open ___ Python tracker <https://bugs.python.org/issue36679> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue36817] Add = to f-strings for easier debugging.

2019-05-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: +1 from me (as a big fan of print-debugging). -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue36

[issue15987] Provide a way to compare AST nodes for equality recursively

2019-05-10 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Btw, I am +1 on this feature (preferably with an option to check line, column, end line, and end column). I always wanted this, but never had time to actually implement this. -- nosy: +levkivskyi ___ Python

[issue36810] Recursive type annotations do not work in documentation tests

2019-05-10 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I think this is related to doc tests being executed in a namespace where the class definition is not available. I am not sure what is the best way here, a workaround is to explicitly pass the namespace, for example this passes: import typing def f(clazz

[issue36810] Recursive type annotations do not work in documentation tests

2019-05-10 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +gvanrossum, lukasz.langa ___ Python tracker <https://bugs.python.org/issue36810> ___ ___ Python-bugs-list mailing list Unsub

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-10 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I like the idea of separate smaller PRs, the first one looks good. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36878] ast.parse with type_comments=True should allow extra text after # type: ignore

2019-05-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset d8320ecb86da8df7c13d8bf8582507f736aa2924 by Ivan Levkivskyi (Michael J. Sullivan) in branch 'master': bpo-36878: Allow extra text after `# type: ignore` comments (GH-13238) https://github.com/python/cpyt

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-11 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Serhiy, I am sorry for a delay, I have recently moved to another country, this is why I have not much time. I will try to work on this weekend. Here are some points where you can be helpful: * Make a short documentation PR for `__mro_entry__` and

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: There are several corner cases. For example consider this code: >>> class C: ... del __annotations__ ... x: int Currently this correctly raises NameError, with your replacement it will instead stick {'x': int} in the module `

[issue32550] STORE_ANNOTATION bytecode is unnecessary and can be removed.

2018-01-14 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: There is also another corner case to consider: class C: exec('x: int') assert C.__annotations__ == {'x': int} assert __annotations__ == {} I am not sure this one will be covered correctly. But the main argument here is speed I thi

[issue32225] Implement PEP 562: module __getattr__ and __dir__

2018-01-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > BTW, would you update the PEP status to Final? Good point, here is the PR https://github.com/python/peps/pull/554 -- ___ Python tracker <https://bugs.python.org/issu

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-20 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset d911e40e788fb679723d78b6ea11cabf46caed5a by Ivan Levkivskyi in branch 'master': bpo-32226: PEP 560: improve typing module (#4906) https://github.com/python/cpython/commit/d911e40e788fb679723d78b6ea11ca

[issue28980] ResourceWarning when imorting antigravity in 3.6

2018-01-22 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I have not seen this for quite some time so I'm closing this as fixed. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue31333] Implement ABCMeta in C

2018-01-22 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- keywords: +patch pull_requests: +5117 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31333> ___ ___ Py

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-28 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I think all the critical things have been implemented/fixed. There are unfortunately no docs yet (my fault), also there are two bugs related to PEP 560, but they are not new, they also exist in Python 3.6. I am however marking this as high priority, since

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-28 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: https://github.com/python/typing/issues/512 and https://github.com/python/typing/issues/511 are first issue (they are closely related to each other). This is not directly related to PEP 560, but changes in typing because of it will allow to fix them in a

[issue32226] Implement PEP 560: Core support for typing module and generic types

2018-01-29 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: OK, I will close this issue, and open separate issues for documentation, Union, etc. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bug

[issue32717] Document PEP 560

2018-01-29 Thread Ivan Levkivskyi
New submission from Ivan Levkivskyi : This should include: * Short documentation PR for `__mro_entry__` and `__base_subclass__` methods. * The `__class_getitem__` C API calling convention (with motivation, many classes are implemented in C but are generic in nature, like numpy.ndarray) in PEP

[issue32227] singledispatch support for type annotations

2018-02-04 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Do you think it should be added to the What's New? page for 3.7? I leave this up to Ɓukasz. -- ___ Python tracker <https://bugs.python.org

[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: This is a rather small change, so probably it would be easier to discuss it in a PR. -- nosy: +levkivskyi ___ Python tracker <https://bugs.python.org/issue32

[issue32752] no information about accessing typing.Generic type arguments

2018-02-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: There is a third party library on PyPI called typing_inspect that provides thin wrappers around internal APIs to get lots of useful information about generics and other special types in typing. If there will be more requests like this, then the most used

[issue32769] Add 'annotations' to the glossary

2018-02-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I wanted to say implicitly that I like the idea, and that we should figure out details in a PR. But of course if someone is against this, then we should wait with a PR. -- nosy: +gvanrossum ___ Python tracker

[issue31333] Implement ABCMeta in C

2018-02-17 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: > Isn't 800 lines of C code too high price for speeding up ABCs creation? 800 lines of C code is not something hard to notice, so I suppose the answer is obvious for all people involved in the work on PR :-) > ...this can save just several mill

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 03e3c340a0156891a036d6dbdb9e348108826255 by Ivan Levkivskyi in branch 'master': bpo-31333: Re-implement ABCMeta in C (#5273) https://github.com/python/cpython/commit/03e3c340a0156891a036d6dbdb9e34

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2018-02-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: FWIW, this is fixed in 3.7 by PEP 560. I don't think we will be able to get rid of `sys._getframe` workaround on 3.6, so I propose to just close this. -- dependencies: -Provide a way to check for *real* typing.Union instances resolution: -&g

[issue32162] typing.Generic breaks __init_subclass__

2018-02-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: FWIW, this is fixed in 3.7 by PEP 560, providing a separate fix for 3.6 is not easy, and you have a good workaround, so I propose to close this issue. -- resolution: -> fixed stage: -> resolved status: open -&g

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +5514 ___ Python tracker <https://bugs.python.org/issue31333> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25988] collections.abc.Indexable

2018-02-18 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +5515 ___ Python tracker <https://bugs.python.org/issue25988> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 38928992885d8a04b7188abdba3b04f350bde32d by Ivan Levkivskyi in branch '3.7': bpo-31333: Re-implement ABCMeta in C (GH-5733) https://github.com/python/cpython/commit/38928992885d8a04b7188abdba3b04

[issue25988] collections.abc.Indexable

2018-02-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 0442de5ad7835814d60f46c22a22942abb101aef by Ivan Levkivskyi in branch '3.7': bpo-25988: Emit a warning when use or import ABCs from 'collections'. (GH-5734) https://github.com/python/cpython/commit/0442de5ad7835814d60f

[issue31333] Implement ABCMeta in C

2018-02-18 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 3fb813d2c67fe28cc98ae51e53a6890294b6e423 by Ivan Levkivskyi (Terry Jan Reedy) in branch 'master': bpo-31333: Fix typo in whatsnew/3.7.rst (GH-5744) https://github.com/python/cpython/commit/3fb813d2c67fe28cc98ae51e53a689

[issue32873] Pickling of typing types

2018-02-19 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Here is the situation for 3.6 and before: Generic classes are all actual class objects, so they are pickled as immutable. However this creates a problem, parameterized generics, such as `List[int]` _cannot_ be pickled in 3.6 and before, see https

[issue32873] Pickling of typing types

2018-02-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: I am sick now, so can't work on this. There is a small chance I will be able to work on this issue this week. Is it possible to fix this in 3.7b3? -- ___ Python tracker <https://bugs.python.org/is

[issue32873] Pickling of typing types

2018-02-26 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Thank you, Ned! -- ___ Python tracker <https://bugs.python.org/issue32873> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-06 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Actually, the behaviour when __suclasscheck__ returns True for non-class objects may be used by some code. Even typing module did this, I tried to remove as much as possible of this, but I think there may be few such situations left. Therefore, the patch

[issue32999] issubclass(obj, abc.ABC) causes a segfault

2018-03-07 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Serhiy, for example `issubclass(typing.MutableMapping, typing.Mapping)` returns `True` while neither of those two are actual class objects. These relationships are kept mostly so that `typing.*` can be used as a drop-in replacement for `collections.abc

<    1   2   3   4   5   6   7   >