Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 12:35
· 270 commits to main since this release

Benchmark

I did not run the benchmark again for this release. Its numbers are still 0.1.0's and are for the
Gemini pack alone: scan precision 100.0% and recall 98.4% over 64 usages in five repositories, and
25 of 277 usages (9.0%) migrated in 20 repositories with no wrong edit, on the
results page. The
scanner and the rewriter have changed since, so read those numbers as dated. The new gate rule is
measured without the tests: a fix dry run with no model over the 80-repository frame of each pack
plans for openai and Gemini what 0.4.0 planned, and for py-pdf/pypdf2-to-pypdf plans for 19 of the
53 repositories the version gate stopped: 15 complete, 3 partial and 1 held, so 31 of 80 repositories
plan completely against 16 (the other 34 that the gate stops still stop, and one stops on a Python).
That says what is written, not whether the result passes a repository's tests, and "complete" means
a file written and nothing withheld, not a correct migration. openai/openai-0-to-1 and
py-pdf/pypdf2-to-pypdf still have no accuracy figure and no benchmark; they rest on fixtures, on
each change measured against both library versions installed side by side, and on a weekly job that
runs their facts on the oldest and newest releases and now also checks that PyPI has no PyPDF2
release newer than the one the pack takes an unversioned requirement as.

Unsupported patterns

docs/KNOWN_ISSUES.md lists
what I know about and have chosen not to fix yet. The gaps listed under 0.4.0 stand. A PyPDF2
requirement with no version is now taken as 3.0.1 where git lists the files and nothing in them
shows another release, which is a claim about an install nobody ran: the environment the code runs
in, a pip.conf in your home directory and a release another package requires are not seen, and the
section on the PyPDF2 pack lists the rest. The formats that changed are pack.yaml (the optional
from.newest and from.lacks), run.json (packs[].assumed) and their JSON Schemas.

Added

  • A pack may name the newest release of the distribution it migrates from (from.newest) and the
    names that release no longer defines (from.lacks), and a declaration that names no version, or
    a range that reaches below the floor but admits that release, is then taken as it
    (ADR-056). The PyPDF2 pack names 3.0.1 and its
    three removed classes. Nothing else in a pack changes: a pack that names no newest is gated
    as before, and to takes neither field.
  • A run that took such a release says so: packs[].assumed in run.json holds it, and the
    terminal and REPORT.md say that the distribution is declared with no version that rules the
    release out and is taken as it.
  • The weekly end-to-end run fails when PyPI lists a final PyPDF2 release newer than the pack's
    from.newest, so the claim cannot lapse unseen.

Changed

  • The legacy version gate no longer stops a PyPDF2 repository for a requirement with no version,
    or a range that reaches below 3 but admits 3.0.1 (PyPDF2, PyPDF2>=2.10), where the
    repository shows no other release. On the 80-repository PyPDF2 frame that unblocks 19 of the 53
    repositories the gate stopped: 15 plan completely, 3 partly and 1 only holds. It still stops, and names the file, where one does: code that uses PdfFileReader,
    PdfFileWriter or PdfFileMerger; a lock, a constraints file, a pip.conf or another
    installer setting; an index setting in pyproject.toml or Pipfile; a pip option that moves
    the index; a manifest that names PyPDF2 where no requirement was read or cannot be read; a
    version of PyPDF2 written anywhere git lists that rules 3.0.1 out (a Dockerfile, a CI file, a
    tox.ini, a notebook); a virtual environment kept in the repository with another release. A
    requirement with an environment marker or a pre-release is not taken, and nothing is taken in a
    directory that is not the top of a git repository. The openai and Gemini packs are gated as
    before. A repository the gate no longer stops can now have its rows asked of a model you
    configured, so its source can reach that endpoint, which the stop had kept it from.
  • The message for a pack that plans nothing because of what a repository declares (the legacy
    version gate, or a Python the new distribution does not install on) now says what the edit
    leads to: in a git repository, commit it before fix --apply, which refuses uncommitted changes
    unless you pass --allow-dirty. For a repository that declares the library nowhere, it names the
    requirement to declare (PyPDF2>=3) and a manifest that will do (requirements.txt).

Fixed

  • A Poetry caret on a 0.x version is read as Poetry reads it: ^0.27 stops below 0.28 and
    ^0.0.3 below 0.0.4, not below 1 and 0.1. Nothing in a run changes yet, since only the
    floor of a declaration is read today.
  • A setup.py requirement that code builds around its string ("PyPDF2" + VERSION,
    "PyPDF2" ">=3", "PyPDF2=={}".format(v), a subscript) is named without a pin, so fix no
    longer rewrites the literal into "pypdf>=6.19" + VERSION; the row needs review.

Packs

  • py-pdf/pypdf2-to-pypdf 0.3.0 names from.newest 3.0.1 and from.lacks PdfFileMerger,
    PdfFileReader and PdfFileWriter, and its limitations say what is taken as 3.0.1, what stops
    that, and what lives outside the repository and is not seen. The rules are unchanged.