hbmartin commited on
Commit
0ec4771
1 Parent(s): a138039

try importing protocol from typing, fallback to typing_extensions

Browse files
Files changed (1) hide show
  1. pytube/monostate.py +5 -1
pytube/monostate.py CHANGED
@@ -1,6 +1,10 @@
1
  import io
2
  from typing import Any, Optional
3
- from typing_extensions import Protocol
 
 
 
 
4
 
5
  # from __future__ import annotations
6
 
 
1
  import io
2
  from typing import Any, Optional
3
+
4
+ try:
5
+ from typing import Protocol
6
+ except ImportError:
7
+ from typing_extensions import Protocol
8
 
9
  # from __future__ import annotations
10