## Bug: Wheel filename with `\n` in distribution name is incorrectly accepted as valid ### Description When parsing a wheel filename where the distribution name ends with a newline character (`\n`), `parse_wheel_filename` does not raise `InvalidWheelFilename` as expected. Instead, it silently accepts the filename as valid. For example: ```python from packaging.utils import parse_wheel_filename, InvalidWheelFilename # This should raise InvalidWheelFilename because 'foo\n' is not a valid distribution name try: result = parse_wheel_filename("foo\n-1.0-py3-none-any.whl") print("No exception raised! Got:", result) except InvalidWheelFilename: print("Correctly rejected invalid filename") ``` Running this prints `No exception raised!` — the filename is accepted without error. ### Expected behavior A wheel filename containing a newline character (`\n`) in the distribution name part (e.g., `"foo\n-1.0-py3-none-any.whl"`) should be rejected with an `InvalidWheelFilename` exception, just like other filenames with invalid characters (e.g., `foo#bar-1.0-py3-none-any.whl` or `foo__bar-1.0-py3-none-any.whl`). ### Actual behavior No exception is raised. The filename is accepted as valid. ### Root cause The regex used to validate the wheel distribution name is `^[\w._]+$` with `re.UNICODE`. In Python's `re` module, `$` matches at the end of the string **or** just before a trailing newline — so `foo\n` incorrectly passes the pattern. The anchor should be `\Z` instead of `$`, which matches strictly at the end of the string with no exceptions for trailing newlines. Work in `/workspace`. Submit your fix in the existing Python source files under `src/packaging`. Preserve the other public behavior. The environment is offline; dependencies are preinstalled. Grading runs the repository's test suite in a fresh environment, using your submitted source files.