Skip to content

Commit

Permalink
add python 3.10 compatibility (#19)
Browse files Browse the repository at this point in the history
* fix deprecation warning

* moved circle ci workflow and added jobs

* added changelog and version bump

* updated yml daily build config

* updated build job

* updated build step

* updatec context

* updatec context

---------

Co-authored-by: Tim Shih <[email protected]>
  • Loading branch information
somethingmorerelevant and tzing authored Jan 5, 2024
1 parent c452563 commit 34e4052
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 24 deletions.
206 changes: 206 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
version: 2.1

jobs:
build_test_v3_4:
docker:
- image: circleci/python:3.4
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install 'pip<19.2' 'setuptools<51.0.0'
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_5:
docker:
- image: cimg/python:3.5
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install 'pip<19.2' 'setuptools<51.0.0'
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_6:
docker:
- image: cimg/python:3.6
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install 'pip<19.2' 'setuptools<51.0.0'
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_7:
docker:
- image: cimg/python:3.7
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install 'pip<19.2' 'setuptools<51.0.0'
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_8:
docker:
- image: cimg/python:3.8
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install 'pip<19.2' 'setuptools<51.0.0'
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_9:
docker:
- image: cimg/python:3.9
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install 'pip<19.2' 'setuptools<51.0.0'
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build:
docker:
- image: cimg/python:3.10
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install pip setuptools
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_11:
docker:
- image: cimg/python:3.11
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install pip setuptools
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
build_test_v3_12:
docker:
- image: cimg/python:3.12
steps:
- checkout
- run:
name: 'Setup virtual env'
command: |
python3 -m venv stitch-client
source stitch-client/bin/activate
pip install pip setuptools
pip install .
- run:
name: 'run tests'
command: |
source stitch-client/bin/activate
python -m unittest
workflows:
version: 2
commit:
jobs:
- build:
context: circleci-user
- build_test_v3_4:
context: circleci-user
- build_test_v3_5:
context: circleci-user
- build_test_v3_6:
context: circleci-user
- build_test_v3_7:
context: circleci-user
- build_test_v3_8:
context: circleci-user
- build_test_v3_9:
context: circleci-user
- build_test_v3_11:
context: circleci-user
- build_test_v3_12:
context: circleci-user
build_daily:
triggers:
- schedule:
cron: "0 13 * * *"
filters:
branches:
only:
- master
jobs:
- build:
context: circleci-user
- build_test_v3_4:
context: circleci-user
- build_test_v3_5:
context: circleci-user
- build_test_v3_6:
context: circleci-user
- build_test_v3_7:
context: circleci-user
- build_test_v3_8:
context: circleci-user
- build_test_v3_9:
context: circleci-user
- build_test_v3_11:
context: circleci-user
- build_test_v3_12:
context: circleci-user
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## 1.1.0
* Removed deprecations failures for python 3.10+[#19](https://github.com/stitchdata/python-stitch-client/pull/19)

## 1.0.1
* Relaxed Requests dependency verison[#15](https://github.com/stitchdata/python-stitch-client/pull/15)

## 1.0.0
* Add region kwarg to Client, Update Readme [#12](https://github.com/stitchdata/python-stitch-client/pull/12)

19 changes: 0 additions & 19 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="stitchclient",
version="1.0.1",
version="1.1.0",
description="A Stitch API client for Python",
author="Stitch",
author_email="[email protected]",
Expand Down
4 changes: 2 additions & 2 deletions transit/class_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
## limitations under the License.

# Hash that looks up class keys with inheritance.
import collections
import collections.abc


class ClassDict(collections.MutableMapping):
class ClassDict(collections.abc.MutableMapping):
"""A dictionary that looks up class/type keys with inheritance."""

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions transit/transit_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
## See the License for the specific language governing permissions and
## limitations under the License.

from collections import Mapping, Hashable
from transit.pyversion import string_types, unicode_f, unicode_type
from collections.abc import Mapping, Hashable
from transit.pyversion import string_types


class Named(object):
Expand Down

0 comments on commit 34e4052

Please sign in to comment.