Typing `NoReturn` requires Python 3.5.4
See original GitHub issueDescribe the bug Attempting to run PRAW 6.5.0 under <Python 3.5.4 (I’m using 3.5.1) will result in:
https://docs.python.org/3/library/typing.html#typing.NoReturn
Traceback (most recent call last):
File "F:\testing_routine.py", line 11, in <module>
import praw
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python35-32\lib\site-packages\praw\__init__.py", line 14, in <module>
from .reddit import Reddit # NOQA
File "C:\Users\USERNAME\AppData\Local\Programs\Python\Python35-32\lib\site-packages\praw\reddit.py", line 5, in <module>
from typing import (
ImportError: cannot import name 'NoReturn'
Typing NoReturn
was only introduced in 3.5.4 of Python, and PRAW allows for installation on 3.5.0 <= version ❤️.5.4 (3.5.0, 1, 2, 3) versions so users with these versions are going to encounter this. And this will be an issue unless a minimum version of 3.5.4 is set.
This was also introduced in 3.6.2, so I believe the versions 3.6.0 and 3.6.1 are also invalid.
TBH I may be a noob but I don’t understand why the typing additions were made in #1184.
To Reproduce Steps to reproduce the behavior:
- Run any script using PRAW on a version of Python 3.5 that’s below 3.5.4.
System Info
- OS: Windows 10 Pro
- Python: 3.5.1
- PRAW Version: 6.5.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (9 by maintainers)
Top Results From Across the Web
typing — Support for type hints — Python 3.11.1 documentation
This module provides runtime support for type hints. The most fundamental support consists of the types Any , Union , Callable , TypeVar ......
Read more >`typing.NoReturn` is new in Python 3.5.4 and 3.6.2 - - Bountysource
A utility library for parsing HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, and Tornado. See More ......
Read more >typing - PyPI
Typing defines a standard notation for Python function and variable type annotations. The notation can be used for documenting code in a concise,...
Read more >26.1. typing — Support for type hints — Stackless-Python 3.6 ...
This module supports type hints as specified by PEP 484 and PEP 526. ... How the type checker is required to handle this...
Read more >Python Examples of typing.NoReturn - ProgramCreek.com
Python typing.NoReturn() Examples. The following are 30 code examples of typing.NoReturn(). You can vote up the ones you like or vote down the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For what it’s worth, I happened to have an unsupported 3.6 version a week or two ago when I tried to run a different PR that used
NoReturn
. I upgraded my python version since then, but I don’t think we should expect people to upgrade their python version to use our library.Absolutely.