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

port uuid #4

Closed
wants to merge 2 commits into from
Closed

port uuid #4

wants to merge 2 commits into from

Conversation

thuibr
Copy link

@thuibr thuibr commented Nov 29, 2023

No description provided.

@thuibr
Copy link
Author

thuibr commented Nov 29, 2023

I want to try again from a clean version and add type hints from https://github.com/python/typeshed/blob/main/stdlib/uuid.pyi first, seeing what's left to add after that. Also, this gets all the way to ./build.py test_compiled uuid without failing but then I get FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pycompiled/__pycache__'. This is running on a Macbook Pro M1 and Python 3.11.5.

@thuibr thuibr marked this pull request as draft November 29, 2023 19:59
@thuibr
Copy link
Author

thuibr commented Nov 29, 2023

@tusharsadhwani does this work on your machine?

@tusharsadhwani
Copy link
Collaborator

Hey! Thanks for the port. Why didn't I think of using typeshed (and Microsoft's stubs) before!

That error is probably because of a bug in the build script. I'll take a look later today.

@tusharsadhwani
Copy link
Collaborator

@thuibr test_compiled had a tiny bug which got triggered in this case, but unfortunately after that went through, the tests failed in the test_compiled setup.

$ ./build.py test_compiled uuid
EEEEEssE.F.ssEEEEEssE.....EEEEEEsEsssEs...E..EEEEEEsEsssEs...E

[...]

FAILED (failures=1, errors=30, skipped=16)

@thuibr
Copy link
Author

thuibr commented Nov 30, 2023

Thank you for fixing that. I'm taking a look at the errors. I'm looking at the last one that shows up for me:

======================================================================
FAIL: test_parse_mac_aix (compiled_tests.test_uuid.TestInternalsWithExtModule.test_parse_mac_aix)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/pycompiled/compiled_tests/test_uuid.py", line 739, in test_parse_mac_aix
    self.check_parse_mac(True)
  File "/private/tmp/pycompiled/compiled_tests/test_uuid.py", line 712, in check_parse_mac
    self.assertEqual(self.uuid._parse_mac(mac), expected)
AssertionError: None != 280019184198404

----------------------------------------------------------------------
Ran 62 tests in 0.092s

FAILED (failures=1, errors=28, skipped=18)

I reckon that mock.patch does not work with the mypyc version, and that _MAC_DELIM is not actually set to b'.', causing the error.

@thuibr
Copy link
Author

thuibr commented Nov 30, 2023

@tusharsadhwani
Copy link
Collaborator

tusharsadhwani commented Dec 16, 2023

Sorry for the silence, I'll look into this later this month!

@thuibr
Copy link
Author

thuibr commented Dec 16, 2023

No worries! Maybe the folks at the mypyc project would have a solution.

@thuibr thuibr closed this by deleting the head repository Mar 23, 2024
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.

2 participants