-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Python 3.10 #250
Support Python 3.10 #250
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ python: | |
- '3.7' | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
install: pip install tox-travis | ||
script: tox |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ | |
|
||
_UNSET = object() | ||
|
||
CONFIG_FILE_ENCODING = 'utf-8' | ||
|
||
|
||
def get_config_parser(): | ||
return configparser.ConfigParser() # keep this for backward compatibility | ||
|
@@ -190,7 +192,7 @@ def __init__(self, config_dir, config_path, config_comment=None): | |
self.config_comment = config_comment | ||
self.config_parser = configparser.ConfigParser() | ||
if os.path.exists(config_path): | ||
self.config_parser.read(config_path) | ||
self.config_parser.read(config_path, encoding=CONFIG_FILE_ENCODING) | ||
|
||
def items(self, section): | ||
return self.config_parser.items(section) if self.config_parser else [] | ||
|
@@ -220,7 +222,7 @@ def getboolean(self, section, option): | |
|
||
def set(self, config): | ||
ensure_dir(self.config_dir) | ||
with open(self.config_path, 'w') as configfile: | ||
with open(self.config_path, 'w', encoding=CONFIG_FILE_ENCODING) as configfile: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
See https://pylint.pycqa.org/en/latest/technical_reference/features.html#stdlib-checker-messages |
||
if self.config_comment: | ||
configfile.write(self.config_comment + '\n') | ||
config.write(configfile) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
argcomplete==1.12.2 | ||
colorama==0.4.4 | ||
flake8==3.8.4 | ||
flake8==4.0.1 | ||
jmespath==0.10.0 | ||
Pygments==2.8.1 | ||
pylint==2.7.2 | ||
pytest==6.2.2 | ||
pylint==2.11.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New |
||
pytest==6.2.5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Old
|
||
PyYAML | ||
tabulate==0.8.9 | ||
vcrpy==4.1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are countless places where
str.format
is used. We should allow it.