From 1460acff30ec7fc5ef367e4c08b4b192bc862a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Balcerek?= Date: Thu, 18 Jan 2024 21:21:33 +0100 Subject: [PATCH 1/8] Bump googleads to newest version Googleads 29.0 is no longer supported [ApiVersionError.UPDATE_TO_NEWER_VERSION @ version; trigger:'Version v202211 was deprecated and is now disabled. Please check the DoubleClick for Publishers blog for more information or contact us via the support forum.'] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 54ce97d..38d69db 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ google-auth-httplib2>=0.0.3 google_api_python_client>=1.6.7 google_auth_oauthlib>=0.2.0 google-cloud-bigquery>=1.24.0 -googleads>=29.0.0 +googleads>=40.0.0 isort==4.3.9 lxml>=4.6.5 mysql-connector-python==8.0.17 From 07b9d9c48c9c5599ed2b7667625ce5e90b375dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Balcerek?= Date: Thu, 18 Jan 2024 21:23:19 +0100 Subject: [PATCH 2/8] Bump urllib due to CVEs issued for lower versions https://devhub.checkmarx.com/cve-details/CVE-2023-43804/ https://devhub.checkmarx.com/cve-details/CVE-2023-45803/ --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 38d69db..52335b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,6 +15,6 @@ pyarrow>=0.11.1 qds_sdk>=1.10.1 requests>=2.20 retrying>=1.3.3 -urllib3>=1.26.5 +urllib3>=1.26.18 py2neo>=4.2.0 db-dtypes From 30086bb2e21daa3f988521b88bc57d05a84823ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Balcerek?= Date: Thu, 18 Jan 2024 21:26:05 +0100 Subject: [PATCH 3/8] Release as sroka 0.0.8 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b9a337f..d8d2047 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="sroka", - version="0.0.7", + version="0.0.8", author="Ad Engineering FANDOM", author_email="murbanek@fandom.com", description="Package for access GA, GAM, MOAT, Qubole, Athena, S3, Rubicon APIs, BigQuery, MySQL", From 036bae13e0652b5352b5cdefb3f81571c9097ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Balcerek?= Date: Mon, 22 Jan 2024 21:03:08 +0100 Subject: [PATCH 4/8] Add more codeowners so Fandom (old Wikia) can accept PRs --- CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CODEOWNERS b/CODEOWNERS index 2fa6d4e..8636eb3 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,3 +3,5 @@ # @martynaut and @dorotamierzwa will be requested for # review when someone opens a pull request. * @martynaut @dorotamierzwa +* @Wikia/adeng +* @Wikia/data-engineering From 7bfbd95573e87d4b09fe2be24b26315d8f24da6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Balcerek?= Date: Thu, 25 Jan 2024 22:28:02 +0100 Subject: [PATCH 5/8] Drop support for Python 3.7 (EOL), tested with Python 3.11 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f832762..ed8da69 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Package providing simple Python access to data in: * MySQL * neo4j -Sroka library was checked to work for Python **3.7, 3.8 and 3.9**. +Sroka library was checked to work for Python **>=3.8, <=3.11**. ## Developers From 34aafa7ad6b6f3c7fd91d508a86e2d821167b5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Balcerek?= Date: Thu, 25 Jan 2024 22:33:45 +0100 Subject: [PATCH 6/8] Remove dorotamierzwa as she doesn't have write access --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index 8636eb3..9994da9 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -2,6 +2,6 @@ # the repo. Unless a later match takes precedence, # @martynaut and @dorotamierzwa will be requested for # review when someone opens a pull request. -* @martynaut @dorotamierzwa +* @martynaut * @Wikia/adeng * @Wikia/data-engineering From 5275f8ed3691eb67f9314956c81fc4e13d92da2c Mon Sep 17 00:00:00 2001 From: martynaut Date: Mon, 3 Jun 2024 10:57:34 +0200 Subject: [PATCH 7/8] googleads bump --- .gitignore | 1 + requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c09ac6d..b616da8 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ sroka.egg-info/ **.csv config.ini sroka_test_file.py +environments.txt build diff --git a/requirements.txt b/requirements.txt index 52335b5..8a77f98 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ google-auth-httplib2>=0.0.3 google_api_python_client>=1.6.7 google_auth_oauthlib>=0.2.0 google-cloud-bigquery>=1.24.0 -googleads>=40.0.0 +googleads>=42.0.0 isort==4.3.9 lxml>=4.6.5 mysql-connector-python==8.0.17 From 44abd311d2dd3dedf6c79e23c21f1d57bfd1ed58 Mon Sep 17 00:00:00 2001 From: martynaut Date: Tue, 4 Jun 2024 10:22:15 +0200 Subject: [PATCH 8/8] pandas deprecation change --- sroka/api/s3_connection/s3_connection_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sroka/api/s3_connection/s3_connection_api.py b/sroka/api/s3_connection/s3_connection_api.py index 3370925..9e9ec81 100644 --- a/sroka/api/s3_connection/s3_connection_api.py +++ b/sroka/api/s3_connection/s3_connection_api.py @@ -31,7 +31,7 @@ def _download_data(key_prefix, s3, bucket_name, prefix, sep, skip_empty_files=Tr print('File not found on s3') return pd.DataFrame([]) try: - df_list.append(pd.read_csv(data, error_bad_lines=False, warn_bad_lines=False, sep=sep, + df_list.append(pd.read_csv(data, on_bad_lines='skip', sep=sep, header=header_setting)) except UnicodeDecodeError: df_list.append(pq.read_pandas(data).to_pandas()) @@ -47,7 +47,7 @@ def _download_data(key_prefix, s3, bucket_name, prefix, sep, skip_empty_files=Tr if 'SUCCESS' not in file.key: tmp = StringIO(str(file.get()['Body'].read(), 'utf-8')) try: - data = pd.read_csv(tmp, error_bad_lines=False, warn_bad_lines=False, sep=sep, + data = pd.read_csv(tmp, on_bad_lines='skip', sep=sep, header=header_setting) df_list.append(data) except EmptyDataError: