【问题标题】:What is the python-poetry config file after 1.2.0 release?1.2.0 发布后的 python-poetry 配置文件是什么?
【发布时间】:2022-10-19 04:04:28
【问题描述】:

我已经使用python-poetry 一年多了。
poetry 1.2.0 发布后,我收到这样的信息警告:

Configuration file exists at ~/Library/Application Support/pypoetry,
reusing this directory.

Consider moving configuration to ~/Library/Preferences/pypoetry,
as support for the legacy directory will be removed in an upcoming release.

但在文档中,它仍然适用于 macOS:~/Library/Application Support/pypoetry
https://python-poetry.org/docs/configuration/

我的问题是,如果~/Library/Preferences/pypoetry 是最新的决定,我应该怎么做才能将配置移到那里?
只是复制粘贴就够了吗?

【问题讨论】:

标签: python python-poetry


【解决方案1】:

看起来就像复制/粘贴到新目录一样简单。

升级到 Poetry 1.2 后我遇到了同样的错误。所以我在新的Preferences 目录中创建了一个pypoetry 文件夹,将config.toml 复制/粘贴到它,为了安全起见,我将原始文件夹重命名为:

~/Library/Application Support/pypoetry_bak

执行此操作并运行poetry -V 后,错误就消失了。

【讨论】:

    【解决方案2】:

    复制粘贴相当于 Ryan 的答案:

    cp -R ~/Library/Application Support/pypoetry ~/Library/Preferences/
    mv ~/Library/Application Support/pypoetry ~/Library/Application Support/pypoetry_bak
    poetry -V
    

    (无法评论代码块格式)

    【讨论】:

      猜你喜欢
      • 2021-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-05
      • 2018-09-15
      • 1970-01-01
      • 1970-01-01
      • 2015-09-18
      相关资源
      最近更新 更多