Skip to content

remove backport of collections.OrderedDict for Py2.7 support #218

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

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

Conversation

a-detiste
Copy link
Contributor

collections.OrderedDict is available since Python3.1

https://docs.python.org/3/library/collections.html#collections.OrderedDict

@bashtage
Copy link
Contributor

Given the minimum supported python is 3
6, are all dict ordered now?

@a-detiste
Copy link
Contributor Author

I've heard "It is an implementation detail" and should not be relied on.

@bashtage
Copy link
Contributor

Looks like 3.7 is the minimum python where all dicts are ordered.

@bashtage
Copy link
Contributor

I've heard "It is an implementation detail" and should not be relied on.

It is required from 3.7.

https://mail.python.org/pipermail/python-dev/2017-December/151283.html

@a-detiste
Copy link
Contributor Author

So merge this in now and change it again later when 3.7 is minimum

@matthewwardrop
Copy link
Collaborator

@a-detiste : I don't have any objections to this PR, but also... this code-base is essentially dead. If things aren't broken, my general inclination is not to fix them. We want to the keep the package working, at least until more packages have successfully transitioned to formulaic... but no new feature development is planned.

I do appreciate you making the effort to improve things here, and I might merge it in if we do another release... which it looks like we might need to do for pandas 3 compatibility.

@a-detiste
Copy link
Contributor Author

@matthewwardrop this is part of a global effort to review all the remaining compat.py files. There are still tons of users left.

@matthewwardrop
Copy link
Collaborator

@a-detiste are the compat files broken in your experience? If not, every change introduces some amount of risk of breakage for longstanding use cases, which then would require additional maintenance... And so is likely not worth it. I know this project still has many users, but it is also a "dead" project.

This project is more than an order of magnitude slower than formulaic for most common tasks, and lacks many of the cleanups and niceties of its successor.

So, in short, my goal is to keep it "undead" 😜 until it is no longer needed... But little more.

@a-detiste
Copy link
Contributor Author

From our point of vue, https://www.statsmodels.org/stable/install.html statsmodel need to be adapted before we can drop Patsy

@matthewwardrop
Copy link
Collaborator

matthewwardrop commented Jul 27, 2025

@a-detiste : statsmodels has actually been ported already by @bashtage , but I don't think a stable version has been released with it yet.

Until then, as I mentioned, the goal is to keep things working as close to exactly as they are for the foreseeable future.

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