Block dependencies that depend on enum34 (#8698)
* Block dependencies that depend on enum34 * Remove uninstalling enum34 * Update validation script * Add constraints to tox.ini * Upgrade yeelight to version that uses enum-compat * Disable sensor.skybeacon * Lint
This commit is contained in:
parent
a0530d8b9c
commit
e49b970665
8 changed files with 23 additions and 14 deletions
|
@ -88,6 +88,10 @@ URL_PIN = ('https://home-assistant.io/developers/code_review_platform/'
|
|||
|
||||
CONSTRAINT_PATH = os.path.join(os.path.dirname(__file__),
|
||||
'../homeassistant/package_constraints.txt')
|
||||
CONSTRAINT_BASE = """
|
||||
# Breaks Python 3.6 and is not needed for our supported Pythons
|
||||
enum34==1000000000.0.0
|
||||
"""
|
||||
|
||||
|
||||
def explore_module(package, explore_children):
|
||||
|
@ -223,25 +227,25 @@ def write_test_requirements_file(data):
|
|||
def write_constraints_file(data):
|
||||
"""Write constraints to a file."""
|
||||
with open(CONSTRAINT_PATH, 'w+', newline="\n") as req_file:
|
||||
req_file.write(data)
|
||||
req_file.write(data + CONSTRAINT_BASE)
|
||||
|
||||
|
||||
def validate_requirements_file(data):
|
||||
"""Validate if requirements_all.txt is up to date."""
|
||||
with open('requirements_all.txt', 'r') as req_file:
|
||||
return data == ''.join(req_file)
|
||||
return data == req_file.read()
|
||||
|
||||
|
||||
def validate_requirements_test_file(data):
|
||||
"""Validate if requirements_all.txt is up to date."""
|
||||
with open('requirements_test_all.txt', 'r') as req_file:
|
||||
return data == ''.join(req_file)
|
||||
return data == req_file.read()
|
||||
|
||||
|
||||
def validate_constraints_file(data):
|
||||
"""Validate if constraints is up to date."""
|
||||
with open(CONSTRAINT_PATH, 'r') as req_file:
|
||||
return data == ''.join(req_file)
|
||||
return data + CONSTRAINT_BASE == req_file.read()
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue