GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Script to repartition index files · Issue #5 · python/pymanager

Script to repartition index files #5

New issue
Copy link
New issue
Copy link
Closed
#73
Closed
Script to repartition index files#5
#73
Copy link
Assignees
zooba
Labels
enhancementNew feature or requestNew feature or request

Description

@zooba
zooba
opened on Apr 28, 2025
Issue body actions

Index files (hosted on python.org) can be split up to minimise the initial download when clients are accessing it. This is a simple chain - the next element contains a URL (relative to the location of the containing file, so typically this will just be a filename), and if no matching version is available in the first one, the next one will be loaded.

Each index file is sorted by the client (by descending 'sort-version') before checking for matches (such that py install 3 will prefer 3.13 over 3.12 regardless of which appears first), but does not sort across index files (such that if 3.13 appears in the next index only, 3.12 would be selected).

So the ideal is to have the current versions of each likely specifier in the first file, with those less likely or specific enough to exclude every option from earlier files in later ones. Certainly py install 3 and py install 3.x (for non-EOL x) should always find the correct match in the first index.

Rather than making a complex database for handling this1, we chain static files. But periodically we should merge and re-split these files for optimal performance. We should have a script in this repo to do that, ideally:

  • takes a URL/path as input
  • downloads the full chain of indexes and combines them all
  • re-sorts all available installs by sort-version and then some other sensible key2
  • divides all installs into three new files based on their sort-version

A reasonable division would be:

  • all latest x.y.z versions
  • all non-latest x.y versions since a reasonable point (currently 3.10)
  • all the rest ("legacy")

(Worth noting that this isn't the breakdown we have right now - we only have the "since 3.10" and "all the rest" indexes. Provided the URL of the first index doesn't change, we can always insert more later.)

Footnotes

  1. In other words, rather than standing up expensive infrastructure... ↩

  2. Probably 'company' and 'tag', or 'id'. ↩

Activity

  1. zooba
    added
    enhancementNew feature or requestNew feature or request
    on Apr 28, 2025
  2. zooba
    self-assigned this
    on May 6, 2025
  3. zooba
    added a commit that references this issue on May 6, 2025

    Add initial repartition script.

    This issue will close once commit f7bb2d9 is merged into the 'main' branch.
    f7bb2d9
  4. zooba
    closed this as completedin #73on May 7, 2025
  5. zooba
    added a commit that references this issue on May 7, 2025

    Add index repartition script and job (#73)

    This issue will close once commit 4add401 is merged into the 'main' branch.
    4add401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @zooba
    zooba

Labels

enhancementNew feature or requestNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.