Skip to content

Conversation

@rplopes
Copy link
Contributor

@rplopes rplopes commented Apr 15, 2025

https://datacamp.atlassian.net/browse/CP-4785

Blocked by datacamp/protowhat#63

  • Updates documentation to instruct to use Python 3.12.7
  • Updates CI to run on Python 3.12
  • Updates dependencies
  • Resolves deprecation warnings
  • Fixes an incompatibility with random.randint

@rplopes rplopes force-pushed the cp-4785-add-support-for-python-3.12 branch from 39d3631 to e09b09b Compare April 15, 2025 16:28
def get_part(name, key, highlight):
if isinstance(key, str):
slice_val = ast.Str(s=key)
slice_val = ast.Constant(value=key)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a change in the ast library in python3.12?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's 2 different deprecations:

DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    slice_val = ast.Str(s=key)
DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
    return Constant(*args, **kwargs)

Not strictly mandatory for this work, but at least it's less work for next time (and fewer deprecation warnings making noise).

@rplopes rplopes merged commit 1bad936 into master Apr 30, 2025
1 check passed
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.

3 participants