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

Fix .files and inferred packages_distributions for .egg-info packages #437

Merged
merged 23 commits into from
Apr 10, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fed3a41
tests/fixtures: Fix FilesDef type to include bytes values
jherland Mar 10, 2023
578322a
Add tests for egg-info package with no installed modules
jherland Mar 10, 2023
61b0f29
Distribution.files: Prefer *.egg-info/installed-files.txt to SOURCES.txt
jherland Mar 10, 2023
8026db2
Add tests for egg-info package with .files from inaccurate SOURCES.txt
jherland Mar 10, 2023
22d9ea5
Distribution.files: Only return files that actually exist
jherland Mar 10, 2023
a107ce5
Merge branch 'main' into egg-metadata-work
jaraco Mar 18, 2023
b391f77
squash! Add tests for egg-info package with no installed modules
jherland Mar 19, 2023
110f00d
Add test case demonstrating inferring module names from installed-fil…
jherland Mar 19, 2023
eeb2ed1
Fix issues with inferring module names from installed-files.txt
jherland Mar 19, 2023
a2dc88a
squash! Add tests for egg-info package with .files from inaccurate SO…
jherland Mar 19, 2023
f62bf95
squash! Add tests for egg-info package with no installed modules
jherland Mar 19, 2023
61eca31
squash! Distribution.files: Only return files that actually exist
jherland Mar 19, 2023
9b165a9
Refactor logic for skipping missing files out of magic_files()
jherland Mar 19, 2023
33eb7b4
Rewrite docstrings to clarify the expected output format, and why we …
jherland Mar 19, 2023
fa9cca4
test_packages_distributions_all_module_types() must create existing f…
jherland Mar 19, 2023
70ff991
test_packages_distributions_all_module_types: Create valid import names
jherland Mar 19, 2023
5dbe83c
Revert "test_packages_distributions_all_module_types: Create valid im…
jaraco Apr 9, 2023
4e7f79f
Revert "test_packages_distributions_all_module_types() must create ex…
jaraco Apr 9, 2023
812db6f
Merge branch 'main' into egg-metadata-work
jaraco Apr 9, 2023
387f3bd
Merge branch 'main' into egg-metadata-work
jaraco Apr 10, 2023
8818432
⚫ Fade to black.
jaraco Apr 10, 2023
3d7ee19
Refactor to avoid missed coverage
jaraco Apr 10, 2023
b8a8b5d
Update changelog.
jaraco Apr 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "test_packages_distributions_all_module_types: Create valid im…
…port names"

This reverts commit 70ff991.

This behavior was adopted in 5e8260c and subsequently adapted as part of #443.
jaraco committed Apr 9, 2023
commit 5dbe83cdb0565e13f5a57629a6a9a334e07ebe93
19 changes: 7 additions & 12 deletions tests/test_main.py
Original file line number Diff line number Diff line change
@@ -342,10 +342,10 @@ def test_packages_distributions_all_module_types(self):
filenames = list(
itertools.chain.from_iterable(
[
f'top_level_{i}{suffix}',
f'in_namespace_{i}/mod{suffix}',
f'in_package_{i}/__init__.py',
f'in_package_{i}/mod{suffix}',
f'{i}-top-level{suffix}',
f'{i}-in-namespace/mod{suffix}',
f'{i}-in-package/__init__.py',
f'{i}-in-package/mod{suffix}',
]
for i, suffix in enumerate(suffixes)
)
@@ -367,14 +367,9 @@ def test_packages_distributions_all_module_types(self):
distributions = packages_distributions()

for i in range(len(suffixes)):
assert distributions[f'top_level_{i}'] == ['all_distributions']
assert distributions[f'in_namespace_{i}'] == ['all_distributions']
assert distributions[f'in_package_{i}'] == ['all_distributions']

# All keys returned from packages_distributions() should be valid import
# names, which means that they must _at least_ be valid identifiers:
for import_name in distributions.keys():
assert import_name.isidentifier(), import_name
assert distributions[f'{i}-top-level'] == ['all_distributions']
assert distributions[f'{i}-in-namespace'] == ['all_distributions']
assert distributions[f'{i}-in-package'] == ['all_distributions']


class PackagesDistributionsEggTest(