Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ jobs:
matrix:
os:
- ubuntu-20.04
python-version: [ 3.5.4, 3.5.10, 3.6.7, 3.6.10, 3.6.14, 3.7.5, 3.7.11, 3.8.0, 3.8.5, 3.9.0, 3.9.6]
python-version:
- "3.8"
- "3.9"
- "3.10"
Copy link
Owner Author

@bhrutledge bhrutledge Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scanning through the log output, it looks like all version log errors during the test runs (i.e. it's expected behavior). However, the log output format is different between Python 3.8 and Python 3.10:

< test_connection_post_with_exception (tests.http.test_connection.ConnectionTest) ... VWO-SDK - [ERROR]: vwo/http/connection): HTTP Connection - Exception. Error - REQUEST FAILED
---
> test_connection_post_with_exception (tests.http.test_connection.ConnectionTest) ... VWO-SDK - [ERROR]: 805 (vwo/http/connection): HTTP Connection - Exception. Error - REQUEST FAILED
> (vwo/http/connection): HTTP Connection - Exception. Error - REQUEST FAILED

In Python 3.10, there's an extra number after the log level, and the message is printed twice.

Don't know if this would impact us.

Raw logs:


steps:
- uses: actions/checkout@v3
Expand All @@ -34,21 +37,3 @@ jobs:

- name: Run tests
run: coverage run --source=vwo setup.py test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true

- name: Notification
if: always()
id: slack
uses: wingify/slack-github-action@v1.15.1-wingify
with:
channel-id: 'fs-review-team'
slack-message: "<!here> Test on *Python-${{ matrix.python-version }}* and *${{ matrix.os }}* got *${{job.status}}* ${{job.status == 'success' && ':heavy_check_mark:' || ':x:'}} \nCommit: `${{github.event.head_commit.message}}`. \nCheck the latest build: https://github.com/wingify/vwo-python-sdk/actions"
color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pyrsistent>=0.16.1; python_version>="3.4"
jsonschema>=3.0.1,<4.0
jsonschema>=4.1.2,<4.18
mmh3==2.5.1
requests[security]>=2.9.1
redis==5.0.1
redis==5.0.1
5 changes: 4 additions & 1 deletion tests/logger/test_VWOLogger.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def test_getInstance_log_level_passed(self):
def test_getInstance_logging_logger_passed(self):
logger = VWOLogger.getInstance(logger=logging.getLogger())
self.assertIsInstance(logger, VWOLogger.VWOLogger)
self.assertIs(logger.logger.level, 30) # Default log level of logging.Logger is INFO, ie 30
if sys.version_info >= (3, 10):
self.assertIs(logger.logger.level, 20) # In Python >=3.10, the default log level is 20 (INFO)
else:
self.assertIs(logger.logger.level, 30) # In Python <3.10, the default log level is 30 (WARNING)
Comment on lines +118 to +121
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CoPilot said the default changed in Python 3.10, but I don't see that referenced in the changelog, and the 3.10 docs say the default is still WARNING. 😕


def test_getInstance_custom_logger_passed(self):
class Logger:
Expand Down