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
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
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
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
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'.
--
__
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
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
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
Change by Brian Skinn :
--
type: enhancement -> behavior
___
Python tracker
<https://bugs.python.org/issue37699>
___
___
Python-bugs-list mailing list
Un
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
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
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
Change by Brian Skinn :
--
nosy: +bskinn
___
Python tracker
<https://bugs.python.org/issue37134>
___
___
Python-bugs-list mailing list
Unsubscribe:
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] >>>
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
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
">>>
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
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.
&
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
Change by Brian Skinn :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue36695>
___
___
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
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
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
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
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
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
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
27 matches
Mail list logo