fedora-python / portingdb

Database & tools to track Python 2 removal from Fedora
https://fedora.portingdb.xyz
MIT License
31 stars 39 forks source link

Python 3 only packages with Python 2 dependencies #492

Closed hroncok closed 4 years ago

hroncok commented 5 years ago

I'd like to see packages that are marked Python 3 only but have Python 2 dependencies.

If a separate new category is overkill, a summary page would do.

Usually this marks a big mistake in packaging. I've noticed we have a quite a few, when I've seen the graph from https://github.com/fedora-python/portingdb/pull/491

encukou commented 5 years ago

I suspect there's also a lot of build-time binaries that happen to run on Python 2.

I won't have time to make this shiny soon, but in the mean time, try:

from portingdb.load_data import get_data

data = get_data('data')

for name, pkg in data['packages'].items():
    if pkg['status'] == 'py3-only' and (pkg['deps'] or pkg['build_deps']):
        print(name)
        for dep in pkg['deps']:
            print('    R:', dep)
        for dep in pkg['build_deps']:
            print('    BR:', dep)

(FWIW, one thing I learned from this iteration is that storing a densely connected graph in dicts, rather than a database or dataclasses, means that print-ing out one thing tries to print out all of the data. That probably makes exploring the data way harder than it should be. Sorry!)

hroncok commented 5 years ago

For the reference, this is the current result:

hroncok commented 5 years ago

Those are mostly:

I'm filing PRs but I guess anyone can chip in and do the same. It's tedious but not enough to automate.

encukou commented 4 years ago

I don't think it makes sense to automate this, now that we have the FESCo exception process. Please reopen if you disagree.