[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Adrian Freund added the comment: I also need this feature for something I'm working on, so I looked into it a bit and pushed a small proof of concept implementation to GitHub (See PR 31391). I'm not sure if I'll have enough time to finish and clean up this implementation, but

[issue46779] Add ssl.CERT_REQUIRED_NO_VERIFY as possible value for ssl.SSLContext.verify_mode

2022-02-17 Thread Adrian Freund
New submission from Adrian Freund : Some networked applications might require connecting to client with invalid certificates but still requiring the client to send a certificate. ssl.SSLContext.verify_mode currently supports the following options: ssl.CERT_NONE: Don't require the clie

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Change by Adrian Freund : -- keywords: +patch pull_requests: +29536 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31391 ___ Python tracker <https://bugs.python.org/issu

[issue31242] Add SSLContext.set_verify_callback()

2022-02-17 Thread Adrian Freund
Change by Adrian Freund : -- nosy: +freundTech ___ Python tracker <https://bugs.python.org/issue31242> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

2021-04-30 Thread Adrian Freund
Adrian Freund added the comment: I already brought this up on the main pattern matching issue some time ago (https://bugs.python.org/issue42128#msg388554), where the consensus was that not using a Name is consistent with other parts of the ast, such as `import ... as identifier`, `except

[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Adrian Freund
Change by Adrian Freund : -- nosy: +freundTech ___ Python tracker <https://bugs.python.org/issue43892> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-10 Thread Adrian Freund
Adrian Freund added the comment: I think for namedtuple a short mention in the opening paragraph, where it also mentions the generation of a docstring and __repr__ method should be enough. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-09 Thread Adrian Freund
Adrian Freund added the comment: I agree that __match_args__ shouldn't have to be added to the documentation of any class that supports it, however dataclass and (maybe to a lesser extend) NamedTuple aren't themselves classes, but aid in creating own classes. Their effects

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-09 Thread Adrian Freund
Adrian Freund added the comment: > I assume the OP wants to have a class that doesn't allow positional patterns. > The right way to spell that is indeed to add > >__match_args__ = () > >to the class, there's no need to add another flag to @dataclass. The same

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-07 Thread Adrian Freund
Adrian Freund added the comment: Ok. I created https://bugs.python.org/issue43764 for that. -- ___ Python tracker <https://bugs.python.org/issue43761> ___ ___

[issue43764] Turning off generation of __match_args__ for dataclasses

2021-04-07 Thread Adrian Freund
New submission from Adrian Freund : The dataclass decorator can take multiple parameters to enable or disable the generation of certain methods. PEP 634 Structural Pattern Matching extends dataclasses to also generate a __match_args__ attribute. I think adding a parameter to enable and

[issue43761] Documenting dataclass and namedtuple changes for structural pattern matching

2021-04-07 Thread Adrian Freund
New submission from Adrian Freund : PEP 634 structural pattern matching adds an auto-generated __match_args__ attribute to classes with the dataclass decorator and to namedtuples. This change is currently not documented in the dataclass and namedtuple documentation, nor is it mentioned in

[issue42128] Structural Pattern Matching (PEP 634)

2021-03-12 Thread Adrian Freund
Adrian Freund added the comment: Thanks for the response. Looks like I overlooked the imports, global, nonlocal, ... because I only searched for usages of identifier, but they use lists of identifiers. In that case I agree that it isn't inconsi

[issue42128] Structural Pattern Matching (PEP 634)

2021-03-12 Thread Adrian Freund
Adrian Freund added the comment: For the last few days I've been working with pattern matching and it's ast for a bit, while trying to add support for it to mypy. During this I noticed an inconsistency in the ast: ast.MatchAs has an attribute name which is of type identifier (in C