Skip to content
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

Revert "Map also empty dictionaries to file" #1629

Merged
merged 2 commits into from May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGES.rst
Expand Up @@ -20,7 +20,14 @@ development at the same time, such as 4.5.x and 5.0.
Unreleased
----------

Nothing yet.
- Fix: reverted a `change from 6.4.3 <pull 1347_>`_ that helped Cython, but
also increased the size of data files when using dynamic contexts, as
described in the now-fixed `issue 1586`_. The problem is now avoided due to a
recent change (`issue 1538`_). Thanks to `Anders Kaseorg <pull 1629_>`_
and David Szotten for persisting with problem reports and detailed diagnoses.

.. _issue 1586: https://github.com/nedbat/coveragepy/issues/1586
.. _pull 1629: https://github.com/nedbat/coveragepy/pull/1629


.. scriv-start-here
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Expand Up @@ -16,6 +16,7 @@ Alexander Todorov
Alexander Walters
Alpha Chen
Ammar Askar
Anders Kaseorg
Andrew Hoos
Anthony Sottile
Arcadiy Ivanov
Expand Down
2 changes: 1 addition & 1 deletion coverage/collector.py
Expand Up @@ -456,7 +456,7 @@ def mapped_file_dict(self, d: Mapping[str, T]) -> Dict[str, T]:
assert isinstance(runtime_err, Exception)
raise runtime_err

return {self.cached_mapped_file(k): v for k, v in items}
return {self.cached_mapped_file(k): v for k, v in items if v}

def plugin_was_disabled(self, plugin: CoveragePlugin) -> None:
"""Record that `plugin` was disabled during the run."""
Expand Down