Skip to content

Commit

Permalink
Merge pull request #379 from jasonacox/urllib3
Browse files Browse the repository at this point in the history
Handle import issue with urllib3 #377
  • Loading branch information
jasonacox authored Jul 4, 2023
2 parents d804359 + 4c6f814 commit b329dd0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
5 changes: 5 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# RELEASE NOTES

## v1.12.9 - Import Issue with urllib3

* PyPI 1.12.9
* Add graceful handling of issue where urllib3 v2.0 causes `ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+` error. See https://github.com/jasonacox/tinytuya/issues/377.

## v1.12.8 - Device DP Mapping

* PyPI 1.12.8
Expand Down
7 changes: 6 additions & 1 deletion server/mqtt/mqtt_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
import time
import logging
import json
import requests
try:
import requests
except ImportError as impErr:
print("WARN: Unable to import requests library, Cloud functions will not work.")
print("WARN: Check dependencies. See https://github.com/jasonacox/tinytuya/issues/377")
print("WARN: Error: {}.".format(impErr.args[0]))
import sys
import os
import copy
Expand Down
7 changes: 6 additions & 1 deletion server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
import logging
import json
import socket
import requests
try:
import requests
except ImportError as impErr:
print("WARN: Unable to import requests library, Cloud functions will not work.")
print("WARN: Check dependencies. See https://github.com/jasonacox/tinytuya/issues/377")
print("WARN: Error: {}.".format(impErr.args[0]))
import resource
import sys
import os
Expand Down
7 changes: 6 additions & 1 deletion tinytuya/Cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@
import hmac
import json
import time
import requests
try:
import requests
except ImportError as impErr:
print("WARN: Unable to import requests library, Cloud functions will not work.")
print("WARN: Check dependencies. See https://github.com/jasonacox/tinytuya/issues/377")
print("WARN: Error: {}.".format(impErr.args[0]))

from .core import * # pylint: disable=W0401, W0614

Expand Down
2 changes: 1 addition & 1 deletion tinytuya/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
# Colorama terminal color capability for all platforms
init()

version_tuple = (1, 12, 8)
version_tuple = (1, 12, 9)
version = __version__ = "%d.%d.%d" % version_tuple
__author__ = "jasonacox"

Expand Down

0 comments on commit b329dd0

Please sign in to comment.