Commit 672950b
authored
Remove
Cachetools 7 introduced several breaking changes that made @cachedmethod significantly stricter, including converting it into a descriptor and requiring instances to have a mutable __dict__.
These assumptions do not align well with Kedro’s ParallelRunner, which relies on pickling and unpickling dataset instances across processes, and this resulted in runtime failures when upgrading to cachetools 7. Although pinning the dependency avoided the immediate issue, further investigation showed that cachetools is not well-suited to this use case. Kedro only caches two values per dataset instance (the resolved load and save versions) and does not require eviction policies, TTLs, or multi-key caching.
As a long-term solution, this change removes the cachetools dependency and replaces it with lightweight manual caching. This simplifies the implementation, removes an unnecessary dependency, and avoids future breakages in parallel execution.cachetools dependency (#5352)1 parent 37ec20e commit 672950b
File tree
5 files changed
+55
-23
lines changed- .github/workflows
- kedro/io
- tests/io
5 files changed
+55
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | | - | |
34 | | - | |
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
| |||
734 | 731 | | |
735 | 732 | | |
736 | 733 | | |
737 | | - | |
738 | | - | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
739 | 741 | | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
744 | 751 | | |
745 | 752 | | |
746 | 753 | | |
| |||
758 | 765 | | |
759 | 766 | | |
760 | 767 | | |
761 | | - | |
762 | 768 | | |
763 | | - | |
764 | | - | |
765 | | - | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
766 | 773 | | |
767 | 774 | | |
768 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
769 | 782 | | |
770 | 783 | | |
771 | 784 | | |
| |||
818 | 831 | | |
819 | 832 | | |
820 | 833 | | |
821 | | - | |
| 834 | + | |
822 | 835 | | |
823 | 836 | | |
824 | 837 | | |
| |||
844 | 857 | | |
845 | 858 | | |
846 | 859 | | |
847 | | - | |
| 860 | + | |
848 | 861 | | |
849 | 862 | | |
850 | 863 | | |
| |||
870 | 883 | | |
871 | 884 | | |
872 | 885 | | |
873 | | - | |
| 886 | + | |
874 | 887 | | |
875 | 888 | | |
876 | 889 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
602 | | - | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
603 | 606 | | |
| 607 | + | |
604 | 608 | | |
605 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
606 | 623 | | |
607 | 624 | | |
608 | 625 | | |
| |||
622 | 639 | | |
623 | 640 | | |
624 | 641 | | |
625 | | - | |
| 642 | + | |
626 | 643 | | |
627 | 644 | | |
628 | 645 | | |
| |||
0 commit comments