From fc5194871c10bd88fbf8b6f54a5a4e7c137928d6 Mon Sep 17 00:00:00 2001 From: Jasha <8935917+Jasha10@users.noreply.github.com> Date: Tue, 17 May 2022 12:49:54 -0500 Subject: [PATCH] OmegaConf 2.2.1 release --- NEWS.md | 33 +++++++++++++++++++++++++++++++++ news/144.feature | 1 - news/427.feature | 1 - news/460.feature | 1 - news/547.api_change | 1 - news/573.api_change | 1 - news/608.api_change | 1 - news/698.api_change | 1 - news/720.feature | 1 - news/736.feature | 1 - news/743.api_change | 1 - news/769.feature | 1 - news/789.bugfix | 1 - news/799.feature | 1 - news/831.bugfix | 1 - news/844.feature | 1 - news/848.api_change | 1 - news/849.feature | 1 - news/97.feature | 1 - omegaconf/version.py | 2 +- 20 files changed, 34 insertions(+), 19 deletions(-) delete mode 100644 news/144.feature delete mode 100644 news/427.feature delete mode 100644 news/460.feature delete mode 100644 news/547.api_change delete mode 100644 news/573.api_change delete mode 100644 news/608.api_change delete mode 100644 news/698.api_change delete mode 100644 news/720.feature delete mode 100644 news/736.feature delete mode 100644 news/743.api_change delete mode 100644 news/769.feature delete mode 100644 news/789.bugfix delete mode 100644 news/799.feature delete mode 100644 news/831.bugfix delete mode 100644 news/844.feature delete mode 100644 news/848.api_change delete mode 100644 news/849.feature delete mode 100644 news/97.feature diff --git a/NEWS.md b/NEWS.md index 6a1234acb..2d5976321 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,36 @@ +## 2.2.1 (2022-05-17) +OmegaConf 2.2 is a major release. The most significant area of improvement in +2.2 is support for more flexible type hints in structured configs. In addition, +OmegaConf now natively supports two new primitive types, `bytes` and `pathlib.Path`. + +### Features + +- Support unions of primitive types in structured config type hints (`typing.Union`) ([#144](https://github.com/omry/omegaconf/issues/144)) +- Support nested container type hints in structured configs, e.g. dict-of-dict and list-of-list ([#427](https://github.com/omry/omegaconf/issues/427)) +- Improve support for optional element types in structured config container type hints (`typing.Optional`) ([#460](https://github.com/omry/omegaconf/issues/460)) +- Add support for `bytes`-typed values ([#844](https://github.com/omry/omegaconf/issues/844)) +- Add support for `pathlib.Path`-typed values ([#97](https://github.com/omry/omegaconf/issues/97)) +- `ListConfig` now implements slice assignment ([#736](https://github.com/omry/omegaconf/issues/736)) +- Enable adding a `ListConfig` to a `list` via the `ListConfig.__radd__` dunder method ([#849](https://github.com/omry/omegaconf/issues/849)) +- Add `OmegaConf.missing_keys()`, a method that returns the missing keys in a config object ([#720](https://github.com/omry/omegaconf/issues/720)) +- Add `OmegaConf.clear_resolver()`, a method to remove interpolation resolvers by name ([#769](https://github.com/omry/omegaconf/issues/769)) +- Enable the use of a pipe symbol `|` in unquoted strings in OmegaConf interpolations ([#799](https://github.com/omry/omegaconf/issues/799)) + +### Bug Fixes + +- `OmegaConf.to_object` now works properly with structured configs that have `init=False` fields ([#789](https://github.com/omry/omegaconf/issues/789)) +- Fix bugs related to creation of structured configs from dataclasses having fields with a default_factory ([#831](https://github.com/omry/omegaconf/issues/831)) + +### API changes and deprecations + +- Removed support for `OmegaConf.is_none(cfg, "key")`. Please use `cfg.key is None` instead. ([#547](https://github.com/omry/omegaconf/issues/547)) +- Removed support for `${env}` interpolations. `${oc.env}` should be used instead. ([#573](https://github.com/omry/omegaconf/issues/573)) +- Removed `OmegaConf.get_resolver()`. Please use `OmegaConf.has_resolver()` instead. ([#608](https://github.com/omry/omegaconf/issues/608)) +- Removed support for `OmegaConf.is_optional()`. ([#698](https://github.com/omry/omegaconf/issues/698)) +- Improved error message when assigning an invalid value to int or float config nodes ([#743](https://github.com/omry/omegaconf/issues/743)) +- To conform with the `MutableMapping` API, the `DictConfig.items` method now returns an object of type `ItemsView`, and `DictConfig.keys` will now always return a `KeysView` ([#848](https://github.com/omry/omegaconf/issues/848)) + + ## 2.1.1 (2021-08-17) ### Features diff --git a/news/144.feature b/news/144.feature deleted file mode 100644 index c1a17db8a..000000000 --- a/news/144.feature +++ /dev/null @@ -1 +0,0 @@ -Support unions of primitive types in structured config type hints (`typing.Union`) diff --git a/news/427.feature b/news/427.feature deleted file mode 100644 index 77225b172..000000000 --- a/news/427.feature +++ /dev/null @@ -1 +0,0 @@ -Support nested container type hints in structured configs, e.g. dict-of-dict and list-of-list. diff --git a/news/460.feature b/news/460.feature deleted file mode 100644 index 054982481..000000000 --- a/news/460.feature +++ /dev/null @@ -1 +0,0 @@ -Improve support for Optional element types in structured config container type hints. diff --git a/news/547.api_change b/news/547.api_change deleted file mode 100644 index 00ded5ee8..000000000 --- a/news/547.api_change +++ /dev/null @@ -1 +0,0 @@ -Removed support for `OmegaConf.is_none(cfg, "key")`. Please use `cfg.key is None` instead. diff --git a/news/573.api_change b/news/573.api_change deleted file mode 100644 index 3526849e3..000000000 --- a/news/573.api_change +++ /dev/null @@ -1 +0,0 @@ -Removed support for `${env}` interpolations. `${oc.env}` should be used instead. diff --git a/news/608.api_change b/news/608.api_change deleted file mode 100644 index f355f25d2..000000000 --- a/news/608.api_change +++ /dev/null @@ -1 +0,0 @@ -Removed `OmegaConf.get_resolver()`. Please use `OmegaConf.has_resolver()` instead. diff --git a/news/698.api_change b/news/698.api_change deleted file mode 100644 index 3a13562b1..000000000 --- a/news/698.api_change +++ /dev/null @@ -1 +0,0 @@ -Removed support for `OmegaConf.is_optional()`. diff --git a/news/720.feature b/news/720.feature deleted file mode 100644 index 39dd70a4d..000000000 --- a/news/720.feature +++ /dev/null @@ -1 +0,0 @@ -New `OmegaConf.missing_keys` method that returns the missing keys in a config object diff --git a/news/736.feature b/news/736.feature deleted file mode 100644 index c39472548..000000000 --- a/news/736.feature +++ /dev/null @@ -1 +0,0 @@ -ListConfig now implements slice assignment. diff --git a/news/743.api_change b/news/743.api_change deleted file mode 100644 index bfd494107..000000000 --- a/news/743.api_change +++ /dev/null @@ -1 +0,0 @@ -Improved error message when assigning an invalid value to int or float config nodes diff --git a/news/769.feature b/news/769.feature deleted file mode 100644 index 2087aaf96..000000000 --- a/news/769.feature +++ /dev/null @@ -1 +0,0 @@ -Add OmegaConf.clear_resolver(), a method to remove interpolation resolvers by name diff --git a/news/789.bugfix b/news/789.bugfix deleted file mode 100644 index 2f20ac81d..000000000 --- a/news/789.bugfix +++ /dev/null @@ -1 +0,0 @@ -`OmegaConf.to_object` now works properly with structured configs that have `init=False` fields diff --git a/news/799.feature b/news/799.feature deleted file mode 100644 index 6494fef8c..000000000 --- a/news/799.feature +++ /dev/null @@ -1 +0,0 @@ -Enable the use of the pipe symbol `|` in unquoted strings when parsing interpolations. diff --git a/news/831.bugfix b/news/831.bugfix deleted file mode 100644 index e01b68f64..000000000 --- a/news/831.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix bugs related to creation of structured configs from dataclasses having fields with a default_factory diff --git a/news/844.feature b/news/844.feature deleted file mode 100644 index 242d3097d..000000000 --- a/news/844.feature +++ /dev/null @@ -1 +0,0 @@ -Add support for binary data via python's `bytes` type. diff --git a/news/848.api_change b/news/848.api_change deleted file mode 100644 index 516347013..000000000 --- a/news/848.api_change +++ /dev/null @@ -1 +0,0 @@ -To conform with the `MutableMapping` API, The `DictConfig.items` method now returns an object of type `ItemsView`, and `DictConfig.keys` will now always return a `KeysView`. diff --git a/news/849.feature b/news/849.feature deleted file mode 100644 index 02eaa2fdd..000000000 --- a/news/849.feature +++ /dev/null @@ -1 +0,0 @@ -Enable adding a listconfig to a list via the `ListConfig.__radd__` dunder method. diff --git a/news/97.feature b/news/97.feature deleted file mode 100644 index 332df1a53..000000000 --- a/news/97.feature +++ /dev/null @@ -1 +0,0 @@ -Add support for `pathlib.Path`-typed values. diff --git a/omegaconf/version.py b/omegaconf/version.py index 7aa1583e5..da2085fe0 100644 --- a/omegaconf/version.py +++ b/omegaconf/version.py @@ -1,6 +1,6 @@ import sys # pragma: no cover -__version__ = "2.2.0.dev6" +__version__ = "2.2.1" msg = """OmegaConf 2.0 and above is compatible with Python 3.6 and newer. You have the following options: