Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish

on:
release:
types: [published]

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Build package
run: |
python -m pip install --upgrade pip build
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [master]
pull_request:

jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
# the range of versions covered is much less than those claimed to be supported, just
# because it would take getting hands on for CI to cover the old versions that Travis
# previously covered, back when those versions were contemporary.
python-version: ["3.7", "3.13", "3.14-dev"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install . pytest pytest-cov
- name: Run tests
run: |
pytest -vv --cov=jsonstore
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

16 changes: 4 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
|PyPi Package| |Build Status| |Codacy Rating| |Coverage Report|
|PyPi Package|

jsonstore
=========
Expand All @@ -12,11 +12,8 @@ flexible than the
`configparser <https://docs.python.org/3/library/configparser.html>`__
module which is included with Python.

This works is tested and working on Python 2.7+ and Python 3.3+. It will
not work on 2.6 or lower, but is expected to work on 3.0-3.2. The tests
do not work in 3.2.6 due to
`mistreating <https://travis-ci.org/Code0x58/python-jsonstore/jobs/198150401>`__
the 💩 when parsing the test code. This is also tested on pypy and pypy3.
This works is tested and working on Python 2.7 and Python 3.6+. It will
not work on 2.6 or lower. The tests are also executed on PyPy.

Examples
--------
Expand Down Expand Up @@ -110,11 +107,6 @@ file until all of the transactions have been closed.
# here we see the value that was saved previously
assert store.value == 1

.. |Build Status| image:: https://travis-ci.org/Code0x58/python-jsonstore.svg?branch=master
:target: https://travis-ci.org/Code0x58/python-jsonstore
.. |Codacy Rating| image:: https://api.codacy.com/project/badge/Grade/37ea488773444de59469a3775be83faf
:target: https://www.codacy.com/app/evilumbrella-github/python-jsonstore?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Code0x58/python-jsonstore&amp;utm_campaign=Badge_Grade

.. |PyPi Package| image:: https://badge.fury.io/py/python-jsonstore.svg
:target: https://pypi.org/project/python-jsonstore/
.. |Coverage Report| image:: https://codecov.io/gh/Code0x58/python-jsonstore/branch/master/graph/badge.svg
:target: https://codecov.io/gh/Code0x58/python-jsonstore
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.13
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Database
Expand Down
3 changes: 2 additions & 1 deletion test_jsonstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ def test_del(self):
del self.store["list", 1]

self.store.dict = {}
with self.assertRaises(TypeError):
# somewhere after python 3.9 this went from a TypeError to a KeyError
with self.assertRaises((TypeError, KeyError)):
del self.store["dict", slice("a")]

def test_context_and_deserialisation(self):
Expand Down
Loading