CobayaSampler / cobaya

Code for Bayesian Analysis
http://cobaya.readthedocs.io/en/latest/
Other
128 stars 127 forks source link

Backward Compatibility with python 3.9 #345

Closed Kushallodha closed 10 months ago

Kushallodha commented 10 months ago

After #326, Cobaya has become incompatible with Python<=3.9. I believe one of the reasons is due to the use of

commands = {}
for script in metadata.entry_points().select(group='console_scripts'):
        if script.name.startswith('cobaya-'):
            commands[script.name] = script.value
    help_msg = ("Add a one of the following commands and its arguments "
                "(`<command> -h` for help): %r" % list(commands))`

in cobaya/__main__.py. The metadata.entry_points() didn't have a select method in < v3.10. I am aware Python 3.9's full support ended in 2022, but it would be great if we could somehow maintain backward compatibility till the end of its lifetime (2025). I am unsure if this has already been discussed elsewhere or if the authors have decided to end Cobaya support for Python <=3.9.

cmbant commented 10 months ago

Thanks for the report. But you shouldn't need to use main - e.g. cobaya-run etc can be run directly (personally I never use the main version).

Kushallodha commented 10 months ago

I've been using main due to past issues with occasionally environmental variables and paths not being properly exported in job scripts. If directly calling console scripts resolves this, then it's not a significant concern.

Kushallodha commented 9 months ago

Is there a way to use debugging tools like pdb with console commands directly?

cmbant commented 9 months ago

I don't know, I always debug in pycharm.