You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compare any two package indexes, not just consecutive ones
wppm.diff could already compare two package indexes, and nothing could
reach it. It was not on the wppm command line, so nothing in -h mentioned
it; its own usage text said "python diff.py", which the relative imports
make impossible; and printing a comparison died on Windows with a
UnicodeEncodeError, because an upgrade is written "1.2.3 -> 1.2.4" with a
U+2192 and the console is cp1252 -- so any two releases far enough apart
to have one upgraded package could not be compared at all.
wppm -diff <a>.md <b>.md now does it, on any two indexes: two releases, a
year apart, or two flavors of the same release. It runs before the target
is resolved, so it needs no distribution -- two downloaded files and a
pip-installed wppm are enough.
The file mode also had no title, and the direction is not guessable from
the output: every upgrade line reads "old -> new", so a reader holding
the pair the wrong way round sees every upgrade as a downgrade. It now
opens with "## Changes from <first> to <second>". The version mode keeps
the header it has always had; the dead line above it, assigned and then
overwritten before it could be printed, is gone.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
help="compare two package indexes, whichever two you choose: wppm -diff WinPythonslim-64bit-3.13.5.0.md WinPythonslim-64bit-3.14.7.0.md\nany two releases or flavors, in either direction -- they need not be consecutive")
348
350
parser.add_argument("-p",dest="pipdown",action="store_true",help="show Package (!= missing) dependencies of the given package[option], [.]=all: wppm -p pandas[.]")
349
351
parser.add_argument("-r", dest="pipup", action="store_true", help=f"show Reverse (!= constraining) dependancies of the given package[option]: wppm -r pytest![test]")
350
352
parser.add_argument("-tl", "--top-level", action="store_true", help="keep only the entries no other entry pulls in, sorted: wppm -tl, wppm requirements.txt -tl -v\nwith -p or -r, start the tree from them instead of every package: wppm -tl -p")
@@ -355,6 +357,17 @@ def main(test=False):
355
357
parser.add_argument("-u", "--uninstall", action="store_true", help="uninstall package (use pip for more features)")
356
358
357
359
args=parser.parse_args()
360
+
ifargs.diff:
361
+
# no distribution involved: this reads two files. The indexes are in
362
+
# the changelogs/ directory of the winpython repository, one per
363
+
# release and flavor, and any two of them can be compared.
364
+
# utf-8 here and not just errors="replace": an upgrade is written
365
+
# "1.2.3 → 1.2.4", and replacing that arrow with "?" is most of the
366
+
# output on a page whose whole subject is upgrades.
0 commit comments