Commit 327089b
authored
Backport get_origin() and get_args() (#698)
The implementations come from CPython commit 427c84f13f77 with one small
change – the get_origin's docstring mentions Annotated as it's also
supported.
get_origin() and get_args() introduced in [1] and modified in [2] to
support Annotated.
[1] python/cpython#13685
[2] python/cpython#18260
* Define our own get_origin()/get_args() in typing_extensions on Python 3.8
Otherwise typing_extensions.get_origin() would not recognize
typing_extensions.Annotated on 3.8.1 parent a867181 commit 327089b
2 files changed
+53
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1833 | 1833 | | |
1834 | 1834 | | |
1835 | 1835 | | |
| 1836 | + | |
| 1837 | + | |
1836 | 1838 | | |
1837 | 1839 | | |
1838 | 1840 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
1992 | 1992 | | |
1993 | 1993 | | |
1994 | 1994 | | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
0 commit comments