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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion patsy/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
__all__ = ["design_matrix_builders", "build_design_matrices"]

import itertools
from collections import OrderedDict

import numpy as np
from patsy import PatsyError
Expand All @@ -22,7 +23,6 @@
from patsy.redundancy import pick_contrasts_for_term
from patsy.eval import EvalEnvironment
from patsy.contrasts import code_contrast_matrix, Treatment
from patsy.compat import OrderedDict
from patsy.missing import NAAction

if have_pandas:
Expand Down
8 changes: 0 additions & 8 deletions patsy/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@
# add here explaining their provenance, any changes made, and what versions of
# Python require them:

# OrderedDict is only available in Python 2.7+. compat_ordereddict.py has
# comments at the top.
import collections

if optional_dep_ok and hasattr(collections, "OrderedDict"):
from collections import OrderedDict
else:
from patsy.compat_ordereddict import OrderedDict

# 'raise from' available in Python 3+
import sys
Expand Down
270 changes: 0 additions & 270 deletions patsy/compat_ordereddict.py

This file was deleted.

2 changes: 1 addition & 1 deletion patsy/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def _check_lincon(input, varnames, coefs, constants):

def test_linear_constraint():
import pytest
from patsy.compat import OrderedDict
from collections import OrderedDict

t = _check_lincon

Expand Down
2 changes: 1 addition & 1 deletion patsy/design_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
__all__ = ["DesignInfo", "FactorInfo", "SubtermInfo", "DesignMatrix"]

import warnings
from collections import OrderedDict

import numpy as np

from patsy import PatsyError
from patsy.util import atleast_2d_column_default
from patsy.compat import OrderedDict
from patsy.util import (
repr_pretty_delegate,
repr_pretty_impl,
Expand Down
Loading