Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(155701)

#16595: Add resource.prlimit

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years ago by lists
Modified:
6 years, 5 months ago
Reviewers:
pitrou
CC:
AntoinePitrou, haypo, giampaolo.rodola, christian.heimes, Arfrever, Charles-Fran├žois Natali, devnull_psf.upfronthosting.co.za, vajrasky
Visibility:
Public.

Patch Set 1 #

Total comments: 4

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
configure View 1 1 chunk +29 lines, -0 lines 0 comments Download
configure.ac View 1 1 chunk +10 lines, -0 lines 0 comments Download
Doc/library/resource.rst View 1 1 chunk +21 lines, -0 lines 0 comments Download
Doc/whatsnew/3.4.rst View 1 1 chunk +6 lines, -0 lines 0 comments Download
Lib/test/test_resource.py View 1 1 chunk +12 lines, -0 lines 0 comments Download
Modules/resource.c View 1 5 chunks +86 lines, -26 lines 0 comments Download
pyconfig.h.in View 1 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 1
AntoinePitrou
7 years ago #1
http://bugs.python.org/review/16595/diff/6723/Lib/test/test_resource.py
File Lib/test/test_resource.py (right):

http://bugs.python.org/review/16595/diff/6723/Lib/test/test_resource.py#newco...
Lib/test/test_resource.py:117: self.assertEqual(resource.prlimit(0,
resource.RLIMIT_AS), (-1, -1))
I'm not sure why it would always be -1. I think it depends on the environment.
So perhaps it would be more robust to simply compare with the getrlimit() return
value.

http://bugs.python.org/review/16595/diff/6723/Modules/resource.c
File Modules/resource.c (right):

http://bugs.python.org/review/16595/diff/6723/Modules/resource.c#newcode112
Modules/resource.c:112: #if !defined(HAVE_LARGEFILE_SUPPORT)
I don't understand what largefile support has to do with this (especially
considering the inverse function queries HAVE_LONG_LONG).

http://bugs.python.org/review/16595/diff/6723/Modules/resource.c#newcode240
Modules/resource.c:240: PyErr_SetString(PyExc_ValueError,
It's a pity we don't let Python 3.4 raise PermissionError instead.

http://bugs.python.org/review/16595/diff/6723/configure.ac
File configure.ac (right):

http://bugs.python.org/review/16595/diff/6723/configure.ac#newcode2856
configure.ac:2856: [AC_DEFINE(HAVE_PRLIMIT, 1, Define if you have the 'prlimit'
functions.)
s/functions/function/
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+