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

Windows: test_platform.test_architecture_via_symlink() regression #72246

Closed
vstinner opened this issue Sep 10, 2016 · 7 comments
Closed

Windows: test_platform.test_architecture_via_symlink() regression #72246

vstinner opened this issue Sep 10, 2016 · 7 comments
Assignees

Comments

@vstinner
Copy link
Member

BPO 28059
Nosy @pfmoore, @vstinner, @tjguk, @zware, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/zooba'
closed_at = <Date 2016-09-10.19:25:26.597>
created_at = <Date 2016-09-10.08:13:18.315>
labels = ['OS-windows']
title = 'Windows: test_platform.test_architecture_via_symlink() regression'
updated_at = <Date 2016-09-10.19:25:26.596>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2016-09-10.19:25:26.596>
actor = 'python-dev'
assignee = 'steve.dower'
closed = True
closed_date = <Date 2016-09-10.19:25:26.597>
closer = 'python-dev'
components = ['Windows']
creation = <Date 2016-09-10.08:13:18.315>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 28059
keywords = []
message_count = 7.0
messages = ['275596', '275651', '275659', '275661', '275663', '275682', '275683']
nosy_count = 6.0
nosy_names = ['paul.moore', 'vstinner', 'tim.golden', 'python-dev', 'zach.ware', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue28059'
versions = []

@vstinner
Copy link
Member Author

It looks like test_platform started to fail on AMD64 Windows10 3.x between build 1456 (success) and 1458 (failure, 1457 was interrupted or something like that).

The regression may be related to the issue bpo-27932, change 31b7eaff5588.

http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1458/steps/test/logs/stdio

======================================================================
FAIL: test_architecture_via_symlink (test.test_platform.PlatformTest)
----------------------------------------------------------------------

Traceback (most recent call last):
  File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_platform.py", line 33, in test_architecture_via_symlink
    self.assertEqual(get(real), get(link))
AssertionError: Tuples differ: (b"('64bit', 'WindowsPE')\r\n", None) != (b'', None)

First differing element 0:
b"('64bit', 'WindowsPE')\r\n"
b''

  • (b"('64bit', 'WindowsPE')\r\n", None)
    + (b'', None)

----------------------------------------------------------------------

@vstinner
Copy link
Member Author

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2553/steps/test/logs/stdio

test_architecture_via_symlink (test.test_platform.PlatformTest) ... Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\buildarea\3.x.bolen-windows8\build\lib\platform.py", line 501, in <module>
    import ctypes
  File "D:\buildarea\3.x.bolen-windows8\build\lib\ctypes\__init__.py", line 7, in <module>
    from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
FAIL

@zooba
Copy link
Member

zooba commented Sep 10, 2016

That's strange, win32 should always have _ctypes available. I'll try and take a look later today

@zooba zooba self-assigned this Sep 10, 2016
@zooba
Copy link
Member

zooba commented Sep 10, 2016

Though ctypes here is incorrect anyway. I really ought to rewrite it into the winapi module.

I'll revert the memory leak fix and fix the tests for b1, then look at converting it into a native function for b2.

@vstinner
Copy link
Member Author

Though ctypes here is incorrect anyway. I really ought to rewrite it into the winapi module.

I agree, it's much better to avoid ctypes in the stdlib.

@zooba
Copy link
Member

zooba commented Sep 10, 2016

This bug is entirely because _ctypes cannot be found when we launch from the symlink without also setting PYTHONPATH.

I've already removed the import of _ctypes, but I'll also set PYTHONPATH in the test as there's no reason to require only builtins here.

@python-dev
Copy link
Mannequin

python-dev mannequin commented Sep 10, 2016

New changeset 94563ec74e1d by Steve Dower in branch '3.5':
Closes bpo-28059: Fixes test_platform to set PYTHONPATH for .pyd files
https://hg.python.org/cpython/rev/94563ec74e1d

New changeset 3ec4feb52a5b by Steve Dower in branch 'default':
Closes bpo-28059: Fixes test_platform to set PYTHONPATH for .pyd files
https://hg.python.org/cpython/rev/3ec4feb52a5b

@python-dev python-dev mannequin closed this as completed Sep 10, 2016
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants