Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PoetrySession public #277

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft

Make PoetrySession public #277

wants to merge 18 commits into from

Conversation

cjolowicz
Copy link
Owner

@cjolowicz cjolowicz commented Feb 12, 2021

This PR makes PoetrySession a part of the public API. It also allows passing nox_poetry.Session to its constructor instead of nox.Session. The session.poetry attribute is deprecated in favor of the new access method.

There are two reasons why we might want to do this:

  1. Provide access to Poetry-related functionality in plain old Nox sessions.
  2. Avoid adding an attribute to the Nox session interface.

Note that the first goal could already be achieved by creating nox_poetry.Session explicitly. In that case, functions other than install would need to be accessed through the poetry attribute.

About the second point: It's not safe to assume that certain attributes will never be claimed by Nox. Also, any divergence from the Nox API means that this library is not a transparent wrapper for Nox sessions, and is apt to create confusion. Explicit is better than implicit, etc.

@cjolowicz cjolowicz added the enhancement New feature or request label Feb 12, 2021
@cjolowicz cjolowicz marked this pull request as draft February 12, 2021 22:48
@cjolowicz cjolowicz force-pushed the poetry-session branch 2 times, most recently from ae4ea7c to c5d348a Compare February 13, 2021 14:52
@cjolowicz cjolowicz changed the title Draft: Make PoetrySession public Make PoetrySession public Feb 13, 2021
@cjolowicz cjolowicz marked this pull request as ready for review February 13, 2021 14:53
Base automatically changed from master to main March 13, 2021 14:06
@cjolowicz cjolowicz force-pushed the poetry-session branch 2 times, most recently from 5b001b8 to eda0ff9 Compare March 13, 2021 22:43
@cjolowicz cjolowicz marked this pull request as draft November 15, 2021 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant