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

Allow path objects for data-files #272

Merged
merged 18 commits into from
Jul 20, 2024
Merged

Allow path objects for data-files #272

merged 18 commits into from
Jul 20, 2024

Commits on Jul 19, 2024

  1. Allow path objects

    InvincibleRMC authored and jaraco committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    d3c76bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    12f2ef0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8a9ca8b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    206ca2a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f7adff4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b440f45 View commit details
    Browse the repository at this point in the history
  7. Use explicit registration for compatibility with older Pythons.

    Prior to 3.11, singledispatch[method] doesn't know about unions.
    jaraco committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    94b6d14 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    4d50db3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e88bd79 View commit details
    Browse the repository at this point in the history
  10. In test_convert_path, utilize posixpath.join and ntpath.join for maxi…

    …mum compatibility with other libraries.
    jaraco committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    d48a881 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8eb6b57 View commit details
    Browse the repository at this point in the history
  12. convert_path no longer fails if passed a path with a trailing slash. …

    …Instead, trailing slashes are stripped just as they are with pathlib.Path.
    
    Ref #272 (comment).
    jaraco committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    4232b01 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2024

  1. convert_path now converts to a platform-native path.Path, but then ca…

    …lls `.as_posix()` on it.
    
    This change will have the unintended effect of adding support for backslashes on Windows. Maybe that's fine, or maybe it should be prohibited.
    jaraco committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    b4df774 View commit details
    Browse the repository at this point in the history
  2. Separate test_convert_path into two tests to avoid interactions in mo…

    …nkeypatching os.path.
    jaraco committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    c67da35 View commit details
    Browse the repository at this point in the history
  3. Remove expectation that a ValueError is raised for data_files being d…

    …rive-relative absolute on Windows.
    jaraco committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    1e97e21 View commit details
    Browse the repository at this point in the history
  4. Simplify convert_path by simply relying on the logic in PurePath.

    Test for convert_path no longer runs on all operating systems as it's too difficult (impossible) to monkeypatch PurePath reliably.
    jaraco committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    4b3f16f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c4d3c3c View commit details
    Browse the repository at this point in the history
  6. Consolidate convert_path tests and just generate the expected value i…

    …n a platform-sensitive way. Should fix failures on mingw.
    jaraco committed Jul 20, 2024
    Configuration menu
    Copy the full SHA
    a166815 View commit details
    Browse the repository at this point in the history