Skip to content

Conversation

@ItsDrike
Copy link
Contributor

@ItsDrike ItsDrike commented Nov 9, 2021

Rather than defining 2 files for dependencies (requrements.txt and test-requirements.txt) along with another file for packaging (setup.py), we can merge all of these into a single pyproject.toml and manage both dependencies and packaging with single tool. Poetry is a very widely used tool and it's very versatile, unless there is some specific reason you'd have to avoid it, I think switching to it makes sense.

TODO

  • Add pyproject.toml containing needed dependencies and packaging info
  • Integrate poetry intorelease.sh
  • Update tox.ini to play nicely with poetry

@ItsDrike ItsDrike marked this pull request as draft November 9, 2021 21:15
- `stream` variable was declared in try block and then accessed in a
  `finally` block. This could result in stream not being defined in the
  finally block and even though this was technically handled by
  try-except with BaseException handle, this is very unpythonic and
  causes issues with pytype.
- Rather than catching baseexception that would catch undefined
  variables, the variable should be pre-defined to `None` and only
  accessed if it isn't None in the finally block
@kevinkjt2000
Copy link
Collaborator

I love poetry! ❤️

unless there is some specific reason you'd have to avoid it,

PEP-517 / 518 did not allow for editable installs of pyproject.toml based files. Which is a deal-breaker for anyone who is trying to integrate an editable install of a poetry-managed project into a non-poetry-managed project. Granted, this might not be an issue within this community. A workaround is to build and install a distribution each time an edit is made. Enough upvotes and I'll assume the community is okay with this.

I'd love to integrate setuptools-scm someday when I have some free time for this project, but poetry's plugin system may not have the support yet (it's been at least 2-3 months since I last checked). My eye is on https://github.com/mtkennerly/poetry-dynamic-versioning. Poetry 1.2 is slated to have most of the building blocks that plugins need, but it's still in alpha https://github.com/python-poetry/poetry/releases/tag/1.2.0a2. I could wait longer on this.

I feel as if I just talked myself into not worrying about my 2 concerns. I'll review.

@ItsDrike ItsDrike marked this pull request as ready for review November 9, 2021 22:58
ItsDrike and others added 3 commits November 9, 2021 23:22
Co-authored-by: Kevin Tindall <kevinkjt2000@users.noreply.github.com>
@kevinkjt2000 kevinkjt2000 merged commit 88f7a32 into Dinnerbone:master Nov 10, 2021
@ItsDrike ItsDrike deleted the poetry branch November 10, 2021 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants