Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Python 3.8 compatible lru_cache #2566

Merged
merged 2 commits into from
Dec 9, 2022
Merged

Use Python 3.8 compatible lru_cache #2566

merged 2 commits into from
Dec 9, 2022

Conversation

Helveg
Copy link
Contributor

@Helveg Helveg commented Dec 9, 2022

fixes #2561

Copy link
Contributor

@babsey babsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still doesn't work: Another error shows up:

In [4]: from nest import spatial
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 from nest import spatial

File ~/opt/nest-cache/lib/python3.8/site-packages/nest/spatial/__init__.py:27
     23 from .hl_api_spatial import *  # noqa
     24 from .hl_api_spatial import DistanceParameter as _DistanceParameter
---> 27 @_functools.lru_cache(max_size=None)
     28 def __getattr__(name):
     29     if name == "distance":
     30         return _DistanceParameter()

TypeError: lru_cache() got an unexpected keyword argument 'max_size'

@Helveg Helveg requested a review from babsey December 9, 2022 12:29
Copy link
Contributor

@babsey babsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nest.spatial works. LGTM!

@Helveg Helveg merged commit 8255521 into master Dec 9, 2022
@Helveg Helveg deleted the Helveg-patch-1 branch December 9, 2022 13:42
@terhorstd terhorstd changed the title Use 3.8 compatible lru_cache Use Python 3.8 compatible lru_cache Jan 18, 2023
@terhorstd terhorstd added T: Bug Wrong statements in the code or documentation S: High Should be handled next I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NEST failed to import submodule spatial
3 participants