From c7c4a5437b2295c85e2118a1d17b9b71409fac83 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Fri, 25 Sep 2015 20:44:35 -0400 Subject: [PATCH] Enable Python 3.5 during CI --- .travis.yml | 1 + CHANGES.md | 20 +++++++++++--------- setup.py | 2 ++ tests/test_all_pm.py | 7 +++++++ yorm/__init__.py | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index da87384..c103740 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ language: python python: - 3.3 - 3.4 +- 3.5 cache: pip diff --git a/CHANGES.md b/CHANGES.md index e5e71a9..3b59d7d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,13 +3,15 @@ ## 0.5 (unreleased) - Renamed `yorm.base` to `yorm.bases`. +- Stopped creating files on instantiation when `auto=False`. +- Now automatically storing on fetch after initial store. -## 0.4.1 (2015-06/19) +## 0.4.1 (2015/06/19) - Fixed attribute loss in non-`dict` when conversion to `dict`. - Now automatically adding missing attributes to mapped objects. -## 0.4 (2015-05-16) +## 0.4 (2015/05/16) - Moved all converters into the `yorm.converters` package. - Renamed `container` to `containers`. @@ -18,15 +20,15 @@ - Removed the context manager in mapped objects. - Fixed automatic mapping of nested attributes. -## 0.3.2 (2015-04-07) +## 0.3.2 (2015/04/07) - Fixed object overwrite when calling `utilities.update`. -## 0.3.1 (2015-04-06) +## 0.3.1 (2015/04/06) - Fixed infinite recursion with properties that rely on other mapped attributes. -## 0.3 (2015-03-10) +## 0.3 (2015/03/10) - Updated mapped objects to only read from the filesystem if there are changes. - Renamed `store` to `sync_object`. @@ -36,24 +38,24 @@ - Added `update_object` and `update_file` to force syncrhonization. - Added `update` to call `update_object` and/or `update_file` as needed. -## 0.2.1 (2015-02-12) +## 0.2.1 (2015/02/12) - Container types now extend their builtin type. - Added `None` extended types with `None` as a default. - Added `AttributeDictionary` with keys available as attributes. - Added `SortedList` that sorts when dumped. -## 0.2 (2014-11-30) +## 0.2 (2014/11/30) - Allowing `map_attr` and `store` to be used together. - Allowing `Dictionary` containers to be used as attributes. - Fixed method resolution order for modified classes. - Added a `yorm.settings.fake` option to bypass the filesystem. -## 0.1.1 (2014-10-20) +## 0.1.1 (2014/10/20) - Fixed typos in examples. -## 0.1 (2014-09-29) +## 0.1 (2014/09/29) - Initial release. diff --git a/setup.py b/setup.py index 31a2a4e..c7b011d 100644 --- a/setup.py +++ b/setup.py @@ -35,9 +35,11 @@ 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Operating System :: OS Independent', + 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Version Control', 'Topic :: Text Editors :: Text Processing', diff --git a/tests/test_all_pm.py b/tests/test_all_pm.py index df5e9a4..2e1d714 100644 --- a/tests/test_all_pm.py +++ b/tests/test_all_pm.py @@ -25,6 +25,7 @@ def __init__(self, key, root): self.key = key self.root = root print(self.key) + self.unmapped = 0 @staticmethod def pm_to_dm(model): @@ -76,6 +77,12 @@ def test_create_dm_from_pm(self): assert config.root == self.root assert config.name == "my_name" + def test_nonmapped_attribute_is_kept(self): + model = ConfigModel('my_key', self.root) + model.unmapped = 42 + yorm.update(model, force=True) + assert 42 == model.unmapped + class TestStore: diff --git a/yorm/__init__.py b/yorm/__init__.py index f2bc52d..18f0c62 100644 --- a/yorm/__init__.py +++ b/yorm/__init__.py @@ -3,7 +3,7 @@ import sys __project__ = 'YORM' -__version__ = '0.5.a2' +__version__ = '0.5rc1' VERSION = __project__ + '-' + __version__