poetry shell unexpected behavior - spawning the "wrong" shell
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với entry point poetry -vvv shell trên Windows 10 và so sánh shell được khởi chạy với việc gọi trực tiếp đường dẫn Activate.ps1 được hiển thị. Tái hiện các prompt và cấu hình môi trường khác nhau, sau đó xác định hành vi shell mong đợi và xác minh rằng khác biệt cấu hình được báo cáo đã được giải quyết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- Poetry version: Poetry (version 1.2.1)
- Python version:
Poetry
Version: 1.2.1
Python: 3.10.5
Virtualenv
Python: 3.10.5
Implementation: CPython
Path: C:\Users\my_user\AppData\Local\pypoetry\Cache\virtualenvs\pyspark-write-demo-CwtTbJGc-py3.10
Executable: C:\Users\my_user\AppData\Local\pypoetry\Cache\virtualenvs\pyspark-write-demo-CwtTbJGc-py3.10\Scripts\python.exe
Valid: True
System
Platform: win32
OS: nt
Python: 3.10.5
Path: C:\Users\my_user\.pyenv\pyenv-win\versions\3.10.5
Executable: C:\Users\my_user\.pyenv\pyenv-win\versions\3.10.5\python.exe
- OS version and name: Windows 10 Enterprise 20H2
- pyproject.toml: https://gist.github.com/drorata/92a6408d62c44e21090dc612fae6dc80
- I am on the latest stable Poetry version, installed using a recommended method. *I believe that I installed it using
pipand that could be the reason of my issue. However, due to certificates issue and Co, I was not able to installpoetryusing(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -. - I have searched the issues of this repo and believe that this is not a duplicate.
- I have consulted the FAQ and blog for any relevant entries or release notes.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below.
Issue
When trying to activate the created environment using poetry -vvv shell I get:
Loading configuration file C:\Users\my_user\AppData\Roaming\pypoetry\config.toml
Loading configuration file C:\Users\my_user\AppData\Roaming\pypoetry\auth.toml
Using virtualenv: C:\Users\my_user\AppData\Local\pypoetry\Cache\virtualenvs\pyspark-write-demo-CwtTbJGc-py3.10
Spawning shell within C:\Users\my_user\AppData\Local\pypoetry\Cache\virtualenvs\pyspark-write-demo-CwtTbJGc-py3.10
C:\Users\my_user\dev\pyspark_write_demo>
The problem is that I get a new type of shell which is not working as I expect. Consider the following screen shot:

As you can see, the new prompt is different than the one where I execute poetry shell. In turn, the new shell doesn't have many configurations that I'd have in the original shell (e.g. the nice-looking prompt).
However, if I try to start the environment "directly":
C:/Users/my_user/AppData/Local/pypoetry/Cache/virtualenvs/pyspark-write-demo-Rmcv68Jg-py3.10/Scripts/Activate.ps1
I get the expected behavior as can be seen in the following image:

Why is this happening? What have I configured wrongly with Poetry?
- Ngôn ngữ chính
- Python
- Star
- 141
- Fork
- 10
- Merge trung bình
- 59 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-poetry/poetry-plugin-shell
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
python-poetry/poetry-plugin-shell#43 · 1 bình luận · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
python-poetry/poetry-plugin-shell#42 · 4 bình luận · 15 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
python-poetry/poetry-plugin-shell#40 · 4 bình luận · 2 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
python-poetry/poetry-plugin-shell#37 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
python-poetry/poetry-plugin-shell#34 · 1 bình luận ·
Tất cả issue của python-poetry/poetry-plugin-shell
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
PedestrianDynamics/pyFDS-Evac#343 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
theskumar/python-dotenv#708 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Docs Timedelta
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pandas-dev/pandas#69919 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
API documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
zephyrproject-rtos/west#1009 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày