Issue 40518: ValueError when using resource.setrlimit on macOS Catalina

Hello, I'm having trouble when using `resource.setrlimit` on macOS.

```
import resource
resource.setrlimit(resource.RLIMIT_STACK, resource.getrlimit(resource.RLIMIT_STACK))
```

Running this code gives the following error:

```
Traceback (most recent call last):
  File "main.py", line 2, in <module>
    resource.setrlimit(resource.RLIMIT_STACK, resource.getrlimit(resource.RLIMIT_STACK))
ValueError: current limit exceeds maximum limit
```

I ran the same code in my linux environment and it worked.

* macOS Catalina 10.15.4 (19E287)
* `python --version` : Python 3.7.7

Thanks.
See the long discussion in Issue34602 for more details. The investigation there showed that there are now conditions when running in newer versions of macOS (apparently as of 10.14.4) where trying to increase the stack limit at run time using resource.RLIMIT_STACK fails.  If you do need to increase the stack limit, to handle deeper recusions etc, one solution is to rebuild Python for macOS with a larger stack size as shown in PR 14546 rather than trying to change it at runtime.