fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

8.6K
active users

#pyprojecttoml

0 posts0 participants0 posts today
David Pape<p>What is the correct way to get information about *my* Python package out of the pyproject.toml file? What I used to do was this:</p><p>from importlib.metadata import metadata<br>my_package_metadata = metadata("my_package")<br>my_package_homepage = my_package_metadata["home-page"]</p><p>But now I'm trying to upgrade Poetry from 1.8 to 2.0 and moved a lot of stuff from tool.poetry to the project section and "home-page" returns None all of a sudden. 🙈 </p><p><a href="https://social.tchncs.de/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a> <a href="https://social.tchncs.de/tags/PyprojectToml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyprojectToml</span></a> <a href="https://social.tchncs.de/tags/PythonPoetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PythonPoetry</span></a></p>
Hugo van Kemenade<p><span class="h-card" translate="no"><a href="https://social.treehouse.systems/@mgorny" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>mgorny</span></a></span> Three of those are by me, sorry you think it look like shit. (I have since reverted some to be more concise: <a href="https://github.com/termcolor/termcolor/commit/09ca9cc88b7e31623b8c561aa1fe87383ddd8f72" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/termcolor/termcolor</span><span class="invisible">/commit/09ca9cc88b7e31623b8c561aa1fe87383ddd8f72</span></a>)</p><p>I also prefer the original, but <a href="https://mastodon.social/tags/TOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TOML</span></a> isn't the prettiest and it's much more valuable and maintainable for me to have things consistent and autoformatted than to re-arrange by hand.</p><p>Have you tried making suggestions with the formatter? Do you know another formatter that I could use that is better? Is there a <a href="https://mastodon.social/tags/PEP517" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PEP517</span></a> / <a href="https://mastodon.social/tags/PyProjectToml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyProjectToml</span></a> style guide?</p><p><a href="https://mastodon.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a></p>
mgorny-nyan (on) :autism:🙀🚂🐧<p>Kiedy przypadkowe projekty używające narzędzia do formatowania plików <a href="https://pol.social/tags/PyProjectToml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyProjectToml</span></a>, od pewnej osoby z opiniami, i nagle pliki `pyproject.toml` tych wszystkich projektów zaczynają wyglądać, jakby ktoś je wysrał, bo rzeczona osoba zmieniła zdanie, i stwierdziła, że klucze z kropkami dla tabelek <a href="https://pol.social/tags/TOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TOML</span></a> nie są fajne, i lepiej wszystkie wartości w upchnąć w nadrzędnych tabelach. Czy muszę dodawać, że to zupełnie inaczej, niż stosuje się w przykładach dla każdego jednego systemu budowania <a href="https://pol.social/tags/PEP517" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PEP517</span></a>?</p><p>Kilka przykładów projektów, w których to nastąpiło (często za sprawą pre-commit):</p><p><a href="https://github.com/pypa/virtualenv/commit/7cbed79924b6b6d953ca9ecf40de23a7d3486f57#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pypa/virtualenv/com</span><span class="invisible">mit/7cbed79924b6b6d953ca9ecf40de23a7d3486f57#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/django-commons/django-debug-toolbar/commit/2990290d43618df5eab357f2a36363186d51d5a8#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/django-commons/djan</span><span class="invisible">go-debug-toolbar/commit/2990290d43618df5eab357f2a36363186d51d5a8#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/pytest-dev/pytest/commit/5d5c9dc85850f64621190e62bd20d4b190bdbdb6#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pytest-dev/pytest/c</span><span class="invisible">ommit/5d5c9dc85850f64621190e62bd20d4b190bdbdb6#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/prettytable/prettytable/commit/88bebdac122b82af255656513080bdd2c90098d9#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/prettytable/prettyt</span><span class="invisible">able/commit/88bebdac122b82af255656513080bdd2c90098d9#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/python-humanize/humanize/commit/aa3a94e011a795a0551717c5a78a566bc2672390#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/python-humanize/hum</span><span class="invisible">anize/commit/aa3a94e011a795a0551717c5a78a566bc2672390#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/termcolor/termcolor/commit/9e35c66ab7ad48a33d5c2829dbee02382aa716e5#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/termcolor/termcolor</span><span class="invisible">/commit/9e35c66ab7ad48a33d5c2829dbee02382aa716e5#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a></p><p><a href="https://pol.social/tags/Gentoo" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Gentoo</span></a> <a href="https://pol.social/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a></p>
mgorny-nyan (he) :autism:🙀🚂🐧<p>When random projects use a certain <a href="https://social.treehouse.systems/tags/PyProjectToml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyProjectToml</span></a> formatter from a certain opinionated upstream, and now all projects suddenly have their `pyproject.toml` files rewritten to look like shit, because opinionated upstream changed their mind, and decided that dotted <a href="https://social.treehouse.systems/tags/TOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TOML</span></a> table keys are no cool and it's better to inline everything into top-level tables. Which — I should point out — is against the style used in examples of every single <a href="https://social.treehouse.systems/tags/PEP517" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PEP517</span></a> build system out there.</p><p>Just a few examples where it happened (often via pre-commit hooks):</p><p><a href="https://github.com/pypa/virtualenv/commit/7cbed79924b6b6d953ca9ecf40de23a7d3486f57#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pypa/virtualenv/com</span><span class="invisible">mit/7cbed79924b6b6d953ca9ecf40de23a7d3486f57#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/django-commons/django-debug-toolbar/commit/2990290d43618df5eab357f2a36363186d51d5a8#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/django-commons/djan</span><span class="invisible">go-debug-toolbar/commit/2990290d43618df5eab357f2a36363186d51d5a8#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/pytest-dev/pytest/commit/5d5c9dc85850f64621190e62bd20d4b190bdbdb6#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/pytest-dev/pytest/c</span><span class="invisible">ommit/5d5c9dc85850f64621190e62bd20d4b190bdbdb6#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/prettytable/prettytable/commit/88bebdac122b82af255656513080bdd2c90098d9#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/prettytable/prettyt</span><span class="invisible">able/commit/88bebdac122b82af255656513080bdd2c90098d9#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/python-humanize/humanize/commit/aa3a94e011a795a0551717c5a78a566bc2672390#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/python-humanize/hum</span><span class="invisible">anize/commit/aa3a94e011a795a0551717c5a78a566bc2672390#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a><br><a href="https://github.com/termcolor/termcolor/commit/9e35c66ab7ad48a33d5c2829dbee02382aa716e5#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/termcolor/termcolor</span><span class="invisible">/commit/9e35c66ab7ad48a33d5c2829dbee02382aa716e5#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711</span></a></p><p><a href="https://social.treehouse.systems/tags/Gentoo" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Gentoo</span></a> <a href="https://social.treehouse.systems/tags/Python" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Python</span></a></p>
C.<p>Tonight's example, that finally got me to toot about it... packaging.</p><p>The <a href="https://mindly.social/tags/poetry" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>poetry</span></a> documentation for <a href="https://mindly.social/tags/pyproject" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyproject</span></a>.toml describes the <a href="https://mindly.social/tags/include" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>include</span></a> and <a href="https://mindly.social/tags/exclude" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>exclude</span></a> config lists. exclude is <a href="https://mindly.social/tags/automagically" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>automagically</span></a> pre-populated with the entries from your VCS ignore file, but, and I quote:</p><p> "Explicitly declaring entries in include will negate VCS' ignore settings."</p><p>Wanna bet on it? I have an entry in my .gitignore file for `docs`. I explicitly list it in `include`.</p><p>3/x</p><p><a href="https://mindly.social/tags/TOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TOML</span></a> <a href="https://mindly.social/tags/PyProjectTOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>PyProjectTOML</span></a></p>
Wolf<p>Ugh, prematurely published. For <a href="https://hachyderm.io/tags/pixi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pixi</span></a> or <a href="https://hachyderm.io/tags/pyprojecttoml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyprojecttoml</span></a> users, what’s the first thing I should change to make progress?</p>
Wolf<p>I want <a href="https://hachyderm.io/tags/pixi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pixi</span></a> to build me a vent. I’ll use it in <a href="https://hachyderm.io/tags/pycharm" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pycharm</span></a> to start but later <a href="https://hachyderm.io/tags/pyinstaller" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyinstaller</span></a>. Pixi wants to build things. It’s mad about A which can’t be built. It’s mad about my app, down inside B. Doesn’t like that my <a href="https://hachyderm.io/tags/pyprojecttoml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyprojecttoml</span></a> is not at the top of B. Doesn’t like that my app can’t be built. My virtual environment has all the external packages it needs, but isn’t working in PyCharm because it doesn’t have any of the things I need from A. </p><p>My app _will_ be getting a repo of its own.</p>
Wolf<p>I’m doing many things in <a href="https://hachyderm.io/tags/pixi" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pixi</span></a> that must be wrong because no one discusses them. I have two repos, A and B sitting right next to each other in my file system. Both repos are full of modules that get used here and there. B uses lots of things from A. My actual app lives several directories down inside B. In _that_ directory I have put my <a href="https://hachyderm.io/tags/pyprojecttoml" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyprojecttoml</span></a>. There happen to be other directories next to it. A has no setup.py nor pyproject.toml. Neither A nor B get “built”. </p><p>1/2</p>
Stephan Druskat<p>At <a href="https://scholar.social/tags/HMCDialogue" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>HMCDialogue</span></a> webinar, learning about a new "single source of truth" format &amp; tool for keeping <a href="https://scholar.social/tags/ResearchSoftware" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ResearchSoftware</span></a> <a href="https://scholar.social/tags/Metadata" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Metadata</span></a> up-to-date across formats: <a href="https://scholar.social/tags/CitationCFF" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CitationCFF</span></a> (<a href="https://scholar.social/tags/CitationFileFormat" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CitationFileFormat</span></a>), <a href="https://scholar.social/tags/CodeMeta" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CodeMeta</span></a>, <a href="https://scholar.social/tags/pyprojectTOML" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>pyprojectTOML</span></a>, etc.</p><p><a href="https://materials-data-science-and-informatics.github.io/somesy/v0.1.0/" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">materials-data-science-and-inf</span><span class="invisible">ormatics.github.io/somesy/v0.1.0/</span></a></p><p><span class="h-card" translate="no"><a href="https://helmholtz.social/@helmholtz_hmc" class="u-url mention" rel="nofollow noopener" target="_blank">@<span>helmholtz_hmc</span></a></span></p>
Ratul Maharaj<p>I’ve been loving using <a href="https://fosstodon.org/tags/hatch" class="mention hashtag" rel="tag">#<span>hatch</span></a> when doing anything in python. </p><p>The way environments work can be a bit confusing at first. I was tempted to activate them and then `pip install` things myself but turns out you don’t need to worry about it at all. You basically just add your dependencies to the pyproject.toml file and hatch takes care of the rest.</p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyprojecttoml" class="mention hashtag" rel="tag">#<span>pyprojecttoml</span></a> <a href="https://fosstodon.org/tags/packaging" class="mention hashtag" rel="tag">#<span>packaging</span></a> <a href="https://fosstodon.org/tags/development" class="mention hashtag" rel="tag">#<span>development</span></a> <a href="https://fosstodon.org/tags/programming" class="mention hashtag" rel="tag">#<span>programming</span></a> <a href="https://fosstodon.org/tags/code" class="mention hashtag" rel="tag">#<span>code</span></a></p>
Ratul Maharaj<p>I think I’m starting to like this pyproject.toml thing 🤔</p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://fosstodon.org/tags/pyprojecttoml" class="mention hashtag" rel="tag">#<span>pyprojecttoml</span></a> <a href="https://fosstodon.org/tags/toml" class="mention hashtag" rel="tag">#<span>toml</span></a> <a href="https://fosstodon.org/tags/development" class="mention hashtag" rel="tag">#<span>development</span></a> <a href="https://fosstodon.org/tags/package" class="mention hashtag" rel="tag">#<span>package</span></a> <a href="https://fosstodon.org/tags/application" class="mention hashtag" rel="tag">#<span>application</span></a></p>
Serge Matveenko ⚠️ moved<p>&quot;Let&#39;s face it, the &quot;PyPA’s stance&quot; is just an opinion of a small number of community members which clearly contradicts the process actually happening in the community and the request for that being highly spread.&quot;</p><p><a href="https://github.com/python/mypy/issues/5205#issuecomment-786556051" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/python/mypy/issues/</span><span class="invisible">5205#issuecomment-786556051</span></a></p><p><a href="https://fosstodon.org/tags/python" class="mention hashtag" rel="tag">#<span>python</span></a> <a href="https://fosstodon.org/tags/pypa" class="mention hashtag" rel="tag">#<span>pypa</span></a> <a href="https://fosstodon.org/tags/mypy" class="mention hashtag" rel="tag">#<span>mypy</span></a> <a href="https://fosstodon.org/tags/pyprojecttoml" class="mention hashtag" rel="tag">#<span>pyprojecttoml</span></a></p>