diff --git a/doc/source/pre/whatsnew/1.3.rst b/doc/source/pre/whatsnew/1.3.rst index cd99c3e4cd4b25d30f978e2ea2e08a07b1d0c2dc..7f6da300ae20d12a72c0a1b16c4d29c5f2c97a98 100644 --- a/doc/source/pre/whatsnew/1.3.rst +++ b/doc/source/pre/whatsnew/1.3.rst @@ -158,3 +158,9 @@ Quantities defined on system hoppings (e.g. currents calculated using `~kwant.operator.current`) can be directly plotted as a streamplot over the system using `kwant.plotter.current`. This is similar to how `kwant.plotter.map` can be used to plot quantities defined on sites. + +Remove site() method from finalized Builders +-------------------------------------------- +The `site` method of finalized builders has been deprecated since before +Kwant 1.1. Instead of this method one can get a list of sites from the +`sites` attribute of finalized builders. diff --git a/kwant/builder.py b/kwant/builder.py index c97f145c4e761f614d3a5da9738ffa2e261f32c4..8b5f14b424b48673c7e57b42947a793ef896af3d 100644 --- a/kwant/builder.py +++ b/kwant/builder.py @@ -1940,12 +1940,6 @@ class FiniteSystem(system.FiniteSystem): value = herm_conj(value) return value - def site(self, i): - warnings.warn("The function ``site`` will disappear after Kwant 1.1. " - "Use ``sites`` instead.", KwantDeprecationWarning, - stacklevel=2) - return self.sites[i] - def pos(self, i): return self.sites[i].pos @@ -2031,12 +2025,6 @@ class InfiniteSystem(system.InfiniteSystem): value = herm_conj(value) return value - def site(self, i): - warnings.warn("The function ``site`` will disappear after Kwant 1.1. " - "Use ``sites`` instead.", KwantDeprecationWarning, - stacklevel=2) - return self.sites[i] - def pos(self, i): return self.sites[i].pos