-
Notifications
You must be signed in to change notification settings - Fork 16
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
setuptools 69 includes type information by default #160
base: main
Are you sure you want to change the base?
setuptools 69 includes type information by default #160
Conversation
assert pkg_data.package_data == ( | ||
{"singlefilepkg-stubs": ["__init__.pyi", "METADATA.toml", "py.typed"]} | ||
) | ||
assert pkg_data.package_data == ({"singlefilepkg-stubs": ["METADATA.toml"]}) |
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.
Tests were checking for strings in package_data
, but I don't think there's any test to ensure that the right files are actually collected.
package_data[pkg_name + SUFFIX] = [*stub_files, META] | ||
pkg_data = PackageData(base_path, package_data) | ||
for package in pkg_data.top_level_non_namespace_packages: | ||
pkg_data.add_file(package, "py.typed") |
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.
As far as I can see, this is the only call of PackageData.add_file()
, so we can remove that method.
elif file == "py.typed": | ||
result.append(os.path.relpath(os.path.join(root, file), top)) |
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.
By removing this, I'd expect this function to crash, as the build directory will have py.typed
files and the next elif branch checks for unknown files.
Closes #112