[issue43322] Inconsistent '#include' notation in extensions tutorial doc

2021-03-13 Thread Matthew Hughes
Change by Matthew Hughes : -- keywords: +patch pull_requests: +23612 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24851 ___ Python tracker <https://bugs.python.org/issu

[issue43322] Inconsistent '#include' notation in extensions tutorial doc

2021-02-25 Thread Matthew Hughes
New submission from Matthew Hughes : Just a small thing in these docs, there is a mix of "#include ", e.g. https://github.com/python/cpython/blame/master/Doc/extending/newtypes_tutorial.rst#L243 and '#include "structmember.h"', mostly in the included samples e.g. https

[issue41255] Argparse.parse_args exits on unrecognized option with exit_on_error=False

2020-07-09 Thread Matthew Hughes
Matthew Hughes added the comment: I've attached a patch containing tests showing the current behavior, namely that exit_on_error does not change the behavior of argparse.ArgumentParser.parse_args in either case: * An unrecognized option is given * A required option is not given Should

[issue41255] Argparse.parse_args exits on unrecognized option with exit_on_error=False

2020-07-09 Thread Matthew Hughes
Matthew Hughes added the comment: > typo in the docs that it should have used enabled instead of enable Well spotted, I'll happily fix this up. > I guess the docs by manually mean that ArgumentError will be raised when > exit_on_error is False that can be handled. To be clear, in

[issue41255] Argparse.parse_args exits on unrecognized option with exit_on_error=False

2020-07-09 Thread Matthew Hughes
New submission from Matthew Hughes : >>> import argparse >>> parser = argparse.ArgumentParser(exit_on_error=False) >>> parser.parse_args(["--unknown"]) usage: [-h] : error: unrecognized arguments: --unknown The docs https://docs.pytho

[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2020-07-08 Thread Matthew Hughes
Change by Matthew Hughes : -- pull_requests: +20541 pull_request: https://github.com/python/cpython/pull/21393 ___ Python tracker <https://bugs.python.org/issue37

[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2020-07-03 Thread Matthew Hughes
Matthew Hughes added the comment: Whoops, I realise the patch I shared contained a combination of two (independent) approaches I tried: 1. Add sleep and perform cleanup 2. Naively patch catch_threading_exception to accept a cleanup routine to be run upon exiting but before removing

[issue37322] test_ssl: test_pha_required_nocert() emits a ResourceWarning

2020-07-03 Thread Matthew Hughes
Matthew Hughes added the comment: I noticed this test was still emitting a "ResourceWarning": -- $ ./python -m test test_ssl -m TestPostHandshakeAuth 0:00:00 load avg: 0.74 Run tests sequentially 0:00:00 load avg:

[issue41195] Interface to OpenSSL's security level

2020-07-02 Thread Matthew Hughes
Change by Matthew Hughes : -- pull_requests: +20431 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21282 ___ Python tracker <https://bugs.python.org/issu

[issue41195] Interface to OpenSSL's security level

2020-07-02 Thread Matthew Hughes
Matthew Hughes added the comment: > Applications should not change this setting > A read-only getter for the policy sounds like a good idea, though. Thanks for the feedback, sounds reasonable to me. I'll happily work on getting a PR up for the read-only

[issue41195] Interface to OpenSSL's security level

2020-07-02 Thread Matthew Hughes
New submission from Matthew Hughes : While investigating Python's SSL I noticed there was no interface for interacting with OpenSSL's SSL_CTX_{get,set}_security_level (https://www.openssl.org/docs/manmaster/man3/SSL_CTX_get_security_level.html) so I thought I'd look into adding one (see