Skip to content
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

[Cherrypick 4.2.0] Fix Windows tests for 4.2.0rc3 after Windows image update #13846

Conversation

meteorcloudy
Copy link
Member

@meteorcloudy meteorcloudy commented Aug 13, 2021

Cherrypick request for 4.2.0 (#13558).

Context: #13816

philwo and others added 2 commits August 13, 2021 16:49
…Python 3.9.

Overloading the "re" module causes weird errors on our new Windows VM image, probably because Python itself uses it for some purpose now. I noticed this in our Bazel CI testing area, so the new image is not yet live.

Let's try to use a module that's less core to Python, but still in the standard library - I picked "mailbox" after looking at the list of standard library modules.

Here's an example log from the failing test on the new image:

```
** test_source_file_does_not_override_standard_library *************************
[...]
Error processing line 1 of C:\Python3\lib\site-packages\protobuf-3.17.3-py3.9-nspkg.pth:

Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "C:\Python3\lib\site.py", line 169, in addpackage
    exec(line)
  File "<string>", line 1, in <module>
  File "C:\Python3\lib\importlib\util.py", line 2, in <module>
    from . import abc
  File "C:\Python3\lib\importlib\abc.py", line 17, in <module>
    from typing import Protocol, runtime_checkable
  File "C:\Python3\lib\typing.py", line 2203, in <module>
    Pattern = _alias(stdlib_re.Pattern, 1)
AttributeError: module 're' has no attribute 'Pattern'
```
PiperOrigin-RevId: 389572773
grep was upgraded to 3.5 after updating MSYS on Winodws VM, which no longer matches CRLF line endings with `$`.

Fixes bazelbuild#13816

RELNOTES: None
PiperOrigin-RevId: 389600750
@google-cla google-cla bot added the cla: yes label Aug 13, 2021
@meteorcloudy meteorcloudy changed the title 4.2.0rc3 windows fixes Fix Windows tests for 4.2.0rc3 after Windows image update Aug 13, 2021
@meteorcloudy meteorcloudy requested a review from katre August 13, 2021 14:55
@katre katre changed the title Fix Windows tests for 4.2.0rc3 after Windows image update [Cherrypick 4.2.0] Fix Windows tests for 4.2.0rc3 after Windows image update Aug 13, 2021
@katre katre mentioned this pull request Aug 13, 2021
9 tasks
@katre
Copy link
Member

katre commented Aug 13, 2021

Merged to release-4.2.0-patches (not release-4.2.0rc3).

@katre katre closed this Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants