Skip to content

Commit

Permalink
Updates for python 3.11.7 (#65)
Browse files Browse the repository at this point in the history
* test on python 3.11

* use correct requests library

* make pylint happy

* make pylint happy

* keep on standard base image

-----------------------------
  • Loading branch information
leslievandemark authored Jan 23, 2024
1 parent 3ea132a commit d91e747
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
command: |
python3 -m venv /usr/local/share/virtualenvs/tap-mailchimp/
source /usr/local/share/virtualenvs/tap-mailchimp/bin/activate
pip install -U 'pip<19.2' 'setuptools<51.0.0'
pip install -U pip 'setuptools<51.0.0'
pip install .[dev]
pip install coverage
- run:
name: 'pylint'
command: |
source /usr/local/share/virtualenvs/tap-mailchimp/bin/activate
pylint tap_mailchimp --disable 'broad-except,chained-comparison,empty-docstring,fixme,invalid-name,line-too-long,missing-class-docstring,missing-function-docstring,missing-module-docstring,no-else-raise,no-else-return,too-few-public-methods,too-many-arguments,too-many-branches,too-many-lines,too-many-locals,ungrouped-imports,wrong-spelling-in-comment,wrong-spelling-in-docstring,bad-whitespace'
pylint tap_mailchimp --disable 'broad-except,chained-comparison,empty-docstring,fixme,invalid-name,line-too-long,missing-class-docstring,missing-function-docstring,missing-module-docstring,no-else-raise,no-else-return,too-few-public-methods,too-many-arguments,too-many-branches,too-many-lines,too-many-locals,ungrouped-imports,wrong-spelling-in-comment,wrong-spelling-in-docstring,consider-using-f-string,broad-exception-raised,global-variable-not-assigned'
- run:
name: 'JSON Validator'
command: |
Expand All @@ -28,8 +28,8 @@ jobs:
name: 'Unit Tests'
command: |
source /usr/local/share/virtualenvs/tap-mailchimp/bin/activate
nosetests --with-coverage --cover-erase --cover-package=tap_mailchimp --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

## 1.3.0
* Updates to run on python 3.11.7 [#65](https://github.com/singer-io/tap-mailchimp/pull/65)

## 1.2.1
* Fixed Date Window Validation Error [#62](https://github.com/singer-io/tap-mailchimp/pull/62)

Expand Down
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
from setuptools import setup

setup(name='tap-mailchimp',
version='1.2.1',
version='1.3.0',
description='Singer.io tap for extracting data from the Mailchimp API',
author='Stitch',
url='https://singer.io',
classifiers=['Programming Language :: Python :: 3 :: Only'],
py_modules=['tap_mailchimp'],
install_requires=[
'backoff==1.8.0',
'requests==2.20.1',
'singer-python==5.9.0'
'backoff==2.2.1',
'requests==2.31.0',
'singer-python==6.0.0'
],
extras_require= {
'dev': [
'pylint==2.5.3',
'nose==1.3.7',
'pylint==3.0.3',
'nose2',
]
},
entry_points='''
Expand Down
4 changes: 2 additions & 2 deletions tap_mailchimp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def do_discover(client):
LOGGER.info('Testing authentication')
try:
client.get('/lists', params={'count': 1})
except:
raise Exception('Error testing Mailchimp authentication')
except Exception as e:
raise Exception('Error testing Mailchimp authentication') from e

LOGGER.info('Starting discover')
catalog = discover()
Expand Down
2 changes: 1 addition & 1 deletion tap_mailchimp/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_schemas():

for file_name in file_names:
stream_name = file_name[:-5]
with open(os.path.join(schemas_path, file_name)) as data_file:
with open(os.path.join(schemas_path, file_name), encoding='UTF-8') as data_file:
schema = json.load(data_file)

SCHEMAS[stream_name] = schema
Expand Down
2 changes: 1 addition & 1 deletion tap_mailchimp/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def get_batch_info(client, batch_id):
endpoint='get_batch_info')
except HTTPError as e:
if e.response.status_code == 404:
raise BatchExpiredError('Batch {} expired'.format(batch_id))
raise BatchExpiredError('Batch {} expired'.format(batch_id)) from e
raise e

def write_activity_batch_bookmark(state, batch_id):
Expand Down

0 comments on commit d91e747

Please sign in to comment.