From c50d001d4c703ff321ebe1df3119af14b8049e49 Mon Sep 17 00:00:00 2001
From: Joseph Weston <joseph.weston08@gmail.com>
Date: Mon, 20 Mar 2017 11:20:03 +0100
Subject: [PATCH] remove the 'site' method of finalized builders

This was deprecated several releases ago
---
 doc/source/pre/whatsnew/1.3.rst |  6 ++++++
 kwant/builder.py                | 12 ------------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/doc/source/pre/whatsnew/1.3.rst b/doc/source/pre/whatsnew/1.3.rst
index cd99c3e4..7f6da300 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 c97f145c..8b5f14b4 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
 
-- 
GitLab