Skip to content

gh-103088: fix activate script not working in Cygwin #103470

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 4 commits into from
Apr 12, 2023
Merged

gh-103088: fix activate script not working in Cygwin #103470

merged 4 commits into from
Apr 12, 2023

Conversation

Zabolekar
Copy link
Contributor

@Zabolekar Zabolekar commented 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
@zooba
Copy link
Member

zooba commented Apr 12, 2023

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.

@Zabolekar Zabolekar requested a review from vsajip as a code owner April 12, 2023 16:32
@Zabolekar
Copy link
Contributor Author

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

Test added.

Copy link
Member

@zooba zooba left a 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.

@zooba zooba merged commit 2b6e877 into python:main Apr 12, 2023
@bedevere-bot
Copy link

⚠️⚠️⚠️ 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

@bedevere-bot
Copy link

⚠️⚠️⚠️ 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

@bedevere-bot
Copy link

⚠️⚠️⚠️ 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

@zooba
Copy link
Member

zooba commented Apr 12, 2023

Buildbot failures are being discussed in the bug #103088

aisk pushed a commit to aisk/cpython that referenced this pull request Apr 18, 2023
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.

3 participants