Skip to content

Commit

Permalink
Suppress CI warnings for Python 3.12
Browse files Browse the repository at this point in the history
- python-dateutil uses the deprecated datetime.utcfromtimestamp(); its
  next release after 2.8.2 will no longer use this function.
- Missing coverage is being falsely reported for an exit from a finally
  block; the coverage exclusion can be removed with python/cpython#105658.
  • Loading branch information
rmartin16 committed Sep 1, 2023
1 parent 71f576f commit fc7f648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ no-cover-if-is-macos = "'darwin' == os_environ.get('COVERAGE_PLATFORM', sys_plat
no-cover-if-not-macos = "'darwin' != os_environ.get('COVERAGE_PLATFORM', sys_platform) and os_environ.get('COVERAGE_EXCLUDE_PLATFORM') != 'disable'"
no-cover-if-is-windows = "'win32' == os_environ.get('COVERAGE_PLATFORM', sys_platform) and os_environ.get('COVERAGE_EXCLUDE_PLATFORM') != 'disable'"
no-cover-if-not-windows = "'win32' != os_environ.get('COVERAGE_PLATFORM', sys_platform) and os_environ.get('COVERAGE_EXCLUDE_PLATFORM') != 'disable'"
no-cover-if-is-py312 = "python_version == '3.12' and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-lt-py312 = "sys_version_info < (3, 12) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-is-py310 = "python_version == '3.10' and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
no-cover-if-lt-py310 = "sys_version_info < (3, 10) and os_environ.get('COVERAGE_EXCLUDE_PYTHON_VERSION') != 'disable'"
Expand All @@ -52,6 +53,8 @@ multi_line_output = 3
testpaths = ["tests"]
filterwarnings = [
"error",
# suppress until python-dateutil>2.8.2 is released (https://github.com/dateutil/dateutil/issues/1284)
"ignore:.*datetime.utcfromtimestamp\\(\\) is deprecated.*:DeprecationWarning:",
]

# need to ensure build directories aren't excluded from recursion
Expand Down
3 changes: 2 additions & 1 deletion src/briefcase/platforms/macOS/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,8 @@ def notarize(self, filename, team_id):
finally:
# Clean up house; we don't need the archive anymore.
if archive_filename != filename:
self.tools.os.unlink(archive_filename)
# coverage exclusion required for https://github.com/python/cpython/issues/105658
self.tools.os.unlink(archive_filename) # no-cover-if-is-py312

try:
self.logger.info()
Expand Down

0 comments on commit fc7f648

Please sign in to comment.