Refactored list data structure type annotations for compatibility with Python 3.8#11
Conversation
…h Python 3.8 Replaced usage of list[...] with List[...] (e.g., list[int] → List[int], list[Hashable] → List[Hashable]) as generic built-in types are only supported in Python 3.9 and above.
|
Thanks for taking point on this, @noobie-bob. Hopefully a fix will get merged and published soon. |
|
just stumbled across this too. Since Pyhon 3.8 is long out of support I will update python versions in a couple of months anyway, But since this is the only thing that keeps this from running on 3.8 and there's already Uppercase spellings in other parts of the code this would also be a win for consistency, so a +1 from me. Edit: For any passers-by since deepdiff 8.4.2 requires any ordered-set version above or equal to 5.3.0 but below 6, you can also just make this your requirements and it will work in python 3.8. # for deepdiff 8.4.2 to work
orderly-set==5.3.0
deepdiff==8.4.2Edit2: typo fixed as pointed out by @SagareGanesh |
|
@Bigpet typo fix |
|
Actually, |
|
Hi @noobie-bob @mallman-experian @Bigpet |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11 +/- ##
=======================================
Coverage 83.91% 83.91%
=======================================
Files 2 2
Lines 597 597
Branches 117 117
=======================================
Hits 501 501
Misses 60 60
Partials 36 36 🚀 New features to boost your workflow:
|
|
@noobie-bob I released 5.4.1 which includes your patch. |
Replaced usage of list[...] with List[...]
(e.g., list[int] → List[int], list[Hashable] → List[Hashable]) as generic built-in types are only supported in Python 3.9 and above.
alleviates issue #10