From 728de69931af7fc4893f65c772700e4dc7a638ec Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Fri, 12 Dec 2025 12:46:26 +0000 Subject: [PATCH 1/5] Remove .travis.yml --- .travis.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b2d81ce..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Travis CI YAML file. See -# http://docs.travis-ci.com/user/getting-started/#Step-three%3A-Add-.travis.yml-file-to-your-repository - -language: python -python: - - "2.7" - - "3.4" - - "3.5" -# CFLAGS=-O0 speeds up lxml install. See -# https://github.com/edx/diff-cover/issues/92 -install: CFLAGS=-O0 pip install -e . lxml -# command to run tests, e.g. python setup.py test -script: nosetests --exe -matrix: - allow_failures: - - env: REQFILE=requirements.txt - From 2001bbd6e108aa27e6651223c81b5556ce155cf8 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Fri, 12 Dec 2025 12:49:28 +0000 Subject: [PATCH 2/5] Add CI workflow --- .github/workflows/ci-build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci-build.yml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000..ee925cf --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,34 @@ +name: CI +on: + push: + branches: + - master + pull_request: + +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + strategy: + matrix: + python: ['3.9'] + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python }} + + - name: Install extra packages for tests + run: | + pip install wheel nose lxml + + - name: Install package + run: | + python setup.py install + + - name: Run tests + run: nosetests --exe From 800b9689444b394af9a30f83f8e5395610bfda6e Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Fri, 12 Dec 2025 12:49:43 +0000 Subject: [PATCH 3/5] Pin SQLAlchemy version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3e391ba..edd957c 100755 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def has_external_dependency(name): try: from setuptools import setup config['install_requires'] = ['requests', 'six', - 'sqlalchemy', 'alembic'], + 'sqlalchemy==1.3.0', 'alembic==1.14.0'], except ImportError: pass From 99308990aff1f780d97faf7f8c199a19de85c0d9 Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Fri, 12 Dec 2025 13:01:45 +0000 Subject: [PATCH 4/5] Update versions of Python in `setup.py` --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index edd957c..b59629b 100755 --- a/setup.py +++ b/setup.py @@ -32,9 +32,7 @@ def has_external_dependency(name): 'Intended Audience :: Science/Research', 'License :: OSI Approved :: ' 'GNU General Public License v3 or later (GPLv3+)', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.9', 'Programming Language :: SQL', 'Topic :: Database :: Front-Ends', ], From 3f656c480c5fae7bf7b914947a2ed5e90ee7783b Mon Sep 17 00:00:00 2001 From: Steven Maude Date: Fri, 12 Dec 2025 13:23:48 +0000 Subject: [PATCH 5/5] Update test values Fixes #105. At some point, the SQLite behaviour must have changed somewhere. This still checks that there are no unique keys. --- tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.py b/tests.py index 3d47692..de0beb1 100755 --- a/tests.py +++ b/tests.py @@ -137,7 +137,7 @@ class TestUniqueKeys(SaveAndSelect): def test_empty(self): scraperwiki.sql.save([], {u"foo\xde": 3}, table_name=u"Chico\xcc") observed = scraperwiki.sql.execute(u'PRAGMA index_list(Chico\xcc)') - self.assertEqual(observed, {u'data': [], u'keys': []}) + self.assertEqual(observed, {u'data': [], u'keys': ['seq', 'name', 'unique', 'origin', 'partial']}) def test_two(self): scraperwiki.sql.save([u'foo\xdc', u'bar\xcd'], {u'foo\xdc': 3, u'bar\xcd': 9}, u'Harpo\xbb')