Skip to content

Commit

Permalink
Add support for Python 3.10 + fix lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Apr 11, 2022
1 parent 1828196 commit 409de3c
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ max_line_length = off
# 4 space indentation
indent_size = 4

[*.{yml,zpt,pt,dtml}]
[*.{yml,zpt,pt,dtml,zcml}]
# 2 space indentation
indent_size = 2

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@ on:
jobs:
build:
strategy:
# We want do see all failures:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ubuntu
config:
# [Python version, tox env]
- ["3.8", "lint"]
- ["3.9", "lint"]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["3.8", "coverage"]
- ["3.10", "py310"]
- ["3.9", "coverage"]

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
*.dll
*.egg-info/
*.profraw
*.pyc
*.pyo
*.so
.coverage
.coverage.*
.eggs/
Expand All @@ -26,4 +28,5 @@ lib64
log/
parts/
pyvenv.cfg
testing.log
var/
6 changes: 3 additions & 3 deletions .meta.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[meta]
template = "zope-product"
commit-id = "021e45bb88e412859ebdf00f8153bd658069885c"
commit-id = "9a5db8c650c45a439db06e3a7b2b86318006659d"

[python]
with-appveyor = false
with-pypy = false
with-legacy-python = true
with-docs = false
with-sphinx-doctests = false
with-windows = false
with-future-python = false

[tox]
use-flake8 = true
Expand Down
5 changes: 3 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Change log
==========

1.0.3 (unreleased)
1.1.0 (unreleased)
------------------

- Add support for Python 3.10.

1.0.2 (2021-11-02)
------------------
Expand Down Expand Up @@ -101,7 +102,7 @@ interested in having them merged to public code.
function `lookup_da`. This was created to allow avoiding Zope Acquisition as
a lookup mechanism, and to work around the issue that the underlying
z3c.sqlalchemy `getSAWrapper` function is non-usable when created by the
SAWrapper DA. This is because API consumers have no access to the random
SAWrapper DA. This is because API consumers have no access to the random
internally generated name ('util_id' attribute) under which the utility
is registered...at least not without resorting to Acquisition calls.
- Tested with SQLAlchemy 0.7.6, Zope 2.13, and Python 2.7.9, and SQLite.
Expand Down
23 changes: 23 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Generated from:
https://github.com/zopefoundation/meta/tree/master/config/zope-product
-->
# Contributing to zopefoundation projects

The projects under the zopefoundation GitHub organization are open source and
welcome contributions in different forms:

* bug reports
* code improvements and bug fixes
* documentation improvements
* pull request reviews

For any changes in the repository besides trivial typo fixes you are required
to sign the contributor agreement. See
https://www.zope.dev/developer/becoming-a-committer.html for details.

Please visit our [Developer
Guidelines](https://www.zope.dev/developer/guidelines.html) if you'd like to
contribute code changes and our [guidelines for reporting
bugs](https://www.zope.dev/developer/reporting-bugs.html) if you want to file a
bug report.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
include *.md
include *.rst
include *.txt
include buildout.cfg
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
]

version = '1.0.3.dev0'
version = '1.1.0.dev0'

readme_file = 'README.rst'
changes_file = 'CHANGES.rst'
Expand Down
13 changes: 5 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ envlist =
py37
py38
py39
py310
coverage

[testenv]
skip_install = true
# We need to pin setuptools until we have zc.buildout 3.0.
deps =
setuptools < 52
zc.buildout
zope.testrunner
zc.buildout >= 3.0.0rc3
wheel > 0.37
commands_pre =
py27,py35: {envbindir}/buildout -nc {toxinidir}/buildout4.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
!py27-!py35: {envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
Expand All @@ -33,7 +32,7 @@ allowlist_externals =
mkdir
commands =
isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
- flake8 --format=html {toxinidir}/src {toxinidir}/setup.py
- flake8 {toxinidir}/src {toxinidir}/setup.py
flake8 {toxinidir}/src {toxinidir}/setup.py
check-manifest
check-python-versions
Expand All @@ -42,8 +41,6 @@ deps =
check-python-versions
flake8
isort
# helper to generate HTML reports:
flake8-html
# Useful flake8 plugins that are Python and Plone specific:
flake8-coding
flake8-debugger
Expand Down Expand Up @@ -75,7 +72,7 @@ commands =
[coverage:run]
branch = True
plugins = coverage_python_version
source = src
source = Products.SQLAlchemyDA

[coverage:report]
precision = 2
Expand Down

0 comments on commit 409de3c

Please sign in to comment.