Skip to content

Commit

Permalink
Merge branch 'release/0.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
RKrahl committed May 3, 2020
2 parents 3c6b740 + 126a570 commit 732bad9
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 26 deletions.
5 changes: 5 additions & 0 deletions .req
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PyYAML <= 5.2 ; python_version == '3.4'
PyYAML ; python_version > '3.4'
distutils-pytest
pytest >= 3.6.0
pytest-dependency
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ before_install:
- sudo apt-get install -y libgexiv2-dev libyaml-dev python3-gi
virtualenv:
system_site_packages: true
install: pip install -r requirements.txt
install: pip install -r .req
script: make test

# Local Variables:
Expand Down
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
History of changes to photo-tools
=================================

* Version 0.9.3 (2020-05-03)

** Bug fixes and minor changes

+ Issue #46: Fix YAMLLoadWarning.

* Version 0.9.2 (2019-09-01)

** Bug fixes and minor changes
Expand Down
19 changes: 8 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,10 @@ the site-packages directory of your Python installation.
Copyright and License
---------------------

Copyright 2015-2019 Rolf Krahl
Copyright 2015–2020 Rolf Krahl

Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
Licensed under the `Apache License`_, Version 2.0 (the "License"); you
may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -92,12 +89,12 @@ implied. See the License for the specific language governing
permissions and limitations under the License.



.. _PyYAML: http://pyyaml.org/wiki/PyYAML
.. _PyYAML: https://github.com/yaml/pyyaml
.. _gexiv2: https://wiki.gnome.org/Projects/gexiv2
.. _PySide: http://qt-project.org/wiki/PySide
.. _PySide: https://wiki.qt.io/PySide
.. _vignette: https://github.com/hydrargyrum/vignette
.. _pytest: http://pytest.org/
.. _pytest: https://pytest.org/
.. _pytest-dependency: https://github.com/RKrahl/pytest-dependency
.. _distutils-pytest: https://github.com/RKrahl/distutils-pytest
.. _Installing Python Modules: https://docs.python.org/2.7/install/
.. _Installing Python Modules: https://docs.python.org/3/install/
.. _Apache License: https://www.apache.org/licenses/LICENSE-2.0
2 changes: 1 addition & 1 deletion photo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
This package provides tools for managing photo collections.
"""

__version__ = "0.9.2"
__version__ = "0.9.3"
__author__ = "Rolf Krahl <[email protected]>"
2 changes: 1 addition & 1 deletion photo/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def read(self, idxfile=None):
"""
self._get_idxfile(idxfile, os.O_RDWR)
self._lockf()
self.items = [ IdxItem(data=i) for i in yaml.load(self.idxfile) ]
self.items = [ IdxItem(data=i) for i in yaml.safe_load(self.idxfile) ]

def write(self, idxfile=None):
"""Write the index to a file.
Expand Down
2 changes: 1 addition & 1 deletion python3-photo.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%define pkgname photo

Name: python3-%{pkgname}
Version: 0.9.2
Version: 0.9.3
Release: 1
Summary: Tools for managing photo collections
License: Apache-2.0
Expand Down
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
packages = ["photo", "photo.qt"],
scripts = ["photoidx.py", "imageview.py"],
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Development Status :: 4 - Beta",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
],
)

4 changes: 2 additions & 2 deletions tests/test_02_photoidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def test_stats_all(imgdir):
args = ["-d", str(imgdir), "stats"]
callscript("photoidx.py", args, stdout=f)
with fname.open("rt") as f:
stats = yaml.load(f)
stats = yaml.safe_load(f)
assert stats["Count"] == 5
assert stats["Oldest"] == datetime.datetime(2016, 2, 28, 17, 26, 39)
assert stats["Newest"] == datetime.datetime(2016, 3, 9, 10, 7, 48)
Expand Down Expand Up @@ -359,7 +359,7 @@ def test_stats_filtered(imgdir):
args = ["-d", str(imgdir), "stats", "--tags", "Tokyo"]
callscript("photoidx.py", args, stdout=f)
with fname.open("rt") as f:
stats = yaml.load(f)
stats = yaml.safe_load(f)
assert stats["Count"] == 2
assert stats["Oldest"] == datetime.datetime(2016, 2, 28, 17, 26, 39)
assert stats["Newest"] == datetime.datetime(2016, 2, 29, 11, 37, 51)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_05_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_stats_all_yaml(imgdir):
"""The string representation of a Stats object is YAML.
"""
with photo.index.Index(idxfile=imgdir) as idx:
stats = yaml.load(str(Stats(idx)))
stats = yaml.safe_load(str(Stats(idx)))
assert stats["Count"] == 5
assert stats["Selected"] == 2
assert stats["Oldest"] == datetime.datetime(2016, 2, 28, 17, 26, 39)
Expand Down

0 comments on commit 732bad9

Please sign in to comment.