[issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer

2021-11-29 Thread Brian Skinn
Brian Skinn added the comment: Indeed, I hadn't been thinking about the testing/maintenance burden to CPython or other implementations when I made the suggestion. I no longer have a strong opinion about this change, so I am happy to reject/close. -- resolution: -> reject

[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread Brian Skinn
Brian Skinn added the comment: Identifiers starting with two uppercase letters returns a HUGE list. >>> pat2 = re.compile(r"([.][A-Z][A-Z])[^.]*$") Filtering down by only those that contain.lower() "type": >>> pprint([obj.name for obj in inv.objec

[issue45391] 3.10 objects.inv classifies UnionType as data

2021-10-06 Thread Brian Skinn
Brian Skinn added the comment: If I understand the problem correctly, these mis-attributions of roles (to 'data' instead of 'class' come about when a thing that is technically a class is defined in source using simple assignment, as with UnionType. Problematic entries

[issue38029] Should io.TextIOWrapper raise an error at instantiation if a StringIO is passed as 'buffer'?

2019-09-04 Thread Brian Skinn
New submission from Brian Skinn : If I read the docs correctly, io.TextIOWrapper is meant to provide a str-typed interface to an underlying bytes stream. If a TextIOWrapper is instantiated with the underlying buffer=io.StringIO(), it breaks: >>> import io >>> tw

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn
Brian Skinn added the comment: On reflection, it would probably be better to limit the ELLIPSIS to 3 or 4 periods ('[.]{3,4}'); otherwise, it would be impossible to express an ellipsis followed by a period in a 'want'. -- __

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn
Brian Skinn added the comment: I suppose one alternative solution might be to tweak the ELLIPSIS feature of doctest, such that it would interpret a run of >=3 periods in a row (matching regex pattern of "[.]{3,}") as 'ellipsis'. The regex for PS2 could then have a n

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-08-09 Thread Brian Skinn
Brian Skinn added the comment: Mm, agreed--that regex wouldn't be hard to write. The problem is, AFAICT there's irresolvable syntactic ambiguity in a line starting with exactly three periods, if the doctest PS2 specification is not constrained to be exactly "... &q

[issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer

2019-07-28 Thread Brian Skinn
New submission from Brian Skinn : Once the underlying buffer/stream is .detach()ed from an instance of a subclass of TextIOBase or BufferedIOBase, accession of most attributes defined on TextIOBase/BufferedIOBase or the IOBase parent, as well as calling of most methods defined on TextIOBase

[issue37699] Explicit mention of raised ValueError's after .detach() of underlying IO buffer

2019-07-28 Thread Brian Skinn
Change by Brian Skinn : -- type: enhancement -> behavior ___ Python tracker <https://bugs.python.org/issue37699> ___ ___ Python-bugs-list mailing list Un

[issue37134] Use PEP570 syntax in the documentation

2019-06-06 Thread Brian Skinn
Brian Skinn added the comment: :thumbsup: Glad I happened to be in the right place at the right time to put it together. I'll leave the tabslash repo up for future reference. -- ___ Python tracker <https://bugs.python.org/is

[issue37134] Use PEP570 syntax in the documentation

2019-06-05 Thread Brian Skinn
Brian Skinn added the comment: Brett, to be clear, this sounds like the tabbed solution is not going to be used at this point? If so, I'll pull down the tabbed docs I'm hosting. -- ___ Python tracker <https://bugs.python.o

[issue37134] Use PEP570 syntax in the documentation

2019-06-05 Thread Brian Skinn
Brian Skinn added the comment: First, for anyone interested, there are screenshots and links to docs versions at the SC GH issue (https://github.com/python/steering-council/issues/12#issuecomment-498856524, and following) where we're exploring what the tabbed approach to the PEP570

[issue37134] [EASY] Use PEP570 syntax in the documentation

2019-06-04 Thread Brian Skinn
Change by Brian Skinn : -- nosy: +bskinn ___ Python tracker <https://bugs.python.org/issue37134> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-04-26 Thread Brian Skinn
Brian Skinn added the comment: Ahh, this *will* break some doctests: any with blank PS2 lines in the 'source' portion without the explicit trailing space: 1] >>> def foo(): 2] ...print("bar") 3] ... 4] ...print("baz") 5] >>>

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-24 Thread Brian Skinn
Brian Skinn added the comment: LOL. No special thanks necessary, that last post only turned into something coherent (and possibly correct, it seems...) after a LOT of diving into the source, fiddling with the code, and (((re-)re-)re-)writing! Believe me, it reads as a lot more knowledgeable

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-24 Thread Brian Skinn
Brian Skinn added the comment: Well, the warning content *itself* may not get passed through the displayhook at raise-time, in the process of being run through stderr and displayed by the REPL. But, when you capture the warning content with redirect_stderr(sio) and then ">>>

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-24 Thread Brian Skinn
Brian Skinn added the comment: The application of repr() (or a repr()-equivalent) appears to occur as some part of the exec(compile(...)) call within doctest (https://github.com/python/cpython/blob/4f5a3493b534a95fbb01d593b1ffe320db6b395e/Lib/doctest.py#L1328-L1329). On 3.6.6, in REPL

[issue36714] Tweak doctest 'example' regex to allow a leading ellipsis in 'want' line

2019-04-24 Thread Brian Skinn
New submission from Brian Skinn : doctest requires code examples have PS1 as ">>> " and PS2 as "... " -- that is, each is three printed characters, followed by a space: ``` $ cat ell_err.py import doctest class Foo: """Test docstring. &

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-23 Thread Brian Skinn
Brian Skinn added the comment: Thank you for taking the time to dig into it so deeply! -- ___ Python tracker <https://bugs.python.org/issue36695> ___ ___ Pytho

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-23 Thread Brian Skinn
Change by Brian Skinn : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue36695> ___ ___

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-23 Thread Brian Skinn
Brian Skinn added the comment: It looks to me like it's a standard feature of the CPython string rendering routines, where if single and double quotes are present in any string, the preferred rendering is enclosure with single quotes with escaped internal single quotes. On

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-22 Thread Brian Skinn
Brian Skinn added the comment: TBH, now that I've tweaked tox and CI just not to run the doctests on 3.8, I don't really need this to be fixed. This seems like such an edge case -- a doctest catching a warning with a message containing single quotes -- it might not really be

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-22 Thread Brian Skinn
Brian Skinn added the comment: , it seems like the problem must somehow stem from the new commit using frame.f_code.co_filename (or the C equivalent), instead of using __file__ as previously. Consider this warn2.py, similar to the other but with no single quotes in the warning message

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-22 Thread Brian Skinn
Brian Skinn added the comment: Here is warn.py, a minimal no-dependency repro script: ``` import doctest class Tester: r"""Provide docstring for testing. >>> import warnings >>> from contextlib import redirect_stderr >>> from

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-22 Thread Brian Skinn
Brian Skinn added the comment: Karthikeyan, my apologies for the slow reply -- I posted this right before I went to bed. To emphasize, the change to the formatting of the string contents, by adding the filename, I think is not problematic: I'm using ellipses to elide everything befor

[issue36695] Change (regression?) in v3.8.0a3 doctest output after capturing the stderr output from a raised warning

2019-04-21 Thread Brian Skinn
New submission from Brian Skinn : In [this project](https://github.com/bskinn/stdio-mgr) of mine, I have a tox matrix set up with Pythons from 3.3. to 3.8. I have pytest set up to run doctest on my [`README.rst`](https://github.com/bskinn/stdio-mgr/blob

[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True

2018-05-07 Thread Brian Skinn
Brian Skinn added the comment: I second Wolfgang's recommendation to change the default back to `False`. I started developing CLI apps &c. in Python ~4yrs ago; I dabbled briefly in 2.7, then switched firmly to Python 3. When I started, I was aimed at supporting 3.3 to 3.5