From dbe3087eb45e81cbac9a67f4d99fab553b506215 Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Tue, 27 Sep 2016 10:42:36 +0200
Subject: [PATCH 01/10] back to dev

---
 traitlets/_version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traitlets/_version.py b/traitlets/_version.py
index 4f96e7cf..9fd223ac 100644
--- a/traitlets/_version.py
+++ b/traitlets/_version.py
@@ -1,2 +1,2 @@
-version_info = (4, 3, 0)
+version_info = (4, 4, 0, 'dev')
 __version__ = '.'.join(map(str, version_info))

From 2e466405b71a0c72d087a07986d6608066247d7b Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Wed, 21 Sep 2016 10:21:51 +0200
Subject: [PATCH 02/10] Backport PR #318: Test Python 3.6

closes  313
---
 .travis.yml            |  1 +
 traitlets/traitlets.py | 10 ++--------
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index dc5887da..5abd74e1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,7 @@ python:
     - 3.4
     - 2.7
     - 3.3
+    - 3.6-dev
 sudo: false
 install:
     - pip install .
diff --git a/traitlets/traitlets.py b/traitlets/traitlets.py
index c23151db..8c19baa1 100644
--- a/traitlets/traitlets.py
+++ b/traitlets/traitlets.py
@@ -1119,16 +1119,10 @@ def hold(change):
                 cache = {}
                 raise e
             finally:
-                # Reset the notify_change to original value, enable cross-validation
-                # and fire resulting change notifications.
-                self.notify_change = notify_change
                 self._cross_validation_lock = False
+                # Restore method retrieval from class
+                del self.notify_change
 
-                if isinstance(notify_change, types.MethodType):
-                    # Presence of the notify_change method
-                    # on __dict__ can cause memory leaks
-                    # and prevents pickleability
-                    self.__dict__.pop('notify_change')
                 # trigger delayed notifications
                 for changes in cache.values():
                     for change in changes:

From ec41f66537a3fa0e0e4e2917ec1e2eac80dc0771 Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Mon, 26 Sep 2016 12:37:49 +0200
Subject: [PATCH 03/10] Backport PR #325: avoid modifying inherited class attr

could affect parent classes incorrectly.
---
 traitlets/config/application.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/traitlets/config/application.py b/traitlets/config/application.py
index 8e75a5be..e1e8baf2 100644
--- a/traitlets/config/application.py
+++ b/traitlets/config/application.py
@@ -272,8 +272,13 @@ def __init__(self, **kwargs):
         SingletonConfigurable.__init__(self, **kwargs)
         # Ensure my class is in self.classes, so my attributes appear in command line
         # options and config files.
-        if self.__class__ not in self.classes:
-            self.classes.insert(0, self.__class__)
+        cls = self.__class__
+        if cls not in self.classes:
+            if self.classes is cls.classes:
+                # class attr, assign instead of insert
+                cls.classes = [cls] + self.classes
+            else:
+                self.classes.insert(0, self.__class__)
 
     @observe('config')
     @observe_compat

From 495b5dbfffe3e81622c05d733a8c888b5873a83b Mon Sep 17 00:00:00 2001
From: Matthias Bussonnier <bussonniermatthias@gmail.com>
Date: Mon, 19 Sep 2016 13:48:11 -0700
Subject: [PATCH 04/10] Backport PR #314: Improve "looking for config" message
 when no path specified

instead of:

    looking for config in None

output:

    looking for config in /path/to/cwd
---
 traitlets/config/application.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traitlets/config/application.py b/traitlets/config/application.py
index e1e8baf2..c6fc4777 100644
--- a/traitlets/config/application.py
+++ b/traitlets/config/application.py
@@ -552,7 +552,7 @@ def _load_config_files(cls, basefilename, path=None, log=None, raise_config_file
             # path list is in descending priority order, so load files backwards:
             pyloader = cls.python_config_loader_class(basefilename+'.py', path=path, log=log)
             if log:
-                log.debug("Looking for %s in %s", basefilename, path)
+                log.debug("Looking for %s in %s", basefilename, path or os.getcwd())
             jsonloader = cls.json_config_loader_class(basefilename+'.json', path=path, log=log)
             config = None
             loaded = []

From c2571984a2dc67ae547b0872fc2562dd1aadef4f Mon Sep 17 00:00:00 2001
From: Matthias Bussonnier <bussonniermatthias@gmail.com>
Date: Tue, 27 Sep 2016 16:09:19 -0700
Subject: [PATCH 05/10] Backport PR #326: changes for 4.3.1

Mainly for Python 3.6 workaround.

I'll release once this is merged.
---
 docs/source/changelog.rst | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index ca8507e2..99a98aa9 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -4,6 +4,14 @@ Changes in Traitlets
 4.3
 ---
 
+4.3.1
+*****
+
+`4.3.1 on GitHub`_
+
+- Compatibility fix for Python 3.6a1
+- Fix bug in Application.classes getting extra entries when multiple Applications are instantiated in the same process.
+
 4.3.0
 *****
 
@@ -91,3 +99,4 @@ First release of traitlets as a standalone package.
 .. _`4.2.1 on GitHub`: https://github.com/ipython/traitlets/milestones/4.2.1
 .. _`4.2.2 on GitHub`: https://github.com/ipython/traitlets/milestones/4.2.2
 .. _`4.3.0 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3
+.. _`4.3.1 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3.1

From 3143f707509cca1a3adb2f8bbbeac58b09081db1 Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Wed, 28 Sep 2016 13:31:57 +0200
Subject: [PATCH 06/10] release 4.3.1

---
 traitlets/_version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traitlets/_version.py b/traitlets/_version.py
index 9fd223ac..6df6c0a6 100644
--- a/traitlets/_version.py
+++ b/traitlets/_version.py
@@ -1,2 +1,2 @@
-version_info = (4, 4, 0, 'dev')
+version_info = (4, 3, 1)
 __version__ = '.'.join(map(str, version_info))

From 93e4a240548d69728d0123c2a43dc46c1f89a91c Mon Sep 17 00:00:00 2001
From: Sylvain Corlay <sylvain.corlay@gmail.com>
Date: Fri, 17 Feb 2017 13:06:50 +0100
Subject: [PATCH 07/10] Merge pull request #377 from
 minrk/undeprecate-default-methods

undeprecate `_trait_default`
---
 docs/source/migration.rst | 7 ++++---
 traitlets/traitlets.py    | 3 ++-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/docs/source/migration.rst b/docs/source/migration.rst
index c88cd9d6..59f7026d 100644
--- a/docs/source/migration.rst
+++ b/docs/source/migration.rst
@@ -118,11 +118,12 @@ by notification type.
         def handler_all(self, change):
             pass
 
-Deprecation of magic method for dynamic defaults generation
------------------------------------------------------------
+dynamic defaults generation with decorators
+-------------------------------------------
 
 The use of the magic methods ``_{trait}_default`` for dynamic default
-generation is deprecated, in favor a new ``@default`` method decorator.
+generation is not deprecated, but a new ``@default`` method decorator
+is added.
 
 **Example:**
 
diff --git a/traitlets/traitlets.py b/traitlets/traitlets.py
index 8c19baa1..ec0c518b 100644
--- a/traitlets/traitlets.py
+++ b/traitlets/traitlets.py
@@ -416,7 +416,8 @@ class TraitType(BaseDescriptor):
     read_only = False
     info_text = 'any value'
 
-    def __init__(self, default_value=Undefined, allow_none=False, read_only=None, help=None, **kwargs):
+    def __init__(self, default_value=Undefined, allow_none=False, read_only=None, help=None,
+        config=None, **kwargs):
         """Declare a traitlet.
 
         If *allow_none* is True, None is a valid value in addition to any

From dc3e37ec55a26b1786ffbf485b7f1050a0f18580 Mon Sep 17 00:00:00 2001
From: Sylvain Corlay <sylvain.corlay@gmail.com>
Date: Fri, 17 Feb 2017 13:03:05 +0100
Subject: [PATCH 08/10] Merge pull request #376 from
 minrk/bless-config-metadata

Bless config metadata in trait constructors
---
 traitlets/config/tests/test_configurable.py | 2 +-
 traitlets/traitlets.py                      | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/traitlets/config/tests/test_configurable.py b/traitlets/config/tests/test_configurable.py
index cf269c03..9fbdb720 100644
--- a/traitlets/config/tests/test_configurable.py
+++ b/traitlets/config/tests/test_configurable.py
@@ -402,7 +402,7 @@ class SomeSingleton(SingletonConfigurable):
 
         # reset deprecation limiter
         _deprecations_shown.clear()
-        with expected_warnings(['metadata should be set using the \.tag\(\) method']):
+        with expected_warnings([]):
             class DefaultConfigurable(Configurable):
                 a = Integer(config=True)
                 def _config_default(self):
diff --git a/traitlets/traitlets.py b/traitlets/traitlets.py
index ec0c518b..c07daf74 100644
--- a/traitlets/traitlets.py
+++ b/traitlets/traitlets.py
@@ -457,6 +457,8 @@ def __init__(self, default_value=Undefined, allow_none=False, read_only=None, he
                 self.metadata = kwargs
         else:
             self.metadata = self.metadata.copy()
+        if config is not None:
+            self.metadata['config'] = config
 
         # We add help to the metadata during a deprecation period so that
         # code that looks for the help string there can find it.
@@ -507,7 +509,6 @@ def _dynamic_default_callable(self, obj):
 
                 if meth_name in cls.__dict__:
                     method = getattr(obj, meth_name)
-                    _deprecated_method(method, cls, meth_name, "use @default decorator instead.")
                     return method
 
         return getattr(self, 'make_dynamic_default', None)

From c2e44ca3eb160dc633ca8d16215716d31d7e87f8 Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Thu, 23 Feb 2017 11:20:10 +0100
Subject: [PATCH 09/10] Backport PR #378: Changelog for 4.3.2

Tiny release, removing a couple of deprecations to make upgrading existing packages more pleasant.

cc  JamiesHQ

Signed-off-by: Min RK <benjaminrk@gmail.com>
---
 docs/source/changelog.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst
index 99a98aa9..a1a472c6 100644
--- a/docs/source/changelog.rst
+++ b/docs/source/changelog.rst
@@ -4,6 +4,17 @@ Changes in Traitlets
 4.3
 ---
 
+4.3.2
+*****
+
+`4.3.2 on GitHub`_
+
+4.3.2 is a tiny release, relaxing some of the deprecations introduced in 4.1:
+
+- using :meth:`_traitname_default()` without the ``@default`` decorator is no longer
+  deprecated.
+- Passing ``config=True`` in traitlets constructors is no longer deprecated.
+
 4.3.1
 *****
 
@@ -100,3 +111,4 @@ First release of traitlets as a standalone package.
 .. _`4.2.2 on GitHub`: https://github.com/ipython/traitlets/milestones/4.2.2
 .. _`4.3.0 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3
 .. _`4.3.1 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3.1
+.. _`4.3.2 on GitHub`: https://github.com/ipython/traitlets/milestones/4.3.2

From ba0ff90a2220ecf15062594428c3794d232c4cde Mon Sep 17 00:00:00 2001
From: Min RK <benjaminrk@gmail.com>
Date: Thu, 23 Feb 2017 11:21:19 +0100
Subject: [PATCH 10/10] release 4.3.2

---
 traitlets/_version.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/traitlets/_version.py b/traitlets/_version.py
index 6df6c0a6..b360e610 100644
--- a/traitlets/_version.py
+++ b/traitlets/_version.py
@@ -1,2 +1,2 @@
-version_info = (4, 3, 1)
+version_info = (4, 3, 2)
 __version__ = '.'.join(map(str, version_info))