This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: venv activate bash script has wrong line endings on windows
Type: compile error Stage: resolved
Components: Library (Lib), Windows Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: venv activate bash script has wrong line endings in Windows
View: 32451
Assigned To: Nosy List: eryksun, jmoguill2, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-03-08 18:16 by jmoguill2, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg388276 - (view) Author: Jeff Moguillansky (jmoguill2) Date: 2021-03-08 18:16
when running python.exe -m venv on Windows,
It creates several activate scripts.
The activate bash script has the wrong line endings (it should be unix-style, not windows-style).
Bash scripts should always end with unix style line endings
msg388296 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2021-03-08 20:12
venv copies the scripts in binary mode, but apparently the Unix "activate" script already has CRLF line endings when Python is installed in Windows. Probably the POSIX "Lib/venv/scripts/common/activate" script needs a line-ending exception in ".gitattributes":

https://github.com/python/cpython/blob/master/.gitattributes
History
Date User Action Args
2022-04-11 14:59:42adminsetgithub: 87603
2021-03-17 19:58:00eryksunsetstatus: open -> closed
superseder: venv activate bash script has wrong line endings in Windows
resolution: duplicate
stage: resolved
2021-03-08 20:12:01eryksunsetversions: + Python 3.9, Python 3.10
nosy: + eryksun

messages: + msg388296

components: + Library (Lib)
2021-03-08 18:17:00jmoguill2create