Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 4.0.0 #116

Merged
merged 38 commits into from
Dec 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
de03b5f
Breaking everything into different files
cdgriffith Jan 23, 2019
0745364
Updating travis info
cdgriffith Jan 23, 2019
36faa26
Removing formats in favor of f-strings
cdgriffith Apr 26, 2019
9ba285f
Update to 3.6+ only
cdgriffith Apr 26, 2019
ffcc364
Breakout the tests into their own files
cdgriffith Apr 26, 2019
309a9d1
Add to_toml coverage
cdgriffith Apr 27, 2019
16953de
Remove unneeded safe_key
cdgriffith Apr 27, 2019
8685403
Adding thanks, history and testimonial readme
cdgriffith Apr 27, 2019
90b993c
Small cleanup
cdgriffith Apr 27, 2019
3e60c7a
WIP
cdgriffith Jun 6, 2019
ac5fa6f
Removing wrapt / BoxObject
cdgriffith Jun 8, 2019
1b22856
Docs
cdgriffith Jun 8, 2019
8ef7a61
Adding recent updates to box and separating merge_update into its own…
cdgriffith Oct 1, 2019
b489c53
Adding to_toml for box list
cdgriffith Oct 1, 2019
1007c2e
Removing keyword checking from errors
cdgriffith Oct 1, 2019
fe05ead
Solves issue#59 - Treat None values as non-existing keys for default_…
haruntuncay Oct 22, 2019
eec432c
Adding `+` support for Box
cdgriffith Oct 22, 2019
8ef5b03
Adding new exception types
cdgriffith Oct 22, 2019
3f17cf6
Fix delete to be able to access converted and camel killed keys (than…
cdgriffith Nov 19, 2019
3ba4092
Better delete behavior and tests for addition of boxes
cdgriffith Nov 19, 2019
92941c3
Adding ability to recast certain fields (thanks to Steven McGrath)
cdgriffith Nov 19, 2019
67cc392
Adding 3.4.6 changes
cdgriffith Nov 21, 2019
6e25662
Fixing dots to work with setting and deleting attributes
cdgriffith Dec 17, 2019
f50e88f
Removing pypy because of pickling issue, adding nightly
cdgriffith Dec 17, 2019
4117bf2
Adding toml tests
cdgriffith Dec 17, 2019
d6731a8
Adding box_from_file
cdgriffith Dec 17, 2019
36d906d
Test updates
cdgriffith Dec 17, 2019
d96d220
Documentation updates
cdgriffith Dec 18, 2019
13daf0f
Rebase fixes
cdgriffith Dec 18, 2019
14caef8
flake8 fixes
cdgriffith Dec 18, 2019
f6505f0
flake8 fixes and some type hinting
cdgriffith Dec 18, 2019
6d8e994
* Adding to_csv and from_csv capability for BoxList objects (thanks t…
cdgriffith Dec 18, 2019
c5c3cbb
Adding docs for Box recast, dots and ignore conversions
cdgriffith Dec 24, 2019
6fec4c3
Test updates
cdgriffith Dec 24, 2019
f8616c3
PEP8 updates
cdgriffith Dec 24, 2019
12bf52d
Updating docs
cdgriffith Dec 24, 2019
ec09916
Removing external data source that no longer exists
cdgriffith Dec 24, 2019
607517b
Fixing documentation
cdgriffith Dec 24, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ exclude_lines =
if item == '__box_config'
raise BoxError\('_box_config key must exist
raise err
if 'box_class' in self.__dict__:
raise BoxError\(f'File
except OSError
raise BoxError\(f'{filename}
item._box_config['__box_heritage'] = \(\)
except AttributeError as err
raise BoxKeyError(err)
11 changes: 11 additions & 0 deletions .pep8speaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
scanner:
diff_only: True
linter: flake8

flake8:
max-line-length: 120 # Default is 79 in PEP 8
ignore: # Errors and warnings to ignore
- F401
- F403
- F405
- W503
13 changes: 4 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
sudo: required
dist: trusty
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
matrix:
include:
- python: "3.7"
dist: xenial
sudo: true
- "3.7"
- "3.8"
- "nightly"
install:
- pip install -r requirements.txt
- pip install -r requirements-test.txt
- pip install coveralls
script: PYTHONPATH=. py.test --cov=box test/
Expand Down
10 changes: 8 additions & 2 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ Code contributions:
- (sdementen)
- Brandon Gomes (bhgomes)
- Stretch (str3tch)
- (jandelgado)
- (pwwang)
- Harun Tuncay (haruntuncay)
- Jeremiah Lowin (jlowin)
- (jandelgado)

Suggestions and bug reporting:

Expand Down Expand Up @@ -46,6 +48,10 @@ Suggestions and bug reporting:
- (deluxghost)
- Nikolay Stanishev (nikolaystanishev)
- Craig Quiter (crizCraig)
- Jeremiah Lowin (jlowin)
- Michael Stella (alertedsnake)
- (FunkyLoveCow)
- Kevin Cross (kevinhcross)
- (Patrock)
- Tim Gates (timgates42)
- (iordanivanov)
- Steven McGrath (SteveMcGrath)
65 changes: 42 additions & 23 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,94 +1,113 @@
Changelog
---------
=========

Version 4.0.0
-------------

* Adding support for retrieving items via dot notation in keys
* Adding `box_from_file` helper function
* Adding merge_update that acts like previous Box magic update
* Adding support to `+` boxes together
* Adding default_box now can support expanding on `None` placeholders (thanks to Harun Tuncay and Jeremiah Lowin)
* Adding ability to recast specified fields (thanks to Steven McGrath)
* Adding to_csv and from_csv capability for BoxList objects (thanks to Jiuli Gao)
* Changing layout of project to be more object specific
* Changing update to act like normal dict update
* Changing to 120 line character limit
* Changing how `safe_attr` handles unsafe characters
* Changing all exceptions to be bases of BoxError so can always be caught with that base exception
* Changing delete to also access converted keys (thanks to iordanivanov)
* Removing `ordered_box` as Python 3.6+ is ordered by default
* Removing `BoxObject` in favor of it being another module

Version 3.4.6
~~~~~~~~~~~~~
-------------

* Fixing allowing frozen boxes to be deep copyable (thanks to jandelgado)

Version 3.4.5
~~~~~~~~~~~~~
-------------

* Fixing update does not convert new sub dictionaries or lists (thanks to Michael Stella)
* Changing update to work as it used to with sub merging until major release

Version 3.4.4
~~~~~~~~~~~~~
-------------

* Fixing pop not properly resetting box_heritage (thanks to Jeremiah Lowin)

Version 3.4.3
~~~~~~~~~~~~~
-------------

* Fixing propagation of box options when adding a new list via setdefault (thanks to Stretch)
* Fixing update does not keep box_intact_types (thanks to pwwang)
* Fixing update to operate the same way as a normal dictionary (thanks to Craig Quiter)
* Fixing deepcopy not copying box options (thanks to Nikolay Stanishev)

Version 3.4.2
~~~~~~~~~~~~~
-------------

* Adding license, changes and authors files to source distribution

Version 3.4.1
~~~~~~~~~~~~~
-------------

* Fixing copy of inherited classes (thanks to pwwang)
* Fixing `get` when used with default_box

Version 3.4.0
~~~~~~~~~~~~~
-------------

* Adding `box_intact_types` that allows preservation of selected object types (thanks to pwwang)
* Adding limitations section to readme

Version 3.3.0
~~~~~~~~~~~~~
-------------

* Adding `BoxObject` (thanks to Brandon Gomes)

Version 3.2.4
~~~~~~~~~~~~~
-------------

* Fixing recursion issue #68 when using setdefault (thanks to sdementen)
* Fixing ordered_box would make 'ordered_box_values' internal helper as key in sub boxes

Version 3.2.3
~~~~~~~~~~~~~
-------------

* Fixing pickling with default box (thanks to sdementen)

Version 3.2.2
~~~~~~~~~~~~~
-------------

* Adding hash abilities to new frozen BoxList
* Fixing hashing returned unpredictable values (thanks to cebaa)
* Fixing update to not handle protected words correctly (thanks to deluxghost)
* Removing non-collection support for mapping and callable identification

Version 3.2.1
~~~~~~~~~~~~~
-------------

* Fixing pickling on python 3.7 (thanks to Martijn Pieters)
* Fixing rumel loader error (thanks to richieadler)
* Fixing frozen_box does not freeze the outermost BoxList (thanks to V.Anh Tran)

Version 3.2.0
~~~~~~~~~~~~~
-------------

* Adding `ordered_box` option to keep key order based on insertion (thanks to pwwang)
* Adding custom `__iter__`, `__revered__`, `pop`, `popitems`
* Fixing ordering of camel_case_killer vs default_box (thanks to Matan Rosenberg)
* Fixing non string keys not being supported correctly (thanks to Matt Wisniewski)

Version 3.1.1
~~~~~~~~~~~~~
-------------

* Fixing `__contains__` (thanks to Jiang Chen)
* Fixing `get` could return non box objects

Version 3.1.0
~~~~~~~~~~~~~
-------------

* Adding `copy` and `deepcopy` support that with return a Box object
* Adding support for customizable safe attr replacement
Expand All @@ -98,14 +117,14 @@ Version 3.1.0
* Fixing pickling

Version 3.0.1
~~~~~~~~~~~~~
-------------

* Fixing first level recursion errors
* Fixing spelling mistakes (thanks to John Benediktsson)
* Fixing that list insert of lists did not use the original list but create an empty one

Version 3.0.0
~~~~~~~~~~~~~
-------------

* Adding default object abilities with `default_box` and `default_box_attr` kwargs
* Adding `from_json` and `from_yaml` functions to both `Box` and `BoxList`
Expand All @@ -124,29 +143,29 @@ Version 3.0.0
* Removing default indent for `to_json`

Version 2.2.0
~~~~~~~~~~~~~
-------------

* Adding support for `ruamel.yaml` (Thanks to Alexandre Decan)
* Adding Contributing and Authors files

Version 2.1.0
~~~~~~~~~~~~~
-------------

* Adding `.update` and `.set_default` functionality
* Adding `dir` support

Version 2.0.0
~~~~~~~~~~~~~
-------------

* Adding `BoxList` to allow for `Box`es to be recursively added to lists as well
* Adding `BoxList` to allow for any `Box` to be recursively added to lists as well
* Adding `to_json` and `to_yaml` functions
* Changing `Box` original functionality to `LightBox`, `Box` now searches lists
* Changing `Box` callable to return keys, not values, and they are sorted
* Removing `tree_view` as near same can be seen with YAML


Version 1.0.0
~~~~~~~~~~~~~
-------------

* Initial release, copy from `reusables.Namespace`
* Original creation, 2\13\2014
Loading