classification
Title: typing.ForwardRef is undocumented
Type: Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Anthony Sottile, docs@python, gvanrossum, levkivskyi, miss-islington
Priority: normal Keywords: patch

Created on 2019-05-21 05:35 by Anthony Sottile, last changed 2019-06-19 01:06 by levkivskyi. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 14216 merged levkivskyi, 2019-06-19 00:19
PR 14217 merged miss-islington, 2019-06-19 00:32
PR 14220 merged levkivskyi, 2019-06-19 00:50
Messages (4)
msg342979 - (view) Author: Anthony Sottile (Anthony Sottile) * Date: 2019-05-21 05:35
- New since 3.7.0
- is exposed by some public apis:
    - the `__doc__` attribute of `typing` mentions `ForwardRef`
    - `get_type_hints` can expose an instance of it: https://bugs.python.org/issue35834

Should this be documented? including in __all__?
msg344246 - (view) Author: Ivan Levkivskyi (levkivskyi) * (Python committer) Date: 2019-06-02 00:07
Guido, I remember you were against exposing `ForwardRef` as public at some point, but recently you approved https://github.com/python/cpython/pull/13456 that added it to `typing.__all__`. I don't have any particular opinion on this, but if you don't object, I think it would make sense to add a short section about this to the docs, since it may be exposed at runtime, e.g. in `List['Cls']`.
msg344319 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2019-06-02 21:13
Huh. I think I have mellowed with age. IOW SGTM.

On Sat, Jun 1, 2019 at 17:07 Ivan Levkivskyi <report@bugs.python.org> wrote:

>
> Ivan Levkivskyi <levkivskyi@gmail.com> added the comment:
>
> Guido, I remember you were against exposing `ForwardRef` as public at some
> point, but recently you approved
> https://github.com/python/cpython/pull/13456 that added it to
> `typing.__all__`. I don't have any particular opinion on this, but if you
> don't object, I think it would make sense to add a short section about this
> to the docs, since it may be exposed at runtime, e.g. in `List['Cls']`.
>
> ----------
> nosy: +gvanrossum
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue36985>
> _______________________________________
>
-- 
--Guido (mobile)
msg346017 - (view) Author: miss-islington (miss-islington) Date: 2019-06-19 01:02
New changeset d0587353fe2dece91d2a9b8ddf2696fb5adc233a by Miss Islington (bot) (Ivan Levkivskyi) in branch '3.7':
[3.7] bpo-36985: Document typing.ForwardRef (GH-14216) (GH-14220)
https://github.com/python/cpython/commit/d0587353fe2dece91d2a9b8ddf2696fb5adc233a
History
Date User Action Args
2019-06-19 01:06:01levkivskyisetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-06-19 01:02:18miss-islingtonsetnosy: + miss-islington
messages: + msg346017
2019-06-19 00:50:54levkivskyisetpull_requests: + pull_request14058
2019-06-19 00:32:59miss-islingtonsetpull_requests: + pull_request14055
2019-06-19 00:19:26levkivskyisetkeywords: + patch
stage: patch review
pull_requests: + pull_request14053
2019-06-02 21:13:42gvanrossumsetmessages: + msg344319
2019-06-02 00:07:20levkivskyisetnosy: + gvanrossum
messages: + msg344246
2019-05-24 20:27:33levkivskyisetnosy: + levkivskyi
2019-05-21 05:35:01Anthony Sottilecreate