Skip to content

Commit

Permalink
update to python 3.11 (#193)
Browse files Browse the repository at this point in the history
* test one python 3.11

* make pylint happy

* changelog

* keep on standard base image [skip ci]

-----------------------------
  • Loading branch information
leslievandemark authored Jan 23, 2024
1 parent 657c685 commit ab6b0ff
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,8 @@ jobs:
name: 'Unit Tests'
command: |
source /usr/local/share/virtualenvs/tap-stripe/bin/activate
pip install coverage parameterized
nosetests --with-coverage --cover-erase --cover-package=tap_stripe --cover-html-dir=htmlcov tests/unittests
coverage html
pip install nose2 parameterized nose2[coverage_plugin]>=0.6.5
nose2 --with-coverage -v -s tests/unittests
- store_test_results:
path: test_output/report.xml
- store_artifacts:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 3.1.0
* Upgrades to run on python 3.11.7 [#193](https://github.com/singer-io/tap-stripe/pull/193)

## 3.0.0
* Upgraded SDK and API version [#181](https://github.com/singer-io/tap-stripe/pull/181)
* Schema changes
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@

setup(
name="tap-stripe",
version="3.0.0",
version="3.1.0",
description="Singer.io tap for extracting data",
author="Stitch",
url="http://singer.io",
classifiers=["Programming Language :: Python :: 3 :: Only"],
py_modules=["tap_stripe"],
install_requires=[
"singer-python==5.5.1",
"singer-python==6.0.0",
"stripe==5.5.0",
],
extras_require={
'test': [
'pylint==2.7.2',
'nose==1.3.7',
'pylint',
'nose2',
'coverage'
],
'dev': [
'ipdb',
'pylint==2.7.2',
'pylint',
'astroid==2.5.1',
'nose==1.3.7'
'nose2',
]
},
entry_points="""
Expand Down
7 changes: 3 additions & 4 deletions tap_stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def load_shared_schema_refs():

shared_schema_refs = {}
for shared_file in shared_file_names:
with open(os.path.join(shared_schemas_path, shared_file)) as data_file:
with open(os.path.join(shared_schemas_path, shared_file), encoding='UTF-8') as data_file:
shared_schema_refs['shared/' + shared_file] = json.load(data_file)

return shared_schema_refs
Expand All @@ -334,7 +334,7 @@ def load_schemas():
for filename in files:
path = get_abs_path('schemas') + '/' + filename
file_raw = filename.replace('.json', '')
with open(path) as file:
with open(path, encoding='UTF-8') as file:
schemas[file_raw] = {'path': filename, 'schema': json.load(file)}

return schemas
Expand Down Expand Up @@ -669,8 +669,7 @@ def sync_stream(stream_name, is_sub_stream=False):
while start_window < end_time:
stop_window = dt_to_epoch(epoch_to_dt(start_window) + timedelta(days=window_size))
# cut off the last window at the end time
if stop_window > end_time:
stop_window = end_time
stop_window = min(stop_window, end_time)
for stream_obj in paginate(
STREAM_SDK_OBJECTS[stream_name]['sdk_object'],
filter_key,
Expand Down

0 comments on commit ab6b0ff

Please sign in to comment.