coveragepy icon indicating copy to clipboard operation
coveragepy copied to clipboard

PythonFileReporter: do not expect files without a filename extension to contain Python code

Open jayaddison opened this issue 2 years ago • 7 comments

Possible fixup; could resolve #1488 (if that's confirmed to be a bug worth addressing).

jayaddison avatar Nov 16 '22 13:11 jayaddison

Awaits sphinx-doc/sphinx#11165 (or similar)

jayaddison avatar Feb 04 '23 19:02 jayaddison

@nedbat is this still valid?

ProsperousHeart avatar Mar 20 '23 19:03 ProsperousHeart

It's completely possible that it'll be made redundant by other changes, @ProsperousHeart - it's a fairly innocuous warning message that most people probably won't notice (and likely rarely indicates a genuine problem).

That said: I (for no good reason) have the time and energy to follow it, even if it takes months or years, so for me it remains relevant. It's less like the Sagrada Familia and more like a small signpost that's misaligned on a minor countryside road; we're aware of it and it can be fixed at some point.

(that analogy doesn't quite make sense, because in this case we're dependent on other signposts changing elsewhere.. it's an effort to explain it, though :shrug:)

jayaddison avatar Mar 28 '23 21:03 jayaddison

(a small note to mention that I continue to be interested in progressing this at some point. roughly speaking, the things on my tasklist ahead of this are: a bunch of Sphinx linkcheck-related changes (pending review, acceptance and stability assurance), before then refreshing and offering an updated Sphinx .jinja template suffix changeset, and then finally after that also being merged, accepted, proven stable -- optimistic perhaps -- then a revisit here)

jayaddison avatar Jun 19 '23 12:06 jayaddison

The Sphinx linkcheck-related changes I had in mind have been merged and release in Sphinx v7.1.0 - I'm going to wait for another week or two to allow time for any feedback and bugreports to arrive, and then I'll get started again on updating the Jinja template suffix logic... and then after that is complete, then this will be ready for reconsideration.

jayaddison avatar Jul 27 '23 15:07 jayaddison

I'm not fond of saying that ".jinja" means Python. As #1488 shows, the Python code made by Jinja will be named whatever the original template file was called. So it could be ".j2" or ".rst_t", etc.

nedbat avatar May 10 '24 00:05 nedbat

Yep, that makes sense. I'll revert 69e6ef0de4530c5c1b6ff687fcbfe1a2749c2019, also bringing the branch back into alignment with the issue description and this pull request's title.

jayaddison avatar May 10 '24 10:05 jayaddison

As I've mentioned in a bugreport comment a few moments ago, I don't think I had understood a detail about the extent of the requirement to support filenames without dotted suffixes - and so I think that this should indeed be closed. My apologies for being defensive about closing it; at the time I felt that this would be a long process but one that could be handled with co-ordination and updates solely in Sphinx.

jayaddison avatar Jul 20 '24 17:07 jayaddison