Skip to content

Promote PyYaml to a direct dependency #833

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

Merged
merged 2 commits into from
Oct 8, 2022
Merged

Conversation

heindsight
Copy link
Contributor

After installing in a fresh Python virtual environment, tmuxp fails with ModuleNotFoundError: No module named 'yaml'. This happens because since switching from kaptan to ConfigReader, PyYaml is no longer pulled in as a transitive dependency. Adding PyYaml as a direct "main" dependency should fix this.

@tony tony self-requested a review October 8, 2022 15:23
@tony
Copy link
Member

tony commented Oct 8, 2022

@heindsight This makes sense and we need to do this now kaptan is removed (#828)

I will fast track this

@codecov
Copy link

codecov bot commented Oct 8, 2022

Codecov Report

Merging #833 (dd56d61) into master (21b1ef0) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #833   +/-   ##
=======================================
  Coverage   75.45%   75.45%           
=======================================
  Files          19       19           
  Lines        1434     1434           
  Branches      331      331           
=======================================
  Hits         1082     1082           
  Misses        265      265           
  Partials       87       87           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

After installing in a fresh Python virtual environment, `tmuxp` fails
with `ModuleNotFoundError: No module named 'yaml'`.
This happens because since switching from `kaptan` to `ConfigReader`,
`PyYaml` is no longer pulled in as a transitive dependency.
Adding `PyYaml` as a direct "main" dependency should fix this.
@tony tony merged commit eed6a5c into tmux-python:master Oct 8, 2022
@heindsight heindsight deleted the yaml-dep branch October 8, 2022 15:34
@heindsight
Copy link
Contributor Author

Thanks @tony

@tony
Copy link
Member

tony commented Oct 8, 2022

@heindsight vice versa

Bikeshed: Do these pins matter to you? (I don't have python 3.11 on my system quite yet)

When I run poetry update they are removed (though I preserved them by hand in v1.16.2):

diff --git a/poetry.lock b/poetry.lock
index ed9b1b0..c2b28b8 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1420,13 +1420,6 @@ PyYAML = [
     {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"},
     {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"},
     {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"},
-    {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"},
-    {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"},
-    {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"},
-    {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"},
-    {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"},
-    {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"},
-    {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"},
     {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"},
     {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"},
     {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"},

Copy link
Member

@tony tony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and good catch

@tony
Copy link
Member

tony commented Oct 8, 2022

@heindsight This is live in https://pypi.org/project/tmuxp/1.16.2/

Better now?

@heindsight
Copy link
Contributor Author

@heindsight vice versa

Bikeshed: Do these pins matter to you? (I don't have python 3.11 on my system quite yet)

When I run poetry update they are removed (though I preserved them by hand in v1.16.2):

diff --git a/poetry.lock b/poetry.lock
index ed9b1b0..c2b28b8 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1420,13 +1420,6 @@ PyYAML = [
     {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"},
     {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"},
     {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"},
-    {file = "PyYAML-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358"},
-    {file = "PyYAML-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1"},
-    {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d"},
-    {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f"},
-    {file = "PyYAML-6.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782"},
-    {file = "PyYAML-6.0-cp311-cp311-win32.whl", hash = "sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7"},
-    {file = "PyYAML-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf"},
     {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"},
     {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"},
     {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"},

No, they're not important to me at all. They were automatically added when I ran poetry add pyyaml and I didn't think it was necessary to bother manually removing them.

@heindsight This is live in https://pypi.org/project/tmuxp/1.16.2/

Better now?

Much better. Thanks 👍

@tony
Copy link
Member

tony commented Oct 8, 2022

No, they're not important to me at all. They were automatically added when I ran poetry add pyyaml and I didn't think it was necessary to bother manually removing them.

Noted, and excellent it's working now

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