[issue19235] Add a dedicated subclass for recursion errors

2015-06-23 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19235
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-23 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

It looks like on python-dev 
(http://www.mail-archive.com/python-dev@python.org/msg88256.html) there is an 
agreement that this behavior should not be changed (at least not in the nearest 
future). If there are no more comments/suggestions, then maybe one could accept 
the latest patch?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-21 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Nick, thank you for a review, I have made a new patch with all the previous 
comments taken into account.

--
Added file: http://bugs.python.org/file39759/classdoc-v4.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-06-20 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Eric, I have submitted a new version of the patch. Could you please make a 
review? Nick, it will be interesting to hear your opinion too.

I tried to follow such rules:
1. Explanation should be succinct yet clear
2. It should tell as less as possible about implementation details
3. Minimize necessary changes

It turns out that these goals could be achieved by 
a) simply reshuffling and structuring the existing text to separate the 
exceptions (classes, etc.) from the general case;
and
b) adding some minor clarifications.

Armin, thank you for the link. It looks like this is a really old discussion.

PS: Unfortunately, the diff after reshuffling of the text looks big and 
cumbersome, in fact the changes are minimal.

--
Added file: http://bugs.python.org/file39749/classdoc-v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16379] SQLite error code not exposed to python

2015-06-25 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16379
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24528] Misleading exeption for await in comprehensions.

2015-07-01 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Yury, thank you for the patch, the error message is much clearer now.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24528
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-07-01 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

What holds the patch now? Should I do something or just wait?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5945] PyMapping_Check returns 1 for lists

2015-06-29 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5945
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24528] Misleading exeption for await in comprehensions.

2015-06-29 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi:

The following code:

async def foo():
lst = [await coro(i) for i in range(10)]
return lst

gives

SyntaxError: 'await' outside async function

I understand that this is because the comprehensions are implemented using a 
function scope (see also #10544), but such behavior is unintuitive.

IMO there are two possibilities here:
1) make comprehensions behave more like a for loop;
2) change the exception text to something like SyntaxError: 'await's in 
comprehensions are not supported.

I understand that the first option is probably not for 3.5 (it is beta 
already), but I will be happy if the second option will be implemented in 3.5

--
components: Interpreter Core, asyncio
messages: 245931
nosy: gvanrossum, haypo, levkivskyi, yselivanov
priority: normal
severity: normal
status: open
title: Misleading exeption for await in comprehensions.
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24528
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19217] Calling assertEquals for moderately long list takes too long

2015-06-29 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19217
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2015-06-29 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21253
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21827] textwrap.dedent() fails when largest common whitespace is a substring of smallest leading whitespace

2015-06-29 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21827
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24272] PEP 484 docs

2015-06-29 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24272
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11352] Update cgi module doc

2015-06-29 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11352
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24272] PEP 484 docs

2015-08-02 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Is anyone working on this right now? If not, I could implement the comments by 
Guido to the latest patch by Daniel.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24272
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24272] PEP 484 docs

2015-08-02 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

New version of the patch by Daniel, latest comments by Guido are taken into 
account.

--
Added file: http://bugs.python.org/file40108/typing_doc_v3.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24272
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24129] Incorrect (misleading) statement in the execution model documentation

2015-08-01 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I am sorry but I still don't get how things are organized here, so pinging this 
up. What is the next step? Should I wait for another review?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24129
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24272] PEP 484 docs

2015-08-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Here is a new patch for the first part of classes at the end of docs.
I also did some minor changes (in particular added more info on generics and 
removed the section about ellipsis for default arguments, we could return it if 
we decide to write something about stub files here).

--
Added file: http://bugs.python.org/file40144/typedoc_new.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24272
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24796] Deleting names referencing from enclosed and enclosing scopes

2015-08-05 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi levkivs...@gmail.com:


--
nosy: +levkivskyi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24796
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25610] Add typing.Awaitable

2015-11-13 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25610>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24272] PEP 484 docs

2015-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Guido, are you going to commit our patches before 3.5.final? Is there a merge 
conflict now? Should I rebase my diff?

If necessary I could make a clean patch combining two patches (my and Daniel's) 
on top of what Zachary did.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24272>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24272] PEP 484 docs

2015-09-09 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you, Guido!

I have noticed single quotes in line 38: 

type hinted using `Callable[[Arg1Type, Arg2Type], ReturnType]`

I think it would be logical to replace it with double quotes: 

``Callable[[Arg1Type, Arg2Type], ReturnType]`` 

as Zachary did in the rest of the text.

By the way, you have marked my patch as Daniels and vice versa in the commit 
descriptions, but that probably does not matter :)

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24272>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25987] collections.abc.Reversible

2016-03-26 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25987>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25987] collections.abc.Reversible

2016-04-02 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I was not sure whether Andrew is still interested. I made a simple-minded patch 
following his proposal. I also added tests and changed docs accordingly. Note 
that I also changed the expected MRO for MutableSequence in one of the 
functools tests according to the new hierarchy (otherwise test_functools fails).

Please review.

PS: Some tests was skipped on my machine, here is the list:
test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_idle test_kqueue test_lzma test_msilib test_ossaudiodev
test_smtpnet test_socketserver test_ssl test_startfile test_tcl
test_timeout test_tix test_tk test_ttk_guionly test_ttk_textonly
test_urllib2net test_urllibnet test_winreg test_winsound
test_xmlrpc_net test_zipfile64

--
keywords: +patch
Added file: http://bugs.python.org/file42357/reversible.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25987>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25987] collections.abc.Reversible

2016-04-17 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I see that I forgot to include .. versionadded:: in the documentation.
Will this go into 3.5.2 or in 3.6?

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25987>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-07-14 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

What holds back this issue now?

It looks like Andrew did a great job.
When I was making a patch for #25987 following Andrew's ideas, I was surprised 
how many different idioms has been used for __subclasshook__.
I was going to open an issue on this, when I noticed a week ago that there is 
already this issue.

Is any help needed here?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25958>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented

2016-07-22 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I am not sure that this feature will survive the resolution of 
https://github.com/python/typing/issues/136

Types in typing are primarily intended for use with static type checkers and 
similar tools, their runtime properties are still under some discussions.

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27588>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27598] Add SizedIterable to collections.abc and typing

2016-07-28 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27598>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-28 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27644>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-28 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Added two small comments to the review.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27644>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> Should I edit the patch to include a sentence or two describing this
> distinction, just remove the word "almost", or do something else?

I think the best way is to remove the "almost" and briefly explain that you 
cannot subclass types returned by NewType.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27644>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I have only one optional comment on the second revision.

--
nosy: +gvanrossum

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27644>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27723] Document typing.Text and typing.AnyStr

2016-08-14 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you for the patch, Michael!
I could add a comment that probably it is better to mention the definition of 
AnyStr = TypeVar('AnyStr', str, bytes) at beginning and only then go with 
examples.

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27723>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27594] Assertion failure when running "test_ast" tests with coverage.

2016-08-12 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

You could try changing this line in compile.c (in function 'assemble')

if (entryblock && entryblock->b_instr)

to

if (entryblock && entryblock->b_instr && entryblock->b_instr->i_lineno)

Does this help?

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27594>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27501] Add typing.py class describing a PEP 3118 buffer object

2016-07-14 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27501>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27688] Expand documentation about Any in the typing module

2016-08-05 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27688>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Michael, thank you for the patch. I have only one comment.
Generator is one of the few types in typing.py that behaves contravariantly. 
Maybe you could emphasize that it is contravariant in send type in your patch?

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27689>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26141] typing module documentation incomplete

2016-06-30 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I would like to do this (update the typing docs) at some point before 3.6 
beta1. There probably will be some updates to the PEP (it is still 
provisional), and maybe to typing.py soon.

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26141>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26075] typing.Union unifies types too broadly

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26075>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24379] Add operator.subscript as a convenience for creating slices

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24379>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26696] Document collections.abc.ByteString

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26696>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25830] _TypeAlias: Discrepancy between docstring and behavior

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25830>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25958>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26477] typing forward references and module attributes

2016-06-30 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26477>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27723] Document typing.Text and typing.AnyStr

2016-08-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Looks good to me.
15 Сер 2016 18:57 "Michael Lee" <rep...@bugs.python.org> пише:

>
> Michael Lee added the comment:
>
> Second revision attached below.
>
> --
> Added file: http://bugs.python.org/file44121/document-text-and-
> anystr-2.patch
>
> ___
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue27723>
> ___
>

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27723>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24379] Add operator.subscript as a convenience for creating slices

2016-08-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

It looks like namedtuple suffers the same issue with empty __slots__:

test_collections leaked [0, 0, 2, 0] references, sum=2

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24379>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I have manually "rebased" the patch taking into account that part of the work 
has been done in http://bugs.python.org/issue25987

Serhiy, Martin could you please review the latest patch and check that 
everything is OK?

Andrew did a really good job and I would like this to land in 3.6

--
Added file: http://bugs.python.org/file44122/abarnert_rebased.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25958>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-02-01 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Guido, I attach the full patch now, as you asked.

(Initially I was not sure about tests, but now I understand more these types, 
so that I added even few more tests than in original patch)

> Maybe we need to wait for the github migration to complete though?

I think it is OK to merge this now, but if it would be easier for you then it 
is not a problem to wait until GH migration is complete.

Manuel, I think that probably the answer is yes, but I would prefer a separate 
issue for the inspect module. You could open a new issue and mention this one 
as a dependency.

--
Added file: http://bugs.python.org/file46477/combined-patch-full-total.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29377>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28556] typing.py upgrades

2017-01-24 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you Martin!
Fixed this upstream https://github.com/python/typing/pull/365

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28556>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29357] New NamedTuple syntax silently ignores method definitions

2017-01-24 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

This has been already reported in https://github.com/python/typing/issues/352 
and fixed in https://hg.python.org/cpython/rev/f100619e7137 and 
https://github.com/python/typing/pull/364

Now adding new methods works but overwriting existing special attributes raises 
AttributeError:

class A(NamedTuple):
x: int
def spam(self):  # this works
...
def _fields(self):  # this is an error (and also for __repr__ etc)

If you think that overwriting all special attributes should be allowed (or only 
some of them) then we could discuss this at python/typing tracker.

--
nosy: +levkivskyi
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29357>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29310] Document typing.NamedTuple default argument syntax

2017-01-25 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you for the patch! I added few comments.

--
stage:  -> patch review

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Manuel, it would be helpful if you submit a patch.

Guido, this is necessary for ``get_type_hints`` to work nicer with built-in 
methods, see https://github.com/python/typing/pull/368

--
nosy: +gvanrossum, levkivskyi
versions: +Python 3.7

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29377>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Manuel, thank you for a patch!

Two comments:
1. Please produce your patch using Mercurial ``hg diff`` command, so that it 
could be recognized by review tool and merged easily.
2. Your patch should also include few tests (Lib/test/test_types.py) and 
documentation (Doc/library/types.rst)

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29377>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-30 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you!
The new patch LGTM.
(I combined two diffs in your patch into one so that it could be understood by 
Rietveld).

Guido, Yury, could one of you please take a look at this?

--
nosy: +yselivanov
Added file: http://bugs.python.org/file46457/combined-patch.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29377>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10544] yield expression inside generator expression does nothing

2017-01-28 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> How about fixing CPython to raise SyntaxWarning or even SyntaxError?

I think it is better to just fix the issue, i.e. make comprehensions be 
equivalent to for-loops even if they contain `yield`. (In particular this will 
lead to [(yield i) for i in range(5)] be SyntaxError outside function).

The example of `await` shows that it is possible without leaking the loop 
variable into enclosing scope.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29310] Document typing.NamedTuple default argument syntax

2017-01-28 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I have found one typo (see Rietveld), otherwise LGTM.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-28 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Cross-posting the link to upstream work on this: 
https://github.com/python/typing/pull/377

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29310] Document typing.NamedTuple default argument syntax

2017-01-28 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you!

Guido, I think this is ready to be merged.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10544] yield expression inside generator expression does nothing

2017-01-25 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Python 3.5 does not support this, you should use Python 3.6 (plus await x will 
fail when you will run the coroutine, since you cannot await on int).

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-26 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> but an isinstance test seems pretty redundant.

Tests are never redundant :-) Just add one-two asserts that you think should be 
true about issubclass and isinstance with these types (like 
self.assertIsInstance(''.__add__, types.MethodWrapperType)). String 
representation on the contrary is less important.

For some reason your patch is still not recognized by review tool. But don't 
worry about this, if it will not work, I will try to fix it.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29377>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10544] yield expression inside generator expression does nothing

2017-01-25 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> Is the fact that 'await' produces a syntax error in this context the same bug 
> or a new one?

What kind of SyntaxError? await outside an async function is prohibited, bare 
await is also prohibited.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10544>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29377] Add the 'wrapper_descriptor' type to the types module

2017-01-27 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Manuel, thank you for the new patch now everything works. I have few more 
comments:
1. I have found that there is one more built-in type: type(str.join) gives 
. Maybe it makes sense to add this one too?
2. Taking into account previous point I withdraw my idea of needing tests here. 
Sorry for changing opinion twice, but it looks like there are many built-in 
types that seem to exist just for historical reasons. They might change in 
future.
3. Please take a look at my review on documentation in Rietveld.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29377>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26213] Document BUILD_*_UNPACK opcodes

2017-02-22 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26213] Document BUILD_*_UNPACK opcodes

2017-02-22 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
pull_requests: +200

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28810] Document bytecode changes in 3.6

2017-02-22 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
pull_requests: +201

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28810>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29546] A more helpful ImportError message

2017-02-17 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29546>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-02-23 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi:

This command:

./python -c 'import runpy, typing; runpy.run_module("test")' -R 5:5 
test_collections

Sometimes gives spurious failures like this:

test_collections leaked [0, 0, 3, -3, 3] memory blocks, sum=3

I think this is because ABC caches of typing.ChainMap, typing.Counter, and 
typing.DefaultDict are not cleared by refleak.py/dash_R_cleanup (presumably 
because inspect.isabstract returns False on those)

Adding a manual clean-up of these cashes to cleanup_cashes() fixes the "leak".

--
assignee: levkivskyi
components: Tests
messages: 288495
nosy: gvanrossum, levkivskyi
priority: normal
severity: normal
status: open
title: Spurious failures in test_collections in releak hunting mode after 
typing is imported
type: resource usage

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29638>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28556] typing.py upgrades

2017-02-23 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
pull_requests: +237

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28556>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28556] typing.py upgrades

2017-02-24 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
pull_requests: +243

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28556>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue28810] Document bytecode changes in 3.6

2017-02-23 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
pull_requests: +217

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28810>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29581] __init_subclass__ causes TypeError when used with standard library metaclasses (such as ABCMeta)

2017-02-17 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29581>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11339] annotation for class being defined

2017-02-13 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11339>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29481] 3.6.0 doc describes 3.6.1 feature - typing.Deque

2017-02-10 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29481>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-18 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

The problem is the only good way to fix this I see now is patching two lines in 
functools and abc using the public ``typing_inspect`` API proposed in 
http://bugs.python.org/issue29262 (I added it as a dependency). The latter 
could take some time, so that I am not 100% sure about 3.6.1.

--
dependencies: +Provide a way to check for *real* typing.Union instances
type:  -> behavior

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28339>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

In principle, such a function could be added if it is not called 
``isinstance``. For example, we could add a helper ``is_union(tp)`` (or maybe 
also ``is_generic(tp)`` etc). Such function(s) will be simple one-liners 
wrapping private API in a right way (e.g. using _gorg instead of __origin__ 
where needed etc).

Guido, what do you think?

--
nosy: +gvanrossum, levkivskyi
type:  -> enhancement

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

OK, I agree.

How then it should be done logistically? Should I just make a separate repo on 
GitHub for this? Or will it be inside typing (like mypy_extesions is inside 
mypy) but published on PyPI separately?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

This will be a bit unusual since ``isinstance`` is typically called for 
instances (i.e. not types) as in ``isinstance(func, Callable)``. But on the 
other hand this is probably what one would expect when one sees 
``isinstance(tp, Union)``. Thus I am fine with doing it this way.

If there are no objections/other ideas, then I will make a PR upstream in next 
few days.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I have a similar idea. We already have mypy_extensions for runtime counterparts 
of experimental features. However, the runtime inspections are not related to 
mypy, so that I am not sure. I am just a bit worried there will be to many 
things to keep in mind/in sync. What do you think?

By the way maybe later we could add ``typing.inspect`` similar to ``typing.re`` 
and ``typing.io``?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2017-01-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> Maybe a proposal should be discussed as an addendum to PEP 484? Or would
Mark Shannon reject that?

On one hand, I would like to involve a wider audience to this discussion. On 
the other hand, an addition to the PEP could slow things down. Maybe a 
discussion on python-dev followed by implementation plus extensive docs would 
work?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29262>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29310] Document typing.NamedTuple default argument syntax

2017-01-18 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29310>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I don't have any strong opinion on this. If others don't object then I am 
perfectly fine with keeping typing provisional for 3.6.

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29316>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29316] Can we keep typing.py provisional for the duration of the Python 3.6 release cycle?

2017-01-18 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

There are also minor things like NoReturn, typing_inspect helpers(?) etc. 

The main good point I see for keeping typing provisional is we could iterate 
fast and come up with more "settled" and robust API in time for 3.7.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29316>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29316] Keep typing.py provisional for the duration of the Python 3.6 release cycle

2017-01-20 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Yes, I attached the patch.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file46356/provisional-typing-patch.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29316>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27598] Add SizedIterable to collections.abc and typing

2016-08-18 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I submit a simple solution in line with __subclasshook__ of other ABCs.
I added several tests, it looks like it is doing everything right.

Please review.

--
keywords: +patch
Added file: http://bugs.python.org/file44144/collection.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27598>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27598] Add SizedIterable to collections.abc and typing

2016-08-19 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Thank you Neil, I agree that Sequence is a reversible collection.

I combined you documentation patch with updated _collections_abc and updated 
test_functools (it tests MRO) into a single patch.

--
Added file: http://bugs.python.org/file44148/collection_neil_combined.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27598>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Oops, sorry, forgot one import, all tests pass with the corrected patch.

--
Added file: http://bugs.python.org/file44123/abarnert_rebased2.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25958>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27594] Assertion failure when running "test_ast" tests with coverage.

2016-08-17 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Ned, thank you for applying the patch!

I have discovered this same issue accidentally while playing with possible 
implementations of PEP 526. It appeared as a failure in
test_sys_settrace in my fork.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27594>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25958] Implicit ABCs have no means of "anti-registration"

2016-08-18 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

On my machine 8 tests are always skipped:
test_devpoll test_kqueue test_msilib test_ossaudiodev
test_startfile test_winreg test_winsound test_zipfile64
All others tests pass OK.

The main part of the work is by Andrew Barnert, I only introduced small changes 
due to previous changes in Reversible and few minor things in response to 
previous comments.

Guido, thank you for applying the patch!

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25958>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27905] Add documentation for typing.Type

2016-09-02 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Michael, thank you for helping with this!
Please take a look at my comments on the patch.

--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27905>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-06 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Here is the patch for PEP 526 implementation

--
keywords: +patch
nosy: +levkivskyi
Added file: http://bugs.python.org/file44415/hg-pep-526.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-06 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Oops, sorry, forgot to add new files when converting from git to hg, here is 
the full patch.

--
Added file: http://bugs.python.org/file44416/hg-pep-526.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Ivan Levkivskyi

New submission from Ivan Levkivskyi:

The documentation at https://docs.python.org/3/reference/simple_stmts.html says 
that:

"Names listed in a global statement must not be used in the same code block 
textually preceding that global statement"

But then later:

"CPython implementation detail: The current implementation does not enforce the 
two restrictions,
but programs should not abuse this freedom, as future implementations may 
enforce them..."

Code like this

def f():
x = 1
global x

gives SyntaxWarning for several releases, maybe it is time to make it a 
SyntaxError?

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 274813
nosy: docs@python, gvanrossum, levkivskyi
priority: normal
severity: normal
status: open
title: Make "global after use" a SyntaxError
type: behavior
versions: Python 3.6

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27999>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Yes, nonlocal will be fixed too. This will be a relatively small patch, but I 
am a bit afraid there could be merge conflicts (the code affected could overlap 
with changes for PEP 526).

Easiest way would be to simply make this a single patch with PEP 526 
implementation (this will actually even slightly simplify the implementation).

Alternatively we could fix this right after the implementation patch is 
applied. What do you prefer?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27999>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27999] Make "global after use" a SyntaxError

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

OK, then I think after will be safer. Let us came back to this right after PEP 
526.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27999>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27989] incomplete signature with help function using typing

2016-09-07 Thread Ivan Levkivskyi

Changes by Ivan Levkivskyi <levkivs...@gmail.com>:


--
nosy: +levkivskyi

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27989>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

We discussed this at some point on python/typing. At that time we decided that

class C:

del __annotations__
x: int

Should be an error. Do you think that it should behave in a different way in 
interactive REPL and/or at module level?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

> I think this is how exec() already works

This is not exactly like this, exec() emits ast.Module while interactive input 
emits ast.Interactive (this one skips compiler_body in compile.c), but I think 
I have got your point, will fix this.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Guido,

I fixed __annotations__ in interactive REPL, will fix other minor things and 
submit a new patch tomorrow morning.

There are two important questions in typing.py:

> Why is the second isinstance() needed? Isn't _ClassVar a subclass of
> TypingMeta

and 

> This being a metaclass, the name should end in Meta, like most
> other subclasses of TypingMeta. (And they don't have a leading _,
> though they're still not public.)

The problem with ClassVar is that it is not actually a class, and _ClassVar is 
not a metaclass, it is just a class. I deviated from the common pattern in 
module for the following reason. ClassVar is going to be extensively used at 
class scope, where all annotations are evaluated. Therefore I wanted not to 
create new class objects by __getitem__ like it is going for other classes like 
Union etc (I tried to timeit this and ClassVar is almost ten times faster than 
Union)

What do you think?
Should I keep it like this, or rewrite in a common pattern for the module?

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-07 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

I could change STORE_ANNOTATION opcode so that it will recreate __annotations__ 
if __name__ == '__main__'.

Or do you now think that it should re-create it always? I still think that 
always re-creating __annotations__ if they don't exist seems like silencing a 
possible error. As I mentioned in previous discussion, I think we should allow 
people to explicitly del __annotations__ (for example if someone wants to make 
a class with annotations that are "invisible" to runtime tools) and warn them 
if later they use annotations.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27985] Implement PEP 526

2016-09-08 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

Here is the new patch. I hope I didn't miss any comment and fixed everything.

There is still a refleak to fix.

--
Added file: http://bugs.python.org/file44469/hg-pep-526-v2.diff

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27985>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   6   7   >