autoimport icon indicating copy to clipboard operation
autoimport copied to clipboard

Support maison 2.0.0

Open daroczig opened this issue 1 year ago • 3 comments

Description

It seems that the new release of maison is breaking autoimport.

As per https://github.com/dbatten5/maison/releases:

  • Renaming ProjectConfig to UserConfig

Steps to reproduce

$ autoimport --version
Traceback (most recent call last):
  File "../bin/autoimport", line 5, in <module>
    from autoimport.entrypoints.cli import cli
  File "../lib/python3.12/site-packages/autoimport/entrypoints/cli.py", line 12, in <module>
    from maison.config import ProjectConfig
ImportError: cannot import name 'ProjectConfig' from 'maison.config' (../lib/python3.12/site-packages/maison/config.py)

Current behavior

Desired behavior

No error, autoimport runs :)

Environment

autoimport==1.6.0

daroczig avatar Aug 25 '24 13:08 daroczig

Just bumped into this too while installing on a new system.

# I installed with pipx
pipx install autoimport

autoimport
# fails with: 
#    ImportError: cannot import name 'ProjectConfig' from 'maison.config' (/home/erb/.local/share/pipx/venvs/autoimport/lib/python3.12/site-packages/maison/config.py)

# fix
pipx inject autoimport 'maison<2' --force

autoimport
# works!

ErikBjare avatar Sep 06 '24 14:09 ErikBjare

I didn't see the prior PR but I've opened another one that address rebuilding the pdm lockfile and adds an entry to the changelog. Feel free to close it as a dupe, or whatever. https://github.com/lyz-code/autoimport/pull/261

wbbradley avatar Sep 19 '24 03:09 wbbradley

This has been patched by @zhou13 by pinning maison <2.0.0 and released under 1.6.1. I'll rename the issue to track the support of > 2.0.0.

If you're interested in fixing this issue @cjwatson has started this work here

lyz-code avatar Oct 01 '24 16:10 lyz-code