Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG10839394f39b: util: remove superfluous ispy3 test
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Alphare |
hg-reviewers |
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/util.py (2 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
9b42b2ce3461 | 865f77154a35 | Gregory Szorc | Feb 21 2022, 12:35 PM |
# | # | ||||
# The option of setting PYTHONWARNINGS in the test runner was investigated. | # The option of setting PYTHONWARNINGS in the test runner was investigated. | ||||
# However, module name set through PYTHONWARNINGS was exactly matched, so | # However, module name set through PYTHONWARNINGS was exactly matched, so | ||||
# we cannot set 'mercurial' and have it match eg: 'mercurial.scmutil'. This | # we cannot set 'mercurial' and have it match eg: 'mercurial.scmutil'. This | ||||
# makes the whole PYTHONWARNINGS thing useless for our usecase. | # makes the whole PYTHONWARNINGS thing useless for our usecase. | ||||
warnings.filterwarnings('default', '', DeprecationWarning, 'mercurial') | warnings.filterwarnings('default', '', DeprecationWarning, 'mercurial') | ||||
warnings.filterwarnings('default', '', DeprecationWarning, 'hgext') | warnings.filterwarnings('default', '', DeprecationWarning, 'hgext') | ||||
warnings.filterwarnings('default', '', DeprecationWarning, 'hgext3rd') | warnings.filterwarnings('default', '', DeprecationWarning, 'hgext3rd') | ||||
if _dowarn and pycompat.ispy3: | if _dowarn: | ||||
# silence warning emitted by passing user string to re.sub() | # silence warning emitted by passing user string to re.sub() | ||||
warnings.filterwarnings( | warnings.filterwarnings( | ||||
'ignore', 'bad escape', DeprecationWarning, 'mercurial' | 'ignore', 'bad escape', DeprecationWarning, 'mercurial' | ||||
) | ) | ||||
warnings.filterwarnings( | warnings.filterwarnings( | ||||
'ignore', 'invalid escape sequence', DeprecationWarning, 'mercurial' | 'ignore', 'invalid escape sequence', DeprecationWarning, 'mercurial' | ||||
) | ) | ||||
# TODO: reinvent imp.is_frozen() | # TODO: reinvent imp.is_frozen() |