Skip to content

Conversation

@arhadthedev
Copy link
Member

@arhadthedevarhadthedev commented Jul 2, 2022

Please note that this commit also removes an old way to express optional parameters (it prevented the new style generation):

 /*[clinic input] resource.prlimit pid: pid_t resource: int - [- limits: object- ]+ limits: object = None / [clinic start generated code]*/

I hope it breaks nothing.

@arhadthedev
Copy link
MemberAuthor

arhadthedev commented Jul 2, 2022

I have no idea why resource module doesn't build on Ubuntu (a CI log contains neither compiler error nor any mention of the module name).

The failure manifests itself as a later inability to load a non-existent module in python -m unittest -v test.test_resource.ResourceTest.test_prlimit.

Running Release|x64 interpreter... Traceback (most recent call last): File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\test\support\import_helper.py", line 78, in import_module return importlib.import_module(name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1142, in _find_and_load_unlocked ModuleNotFoundError: No module named 'resource' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\__main__.py", line 18, in <module> main(module=None) ^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\main.py", line 101, in __init__ self.parseArgs(argv) ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\main.py", line 150, in parseArgs self.createTests() ^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\main.py", line 161, in createTests self.test = self.testLoader.loadTestsFromNames(self.testNames, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\loader.py", line 198, in loadTestsFromNames suites = [self.loadTestsFromName(name, module) for name in names] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\loader.py", line 198, in <listcomp> suites = [self.loadTestsFromName(name, module) for name in names] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\unittest\loader.py", line 132, in loadTestsFromName module = __import__(module_name) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\test\test_resource.py", line 9, in <module> resource = import_helper.import_module('resource') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\oleg\Documents\dev\notmine\cpython\Lib\test\support\import_helper.py", line 82, in import_module raise unittest.SkipTest(str(msg)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unittest.case.SkipTest: No module named 'resource' 

@arhadthedev
Copy link
MemberAuthor

The bug is fixed.

@zoobazooba merged commit a739ee4 into python:mainJul 29, 2022
@arhadthedevarhadthedev deleted the clinic-resource-deformat branch July 29, 2022 11:50
Sign up for freeto 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

@arhadthedev@zooba@bedevere-bot