Replies: 3 comments
-
Hi Flávio thank you very much for reaching out. I am curious to understand what is your use case. Is it possible to elaborate a little about that? The main rationale behind the deprecation is summarised in #3214. Since the long term plan is to remove Both |
Beta Was this translation helpful? Give feedback.
-
Hello, @abravalheri ! Thank you for the response! I'm writing libraries and external scripts to automate some build/development time tasks, like provisioning virtual envs, initializing development environments, generating constraints files, and other assorted things. Currently, all of my stack is based on Pip and Setuptools. That For now, I depend exclusively on pip/setuptools, but in the future, I'd like to evolve the solution to support other build systems, and enable its use in other projects. This requires reading Also, for some projects, I need to dynamically construct Ideally, I'd like to use setuptools whenever possible when a project depends on it; but at the same time, I would like to not rely too much on setuptools to build my utilities, because I cannot enforce its use on every project. Migrating from AFAICT, I don't understand why |
Beta Was this translation helpful? Give feedback.
-
Hi Flávio, thank you very much for the description of the use case. Based on it, may I suggest an alternative approach that is also setuptools-independent? The most reliable, non-backend-specific way of obtaining the information you are after seems to be using the core-metadata produced by the project. Currently the Otherwise you could still do it yourself with
I agree with you here that it makes sense, but I don't think Footnotes |
Beta Was this translation helpful? Give feedback.
-
I updated to Setuptools > 61.0.0, and now I see the following message when trying to use the aforementioned function:
from setuptools.config.setupcfg import read_configuration
works, but cannot be found by linters when statically analyzing the file (at least pylance couldn't), so the import is "squiggled" andread_configuration
is effectivelyAny
.I don't understand the rationale behind this decision. Why remove
setup.cfg
functionality whilepyproject.toml
-equivalent ones are still experimental (as per the documentation)?Also, even when changing to
setuptools.config.setupcfg.read_configuration
, the warning message says the module is provisional and should not be depended upon, but no other option is given to users that depend on this feature. What sould I do instead? Or what can I use in its place?In any case, I'm not sure if there's a
read_configuration
that's able to readpyproject.toml
files withsetuptools
semantics (ie. loading aDistribution
object, and all of that). I tried to read apyproject.toml
(converted from mysetup.cfg
viaini2toml
) withread_configuration
, and it failed, complaining that the file format is invalid:What is the equivalent of
read_configuration
forpyproject.toml
files?Beta Was this translation helpful? Give feedback.
All reactions