Skip to content

Refactored list data structure type annotations for compatibility with Python 3.8#11

Merged
seperman merged 1 commit intoseperman:masterfrom
noobie-bob:patch-1
May 6, 2025
Merged

Refactored list data structure type annotations for compatibility with Python 3.8#11
seperman merged 1 commit intoseperman:masterfrom
noobie-bob:patch-1

Conversation

@noobie-bob
Copy link
Contributor

@noobie-bob noobie-bob commented Apr 12, 2025

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

…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.
@noobie-bob noobie-bob changed the title Refactored list data structure type annotations for compatibility with h Python 3.8 Refactored list data structure type annotations for compatibility with Python 3.8 Apr 12, 2025
@mallman-experian
Copy link

Thanks for taking point on this, @noobie-bob. Hopefully a fix will get merged and published soon.

@Bigpet
Copy link

Bigpet commented Apr 14, 2025

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.2

Edit2: typo fixed as pointed out by @SagareGanesh

@SagareGanesh
Copy link

@Bigpet typo fix

# for deepdiff 8.4.2 to work
orderly-set==5.3.0
deepdiff==8.4.2

@mallman-experian
Copy link

Actually, orderly-set==5.3.2 works, too.

@seperman
Copy link
Owner

seperman commented May 6, 2025

Hi @noobie-bob @mallman-experian @Bigpet
Thanks for bringing this to my attention. Yes, we will drop Python 3.8 support in the next release. I will keep you posted.

@seperman seperman merged commit b827c92 into seperman:master May 6, 2025
6 checks passed
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.91%. Comparing base (654aa41) to head (bebe0ec).
Report is 3 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@seperman
Copy link
Owner

seperman commented May 6, 2025

@noobie-bob I released 5.4.1 which includes your patch.

@noobie-bob noobie-bob deleted the patch-1 branch June 29, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants