Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python/importlib_metadata
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.0.2
Choose a base ref
...
head repository: python/importlib_metadata
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.1.0
Choose a head ref
  • 16 commits
  • 13 files changed
  • 3 contributors

Commits on Mar 20, 2024

  1. gh-109653: Improve import time of importlib.metadata / email.utils (p…

    …ython/cpython#114664)
    
    My criterion for delayed imports is that they're only worth it if the
    majority of users of the module would benefit from it, otherwise you're
    just moving latency around unpredictably.
    
    mktime_tz is not used anywhere in the standard library and grep.app
    indicates it's not got much use in the ecosystem either.
    
    Distribution.files is not nearly as widely used as other
    importlib.metadata APIs, so we defer the csv import.
    
    Before:
    ```
    λ hyperfine -w 8 './python -c "import importlib.metadata"'
    Benchmark 1: ./python -c "import importlib.metadata"
      Time (mean ± σ):      65.1 ms ±   0.5 ms    [User: 55.3 ms, System: 9.8 ms]
      Range (min … max):    64.4 ms …  66.4 ms    44 runs
    ```
    
    After:
    ```
    λ hyperfine -w 8 './python -c "import importlib.metadata"'
    Benchmark 1: ./python -c "import importlib.metadata"
      Time (mean ± σ):      62.0 ms ±   0.3 ms    [User: 52.5 ms, System: 9.6 ms]
      Range (min … max):    61.3 ms …  62.8 ms    46 runs
    ```
    
    for about a 3ms saving with warm disk cache, maybe 7-11ms with cold disk
    cache.
    hauntsaninja authored and jaraco committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    b4ce0ff View commit details
    Browse the repository at this point in the history
  2. gh-116811: Ensure MetadataPathFinder.invalidate_caches is reachable w…

    …hen delegated through PathFinder. (python/cpython#116812)
    
    * Make MetadataPathFinder a proper classmethod.
    jaraco committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    fb7465c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a878d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f16e114 View commit details
    Browse the repository at this point in the history
  5. Fix test failures on older Pythons with os_helper shim. Copied 'from_…

    …test_support' from importlib_resources.
    jaraco committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    3531507 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    856541b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ffa719b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    5950f43 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    41ca039 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e30a16d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    07d894d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    adc4b12 View commit details
    Browse the repository at this point in the history
  13. Make MetadataPathFinder.find_distributions a classmethod for consiste…

    …ncy with CPython. Closes #484.
    jaraco committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    47b14ac View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1711b2c View commit details
    Browse the repository at this point in the history
  15. Merge commit '1711b2c198'

    jaraco committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    2ef3b5f View commit details
    Browse the repository at this point in the history
  16. Finalize

    jaraco committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    f5d6b5f View commit details
    Browse the repository at this point in the history
Loading