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

Simplify from_key_val_list doctest to work across all Python 3.8+ versions #6839

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sklyvan
Copy link

@Sklyvan Sklyvan commented Dec 7, 2024

Simplifies the doctest for the from_key_val_list function to ensure compatibility across all Python 3.8+ versions, particularly addressing the inconsistency in how OrderedDict is represented in Python 3.8+ versus earlier versions.

Representation Differences:

Starting from Python 3.8, the string representation of an OrderedDict has changed slightly.
In earlier versions, OrderedDict objects were represented as:

OrderedDict([('key', 'val')])

In Python 3.8 and later, the OrderedDict has a more streamlined string representation, shown as:

OrderedDict({'key': 'val'})

The Python 3.8 and lower versions are already considered End of Life by Python, so there is no need to build the test around the older representation for OrderedDict.

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.

1 participant