Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
Merge 134c731 into e20304d
Browse files Browse the repository at this point in the history
  • Loading branch information
icemac committed Jul 14, 2023
2 parents e20304d + 134c731 commit c32636e
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 32 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,23 @@ jobs:
matrix:
config:
# [Python version, tox env]
- ["2.7", "py27"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.10", "py310"]
- ["3.11", "py311"]
- ["pypy2", "pypy"]
- ["pypy3", "pypy3"]
- ["3.8", "coverage"]
runs-on: ubuntu-20.04
- ["pypy-3.9", "pypy3"]
- ["3.10", "coverage"]
runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.*', 'tox.ini') }}
Expand All @@ -51,7 +48,7 @@ jobs:
- name: Coverage
if: matrix.config[1] == 'coverage'
run: |
pip install coveralls coverage-python-version
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 3 additions & 5 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
Changes
=======

2.2 (unreleased)
3.0 (unreleased)
----------------

- Add support for Python 3,9, 3.10, 3.11.
- Drop support for Python 2.7, 3.5, 3.6.

- Drop support for Python 3.5.

- Use Github actions as CI.
- Add support for Python 3.9, 3.10, 3.11.


2.1 (2019-09-30)
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def read(*rnames):

setup(
name='gocept.country',
version='2.2.dev0',
version='3.0.dev0',
author='gocept gmbh & co. kg',
author_email='mail@gocept.com',
description='Zope 3 sources for pycountry databases',
Expand All @@ -32,10 +32,7 @@ def read(*rnames):
'License :: OSI Approved',
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand All @@ -51,6 +48,7 @@ def read(*rnames):
packages=find_packages('src'),
include_package_data=True,
package_dir={'': 'src'},
python_requires='>=3.7',
install_requires=['setuptools',
'pycountry >= 16.0',
'zope.i18nmessageid',
Expand Down
2 changes: 1 addition & 1 deletion src/gocept/country/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
iso639msg = zope.i18nmessageid.MessageFactory('iso639')


class Data(object):
class Data:
""" """

def __init__(self, token):
Expand Down
2 changes: 1 addition & 1 deletion src/gocept/country/sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BasicSource(zc.sourcefactory.basic.BasicSourceFactory):
"""A basic source for countries, scripts, languages and currencies."""

def __init__(self, **kw):
super(BasicSource, self).__init__()
super().__init__()
self.filter = kw

def __contains__(self, item):
Expand Down
2 changes: 1 addition & 1 deletion src/gocept/country/tests/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
def test_db__Data____hash____():
"""It implements a hash method.
This is requested for Python 3 as `Data` implements `__eq__`.
This is needed as `Data` implements `__eq__`.
"""
assert hash(Data('foo')) is not None
7 changes: 1 addition & 6 deletions src/gocept/country/tests/test_doctest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import print_function
import doctest
import gocept.country
import zope.app.wsgi.testlayer
Expand All @@ -9,12 +8,8 @@
gocept.country, allowTearDown=True)


def setUp(test):
test.globs['print_function'] = print_function


def test_suite():
suite = doctest.DocFileSuite(
'../README.txt', optionflags=doctest.ELLIPSIS, setUp=setUp)
'../README.txt', optionflags=doctest.ELLIPSIS)
suite.layer = layer
return suite
4 changes: 0 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[tox]
envlist =
flake8,
py27,
py36,
py37,
py38,
py39,
py310,
py311,
pypy,
pypy3,
coverage,
minversion = 3.7
Expand All @@ -28,7 +25,6 @@ deps =
{[testenv]deps}
pytest-cov
coverage
coverage-python-version
commands =
py.test --cov=src --cov-report=html []

Expand Down

0 comments on commit c32636e

Please sign in to comment.