[issue25988] collections.abc.Indexable

2021-01-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset c47c78b878ff617164b2b94ff711a6103e781753 by Hugo van Kemenade in branch 'master': bpo-37324: Remove ABC aliases from collections (GH-23754) https://github.com/python/cpython/commit/c47c78b878ff617164b2b94ff711a6103e781753 --

[issue25988] collections.abc.Indexable

2020-02-18 Thread STINNER Victor
STINNER Victor added the comment: New changeset af5ee3ff610377ef446c2d88bbfcbb3dffaaf0c9 by Victor Stinner in branch 'master': bpo-39674: Revert "bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596)" (GH-18545)

[issue25988] collections.abc.Indexable

2020-02-18 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +17923 pull_request: https://github.com/python/cpython/pull/18545 ___ Python tracker ___

[issue25988] collections.abc.Indexable

2019-10-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 ___ Python tracker ___

[issue25988] collections.abc.Indexable

2019-10-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ef092fe9905f61ca27889092ca1248a11aa74498 by Serhiy Storchaka in branch 'master': bpo-25988: Do not expose abstract collection classes in the collections module. (GH-10596)

[issue25988] collections.abc.Indexable

2019-05-20 Thread Matthias Bussonnier
Matthias Bussonnier added the comment: mbussonn: Your new PR looks like it's related to #36953 ("Remove collections ABCs?"), not this issue specifically. Can you withdraw/reissue attached to the correct issue? Apologies, I've rebased and updated the issue numbers, not sure how I got the

[issue25988] collections.abc.Indexable

2019-05-20 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- pull_requests: -13320 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25988] collections.abc.Indexable

2019-05-20 Thread Josh Rosenberg
Josh Rosenberg added the comment: mbussonn: Your new PR looks like it's related to #36953 ("Remove collections ABCs?"), not this issue specifically. Can you withdraw/reissue attached to the correct issue? -- nosy: +josh.r, mbussonn ___ Python

[issue25988] collections.abc.Indexable

2019-05-18 Thread Matthias Bussonnier
Change by Matthias Bussonnier : -- pull_requests: +13320 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25988] collections.abc.Indexable

2018-11-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +9841 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25988] collections.abc.Indexable

2018-11-18 Thread Guido van Rossum
Change by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue25988] collections.abc.Indexable

2018-11-18 Thread Carl Bordum Hansen
Carl Bordum Hansen added the comment: Thank you for all the hours all of you spent on making Python awesome. I would like to start contributing as well. Do you consider it time to remove `__getattr__` in `Lib/collections/__init__.py` on master yet (introduced in pr #5460)? -- nosy:

[issue25988] collections.abc.Indexable

2018-02-18 Thread Ned Deily
Ned Deily added the comment: New changeset 2e84e47626c6eafacc9f011cd9fccc8bf1c8508e by Ned Deily in branch '3.7': bpo-25988: add NEWS entry for 3.7.0b2 (#5743) https://github.com/python/cpython/commit/2e84e47626c6eafacc9f011cd9fccc8bf1c8508e --

[issue25988] collections.abc.Indexable

2018-02-18 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +5520 ___ Python tracker ___ ___ Python-bugs-list

[issue25988] collections.abc.Indexable

2018-02-18 Thread Ned Deily
Ned Deily added the comment: Thanks, Tim, for noticing that and thanks, Ivan, for taking care of it. I should have cherrypicked this into 3.7.0b1. -- ___ Python tracker

[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)

[issue25988] collections.abc.Indexable

2018-02-18 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- pull_requests: +5515 ___ Python tracker ___ ___

[issue25988] collections.abc.Indexable

2018-02-05 Thread Tim Graham
Tim Graham added the comment: The last commit that added the deprecation warning needs to be added to the 3.7 branch. -- nosy: +Tim.Graham ___ Python tracker

[issue25988] collections.abc.Indexable

2018-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c66f9f8d3909f588c251957d499599a1680e2320 by Serhiy Storchaka in branch 'master': bpo-25988: Emit a warning when use or import ABCs from 'collections'. (#5460)

[issue25988] collections.abc.Indexable

2018-01-31 Thread Guido van Rossum
Guido van Rossum added the comment: Good idea, Victor, and thanks for the PR, Serhiy! -- ___ Python tracker ___

[issue25988] collections.abc.Indexable

2018-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Can't we use the new shiny PEP 562 here to actually emit a warning when > collections.Iterable is used instead of collections.abc.Iterable? PR 5460 implements this. It exposes issues in third-party packages. urllib3 and

[issue25988] collections.abc.Indexable

2018-01-31 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +5287 ___ Python tracker ___ ___

[issue25988] collections.abc.Indexable

2018-01-31 Thread STINNER Victor
STINNER Victor added the comment: Can't we use the new shiny PEP 562 here to actually emit a warning when collections.Iterable is used instead of collections.abc.Iterable? -- nosy: +vstinner ___ Python tracker

[issue25988] collections.abc.Indexable

2018-01-30 Thread Guido van Rossum
Guido van Rossum added the comment: > > But we should make some noise around this change in the 3.7 announcement. > > How about a paragraph in the Deprecation section of the "What's New in Python > 3.7"? document > > https://docs.python.org/dev/whatsnew/3.7.html#deprecated

[issue25988] collections.abc.Indexable

2018-01-30 Thread Ned Deily
Ned Deily added the comment: Guido: > But we should make some noise around this change in the 3.7 announcement. How about a paragraph in the Deprecation section of the "What's New in Python 3.7"? document https://docs.python.org/dev/whatsnew/3.7.html#deprecated --

[issue25988] collections.abc.Indexable

2018-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset e6d342156d2ab20fb88c0a5ec615fa8f602c0769 by Raymond Hettinger in branch 'master': bpo-25988: Deprecate exposing collections.abc in collections GH-5414

[issue25988] collections.abc.Indexable

2018-01-28 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +5248 stage: -> patch review ___ Python tracker ___

[issue25988] collections.abc.Indexable

2017-07-22 Thread Guido van Rossum
Guido van Rossum added the comment: I think it's not worth the hack that Serhiy suggests. But we should make some noise around this change in the 3.7 announcement. -- ___ Python tracker

[issue25988] collections.abc.Indexable

2017-07-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: > The copying approach likely won't work ... Then it seems like just adding a note to the docs is the way to go. That's probably okay though. I don't think we've every gotten much benefit from the programmatic deprecation warnings. --

[issue25988] collections.abc.Indexable

2017-07-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If we want to add programming warnings, we should replace sys.modules['collections'] with an instance of a module type subclass with corresponding properties raising a DeprecationWarning. -- ___ Python tracker

[issue25988] collections.abc.Indexable

2017-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: The copying approach likely won't work because there will be code that uses isinstance(x, collections.abc.Sequence) and other code that uses isinstance(x, collections.Sequence) and they'll expect both to be true. --

[issue25988] collections.abc.Indexable

2017-07-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Yes we will need a deprecation period for this starting with 3.7. There are two ways to do this. A wimpy and clean way is to just add a deprecation notice in the docs. The thorough and messy way is to temporarily copy everything from the 3.6

[issue25988] collections.abc.Indexable

2017-07-21 Thread Guido van Rossum
Guido van Rossum added the comment: Yes we will need a deprecation period for this starting with 3.7. It's fine not to import names newly added to collections.abc in 3.7 (i.e. collections would have to explicitly import everything that it got via * in 3.6). --

[issue25988] collections.abc.Indexable

2017-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm not sure that *new* names in collections.abc should be re-exported to collections. This isn't required for backward compatibility. -- ___ Python tracker

[issue25988] collections.abc.Indexable

2017-07-21 Thread Ivan Levkivskyi
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.storchaka

[issue25988] collections.abc.Indexable

2017-07-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Guido, do you think there is some way to decouple collections.abc from spilling into the namespace for non-abc collections module? At the interactive prompt, running dir() on collections gives an alphabetical hodgepodge of the two modules. To my eyes, it

[issue25988] collections.abc.Indexable

2017-07-20 Thread Guido van Rossum
Guido van Rossum added the comment: At least one use of Indexable (by whatever name, but this rolls off the tongue the easiest) would be the metaclass in typing.py that allows one to write List[int] -- there's no containter here! The "drowning out" seems purely subjective -- perhaps if you

[issue25988] collections.abc.Indexable

2017-07-20 Thread Ivan Levkivskyi
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 "theoretical"? FWIW, a simple

[issue25988] collections.abc.Indexable

2017-07-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: IIRC, the original motivation for ABCs was to differentiate distinct uses of __getitem__ (we forever struggled with differentiating sequences from mapping). It seems to me that this proposal is a step backwards. Other than a feeling of lightness, I don't

[issue25988] collections.abc.Indexable

2017-07-20 Thread Ivan Levkivskyi
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

[issue25988] collections.abc.Indexable

2016-01-01 Thread Andrew Barnert
New submission from Andrew Barnert: In an -ideas thread, Guido suggested (http://article.gmane.org/gmane.comp.python.ideas/37599): > If we want some way to turn something that just defines __getitem__ and > __len__ into a proper sequence, it should just be made to inherit from > Sequence,