Skip to content

Commit

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

* make pylint happy, use correct test directory

* changelog [skip-ci]

* keep on standard base image [skip ci]

-----------------------------
  • Loading branch information
leslievandemark authored Jan 24, 2024
1 parent 4d8bde1 commit d1f5227
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ jobs:
name: 'pylint'
command: |
source /usr/local/share/virtualenvs/tap-zendesk/bin/activate
pylint tap_zendesk -d missing-docstring,invalid-name,line-too-long,too-many-locals,too-few-public-methods,fixme,stop-iteration-return,too-many-branches,useless-import-alias,no-else-return,logging-not-lazy,redefined-builtin
pylint tap_zendesk -d missing-docstring,invalid-name,line-too-long,too-many-locals,too-few-public-methods,fixme,stop-iteration-return,too-many-branches,useless-import-alias,no-else-return,logging-not-lazy,redefined-builtin,consider-using-f-string,consider-using-dict-items,arguments-renamed
- run:
name: 'unittests'
when: always
command: |
source /usr/local/share/virtualenvs/tap-zendesk/bin/activate
nosetests --with-coverage --cover-erase --cover-package=tap_zendesk --cover-html-dir=htmlcov test/unittests
coverage html
pip install nose2 parameterized nose2[coverage_plugin]>=0.6.5
nose2 --with-coverage -v -s test/unittests
- store_test_results:
path: test_output/report.xml
- store_artifacts:
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.4.0
* Upgrades to run on python 3.11.7 [#146](https://github.com/singer-io/tap-zendesk/pull/146)

## 2.3.1
* Dependabot update [#129](https://github.com/singer-io/tap-zendesk/pull/129)
## 2.3.0
Expand Down Expand Up @@ -158,4 +161,4 @@
* Misc bug fixes

## 0.0.1
* Initial end-to-end with most streams, bookmarking, and discovery
* Initial end-to-end with most streams, bookmarking, and discovery
13 changes: 6 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
from setuptools import setup

setup(name='tap-zendesk',
version='2.3.0',
version='2.4.0',
description='Singer.io tap for extracting data from the Zendesk API',
author='Stitch',
url='https://singer.io',
classifiers=['Programming Language :: Python :: 3 :: Only'],
py_modules=['tap_zendesk'],
install_requires=[
'singer-python==5.12.2',
'singer-python==6.0.0',
'zenpy==2.0.24',
'backoff==1.8.0',
'backoff==2.2.1',
'requests==2.31.0',
],
extras_require={
'dev': [
'ipdb',
],
'test': [
'pylint==2.8.3',
'nose',
'nose-watch',
'pylint==3.0.3',
'nose2',
'pytest'
]
},
Expand All @@ -32,4 +31,4 @@
''',
packages=['tap_zendesk'],
include_package_data=True,
)
)
4 changes: 2 additions & 2 deletions tap_zendesk/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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[ref_sub_path + '/' + shared_file] = json.load(data_file)

return shared_schema_refs
Expand All @@ -39,7 +39,7 @@ def discover_streams(client, config):
# If stream does not have read permission then append that stream name to list and at the end of all streams
# raise forbidden error with proper message containing stream names.
stream.check_access()
except ZendeskForbiddenError as e:
except ZendeskForbiddenError:
error_list.append(stream.name) # Append stream name to the error_list
except zenpy.lib.exception.APIException as e:
args0 = json.loads(e.args[0])
Expand Down
4 changes: 2 additions & 2 deletions tap_zendesk/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ def update_bookmark(self, state, value):

def load_schema(self):
schema_file = "schemas/{}.json".format(self.name)
with open(get_abs_path(schema_file)) as f:
with open(get_abs_path(schema_file), encoding='UTF-8') as f:
schema = json.load(f)
return self._add_custom_fields(schema)

def _add_custom_fields(self, schema): # pylint: disable=no-self-use
def _add_custom_fields(self, schema):
return schema

def load_metadata(self):
Expand Down
2 changes: 1 addition & 1 deletion tap_zendesk/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from zenpy.lib.proxy import ProxyList

import singer
import singer.metrics as metrics
from singer import metrics
from singer import metadata
from singer import Transformer

Expand Down

0 comments on commit d1f5227

Please sign in to comment.