| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
It is now a positive integer larger larger than any limited resource value. This simplifies comparison of the resource values. Previously, it could be negative, such as -1 or -3, depending on platform.
There was a problem hiding this comment.
OK, let's do this. It's the practical thing to do; if there are platforms that conform to POSIX in more interesting ways then we'll hopefullly notice in the 3.15 cycle.
Sorry, something went wrong.
| :data:`resource.RLIM_INFINITY` is now always a positive integer larger than | ||
| any limited resource value. This simplifies comparison of the resource | ||
| values. Previously, it could be negative, such as -1 or -3, depending on | ||
| platform. |
There was a problem hiding this comment.
I don't think we test/guarantee that RLIM_INFINITY is bigger than limited values. AFAIK, POSIX would have no problem with RLIM_INFINITY being zero.
So, this should be:
| :data:`resource.RLIM_INFINITY` is now always a positive integer larger than | |
| any limited resource value. This simplifies comparison of the resource | |
| values. Previously, it could be negative, such as -1 or -3, depending on | |
| platform. | |
| :data:`resource.RLIM_INFINITY` is now always a positive integer. | |
| Previously, it could be negative, such as -1 or -3, depending on | |
| platform. |
or:
| :data:`resource.RLIM_INFINITY` is now always a positive integer larger than | |
| any limited resource value. This simplifies comparison of the resource | |
| values. Previously, it could be negative, such as -1 or -3, depending on | |
| platform. | |
| :data:`resource.RLIM_INFINITY` is now always a positive integer. | |
| On supported platforms, it is larger than any limited resource value, | |
| which simplifies comparison of the resource values. | |
| Previously, it could be negative, such as -1 or -3, depending on | |
| platform. |
Sorry, something went wrong.
There was a problem hiding this comment.
https://pubs.opengroup.org/onlinepubs/9799919799/functions/getrlimit.html
The value RLIM_INFINITY, defined in <sys/resource.h>, shall be considered to be larger than any other limit value.
Sorry, something went wrong.
There was a problem hiding this comment.
To be clear, I do not think this should have been merged without this change.
Sorry, something went wrong.
|
This seems to have broken test_resource on 32-bit Linux; see for example https://buildbot.python.org/#/builders/1245/builds/6166 FAIL: test_fsize_not_too_big (test.test_resource.ResourceTest.test_fsize_not_too_big)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-debian-x86.nondebug/build/Lib/test/test_resource.py", line 133, in test_fsize_not_too_big
self.assertEqual(resource.getrlimit(resource.RLIMIT_FSIZE), expected(2**32))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Tuples differ: (18446744073709551615, 18446744073709551615) != (4294967296, 18446744073709551615)
First differing element 0:
18446744073709551615
4294967296
- (18446744073709551615, 18446744073709551615)
? -- ^^^^^^^ --- --
+ (4294967296, 18446744073709551615)
? ++ + ^
|
Sorry, something went wrong.
…ythonGH-137511)" This reverts commit 0324c72.
…H-137511) It is now a positive integer larger larger than any limited resource value. This simplifies comparison of the resource values. Previously, it could be negative, such as -1 or -3, depending on platform. Deprecation warning is emitted if the old negative value is passed.
| Back | FazBrowse Home | New Git URL |
It is now a positive integer larger than any limited resource value. This simplifies comparison of the resource values. Previously, it could be negative, such as -1 or -3, depending on platform.