зеркало из https://github.com/Azure/iotedgedev.git
Load config file using read_file as readfp is being deprecated (#437)
* Load config file using read_file as read_fp is getting deprecated * The `read_file` method is not available on ConfigParser in py2.7, add a check * Update package version + add test debug config in launch.json
This commit is contained in:
Родитель
4c7c56be01
Коммит
addfd992a6
|
@ -1,13 +1,24 @@
|
||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Python: debug test",
|
||||||
|
"type": "python",
|
||||||
|
"request": "launch",
|
||||||
|
"module": "pytest",
|
||||||
|
"args": [
|
||||||
|
"-v",
|
||||||
|
"${workspaceFolder}/tests/test_simulator.py::test_monitor"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceFolder}"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Python Module",
|
"name": "Python Module",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"module": "iotedgedev.cli",
|
"module": "iotedgedev.cli",
|
||||||
"args": [
|
"args": [
|
||||||
"push"
|
"init"
|
||||||
],
|
],
|
||||||
"cwd": "${workspaceFolder}/tests/test_solution"
|
"cwd": "${workspaceFolder}/tests/test_solution"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
All notable changes to this project since 0.82.0 will be documented in this file.
|
All notable changes to this project since 0.82.0 will be documented in this file.
|
||||||
|
|
||||||
|
## [2.1.6] - 2020-09-23
|
||||||
|
### Changed
|
||||||
|
- Fix warning about ConfigParser readfp deprecation
|
||||||
|
|
||||||
## [2.1.5] - 2020-08-18
|
## [2.1.5] - 2020-08-18
|
||||||
### Changed
|
### Changed
|
||||||
- Fix error caused by latest bcrypt on Azure Pipelines agent
|
- Fix error caused by latest bcrypt on Azure Pipelines agent
|
||||||
|
|
|
@ -4,5 +4,5 @@
|
||||||
|
|
||||||
__author__ = 'Microsoft Corporation'
|
__author__ = 'Microsoft Corporation'
|
||||||
__email__ = 'vsciet@microsoft.com'
|
__email__ = 'vsciet@microsoft.com'
|
||||||
__version__ = '2.1.5'
|
__version__ = '2.1.6'
|
||||||
__AIkey__ = '95b20d64-f54f-4de3-8ad5-165a75a6c6fe'
|
__AIkey__ = '95b20d64-f54f-4de3-8ad5-165a75a6c6fe'
|
||||||
|
|
|
@ -43,6 +43,11 @@ class TelemetryConfig(object):
|
||||||
@suppress_all_exceptions()
|
@suppress_all_exceptions()
|
||||||
def load(self):
|
def load(self):
|
||||||
with open(self.get_config_path(), 'r') as f:
|
with open(self.get_config_path(), 'r') as f:
|
||||||
|
if hasattr(self.config_parser, 'read_file'):
|
||||||
|
self.config_parser.read_file(f)
|
||||||
|
else: # pragma: no cover
|
||||||
|
assert PY2
|
||||||
|
# The `read_file` method is not available on ConfigParser in py2.7!
|
||||||
self.config_parser.readfp(f)
|
self.config_parser.readfp(f)
|
||||||
|
|
||||||
@suppress_all_exceptions()
|
@suppress_all_exceptions()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 2.1.5
|
current_version = 2.1.6
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -45,7 +45,7 @@ test_requirements = [
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='iotedgedev',
|
name='iotedgedev',
|
||||||
version='2.1.5',
|
version='2.1.6',
|
||||||
description='The Azure IoT Edge Dev Tool greatly simplifies the IoT Edge development process by automating many routine manual tasks, such as building, deploying, pushing modules and configuring the IoT Edge Runtime.',
|
description='The Azure IoT Edge Dev Tool greatly simplifies the IoT Edge development process by automating many routine manual tasks, such as building, deploying, pushing modules and configuring the IoT Edge Runtime.',
|
||||||
long_description='See https://github.com/azure/iotedgedev for usage instructions.',
|
long_description='See https://github.com/azure/iotedgedev for usage instructions.',
|
||||||
author='Microsoft Corporation',
|
author='Microsoft Corporation',
|
||||||
|
|
Загрузка…
Ссылка в новой задаче