GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-103088: fix activate script not working in Cygwin by Zabolekar · Pull Request #103470 · python/cpython

Conversation

@Zabolekar

@Zabolekar Zabolekar commented Apr 12, 2023 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: If the working directory and the venv are on different disks, venv doesn't work in bash on Windows #103088

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Zabolekar
fix activate script not working in Cygwin
b7c5939
@bedevere-bot bedevere-bot added the awaiting review label Apr 12, 2023
@Zabolekar Zabolekar changed the title fix activate script not working in Cygwin gh-103088: fix activate script not working in Cygwin Apr 12, 2023
@bedevere-bot bedevere-bot mentioned this pull request Apr 12, 2023
If the working directory and the venv are on different disks, venv doesn't work in bash on Windows #103088
Closed
@blurb-it
📜🤖 Added by blurb_it.
11ad8e5
@zooba

zooba commented Apr 12, 2023

Copy link
Copy Markdown
Member

Can we add a test to the test_venv module for this?

Basically confirm that \r\n does not exist in the activate Bash script on any platform after a venv is created.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Zabolekar
add test to ensure that the activate script never contains CR LF
559f7ad
@Zabolekar
Zabolekar requested a review from vsajip as a code owner April 12, 2023 16:32
@Zabolekar

Zabolekar commented Apr 12, 2023

Copy link
Copy Markdown
Contributor Author

Can we add a test to the test_venv module for this?

Test added.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

zooba
zooba reviewed Apr 12, 2023
View reviewed changes

@zooba zooba left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Minor doc tweaks, I'll commit them myself and merge.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/test/test_venv.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Windows/2023-04-12-10-49-21.gh-issue-103088.Yjj-qJ.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@zooba
Apply suggestions from code review
53e5e4e
@zooba
zooba merged commit 2b6e877 into python:main Apr 12, 2023
@bedevere-bot bedevere-bot removed the awaiting review label Apr 12, 2023
@bedevere-bot

bedevere-bot commented Apr 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows10 3.x has failed when building commit 2b6e877.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/146/builds/4874) and take a look at the build logs.
  4. Check if the failure is related to this commit (2b6e877) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/146/builds/4874

Failed tests:

  • test_venv
  • test__xxsubinterpreters

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

399 tests OK.

10 slowest tests:

  • test_asyncio: 5 min 53 sec
  • test_math: 5 min 51 sec
  • test_multiprocessing_spawn: 4 min 6 sec
  • test_tokenize: 3 min 22 sec
  • test_wmi: 3 min 8 sec
  • test_lib2to3: 2 min 43 sec
  • test_capi: 2 min 35 sec
  • test_unparse: 2 min 25 sec
  • test_concurrent_futures: 1 min 54 sec
  • test_unicodedata: 1 min 31 sec

1 test failed:
test_venv

34 tests skipped:
test_clinic test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl
test_kqueue test_multiprocessing_fork
test_multiprocessing_forkserver test_nis test_openpty
test_ossaudiodev test_peg_generator test_perf_profiler test_pipes
test_poll test_posix test_pty test_pwd test_readline test_resource
test_spwd test_syslog test_threadsignals test_wait3 test_wait4
test_xxlimited test_xxtestfuzz test_zipfile64

2 re-run tests:
test__xxsubinterpreters test_venv

Total duration: 21 min 18 sec

Click to see traceback logs
Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\test\test_venv.py", line 627, in test_activate_shell_script_has_no_dos_newlines
    self.assertFalse(line.endswith(b'\r\n'), line)
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\unittest\case.py", line 720, in assertFalse
    msg = self._formatMessage(msg, "%s is not false" % safe_repr(expr))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\buildarea\3.x.bolen-windows10\build\Lib\unittest\case.py", line 746, in _formatMessage
    return '%s : %s' % (standardMsg, msg)
                                     ^^^
BytesWarning: str() on a bytes instance
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Apr 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 Windows 3.x has failed when building commit 2b6e877.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/729/builds/4150) and take a look at the build logs.
  4. Check if the failure is related to this commit (2b6e877) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/729/builds/4150

Failed tests:

  • test_venv

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

396 tests OK.

10 slowest tests:

  • test_math: 7 min 15 sec
  • test_asyncio: 6 min 36 sec
  • test_multiprocessing_spawn: 4 min 31 sec
  • test_lib2to3: 3 min 49 sec
  • test_tokenize: 3 min 49 sec
  • test_unparse: 2 min 54 sec
  • test_venv: 2 min 8 sec
  • test_capi: 2 min
  • test_compileall: 1 min 53 sec
  • test_concurrent_futures: 1 min 51 sec

1 test failed:
test_venv

37 tests skipped:
test_clinic test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl
test_kqueue test_multiprocessing_fork
test_multiprocessing_forkserver test_nis test_openpty
test_ossaudiodev test_peg_generator test_perf_profiler test_pipes
test_poll test_posix test_pty test_pwd test_readline test_resource
test_spwd test_syslog test_threadsignals test_tix test_tkinter
test_ttk test_wait3 test_wait4 test_xxlimited test_xxtestfuzz
test_zipfile64

1 re-run test:
test_venv

Total duration: 21 min 39 sec

Click to see traceback logs
Traceback (most recent call last):
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64\build\Lib\test\test_venv.py", line 627, in test_activate_shell_script_has_no_dos_newlines
    self.assertFalse(line.endswith(b'\r\n'), line)
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64\build\Lib\unittest\case.py", line 720, in assertFalse
    msg = self._formatMessage(msg, "%s is not false" % safe_repr(expr))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64\build\Lib\unittest\case.py", line 746, in _formatMessage
    return '%s : %s' % (standardMsg, msg)
                                     ^^^
BytesWarning: str() on a bytes instance
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Apr 12, 2023

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot ARM64 Windows Non-Debug 3.x has failed when building commit 2b6e877.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/730/builds/7410) and take a look at the build logs.
  4. Check if the failure is related to this commit (2b6e877) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/730/builds/7410

Failed tests:

  • test_venv

Summary of the results of the build (if available):

== Tests result: FAILURE then FAILURE ==

397 tests OK.

10 slowest tests:

  • test_asyncio: 3 min 29 sec
  • test_multiprocessing_spawn: 2 min 8 sec
  • test_concurrent_futures: 1 min 17 sec
  • test_socket: 1 min 6 sec
  • test_math: 51.8 sec
  • test_urllib2_localnet: 44.8 sec
  • test_venv: 43.2 sec
  • test_tokenize: 41.7 sec
  • test_mmap: 36.3 sec
  • test_io: 35.4 sec

1 test failed:
test_venv

36 tests skipped:
test_clinic test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_epoll test_fcntl test_fork1 test_gdb test_grp test_ioctl
test_kqueue test_multiprocessing_fork
test_multiprocessing_forkserver test_nis test_openpty
test_ossaudiodev test_peg_generator test_perf_profiler test_pipes
test_poll test_posix test_pty test_pwd test_readline test_resource
test_spwd test_syslog test_threadsignals test_tix test_tkinter
test_ttk test_wait3 test_wait4 test_xxtestfuzz test_zipfile64

1 re-run test:
test_venv

Total duration: 8 min 49 sec

Click to see traceback logs
Traceback (most recent call last):
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64.nondebug\build\Lib\test\test_venv.py", line 627, in test_activate_shell_script_has_no_dos_newlines
    self.assertFalse(line.endswith(b'\r\n'), line)
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64.nondebug\build\Lib\unittest\case.py", line 720, in assertFalse
    msg = self._formatMessage(msg, "%s is not false" % safe_repr(expr))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Workspace\buildarea\3.x.linaro-win-arm64.nondebug\build\Lib\unittest\case.py", line 746, in _formatMessage
    return '%s : %s' % (standardMsg, msg)
                                     ^^^
BytesWarning: str() on a bytes instance
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@zooba

zooba commented Apr 12, 2023

Copy link
Copy Markdown
Member

Buildbot failures are being discussed in the bug #103088

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aisk pushed a commit to aisk/cpython that referenced this pull request Apr 18, 2023
@Zabolekar @aisk
pythongh-103088: Fix virtual environment activate script not working …
90e3016
…in Cygwin (pythonGH-103470)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba left review comments
@vsajip vsajip Awaiting requested review from vsajip vsajip is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Zabolekar @zooba @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.