pysal / segregation

Segregation Measurement, Inferential Statistics, and Decomposition Analysis
https://pysal.org/segregation/
BSD 3-Clause "New" or "Revised" License
112 stars 26 forks source link

add deprecation layer for 2.0 #171

Closed sjsrey closed 3 years ago

sjsrey commented 3 years ago

161

See the mapping of old to new here.

sjsrey commented 3 years ago

Work in progress is here

sjsrey commented 3 years ago

I think most of the old methods are now covered by deprecation warnings in 2.0.

One class that I don't see mapped to a new version is spatial,SpatialDivergence @knaaptime is this correct that we are dropping this in 2.0 or did I miss a mapping to a new class?

sjsrey commented 3 years ago

TODO

Notes

The deprecation pattern we are using doesn't play nicely when a deprecated class is used as a parent/ancestor class to a class that, in turn, will be decorated for deprecation. The call to super will throw an error.

A fix for this is to duplicate the class that will be decorated and give it a UD ending as done here. The original class is then decorated for deprecation, while the UD class is used in any offspring classes.

knaaptime commented 3 years ago

awesome, thank you!

One class that I don't see mapped to a new version is spatial,SpatialDivergence @knaaptime is this correct that we are dropping this in 2.0 or did I miss a mapping to a new class?

musta missed it on accident. It collapses into multigroup.MultiDivergence

knaaptime commented 3 years ago

resolved by #161