vfs: modernize the detection of the main thread
There weren't a lot of good choices when py27 was supported, but starting with
py34, `threading.main_thread()` is available. This gets us away from an
undocumented, internal symbol, and drops a pytype suppression statement. It is
also apparently no longer reliable after a process fork.[1][2]
[1] https://stackoverflow.com/a/
23207116
[2] https://github.com/python/cpython/blob/v3.6.3/Lib/threading.py#L1334
store: fix a signature mismatch for a vfs subclass
This was flagged by PyCharm. I'm not sure why pytype doesn't catch this- it's
not excluded from the modules that are currently checked.
lfs: fix various signature mismatches for vfs subclasses
These were flagged by PyCharm. I'm not sure why pytype doesn't catch these-
only `hgext/lfs/__init__.py` in the lfs extension is excluded from being
checked.
I'm not sure if the `*insidef` arg to `join()` was meant as an internal
convencience, because I see another class that gets flagged for the same
signature problem (to be fixed next). But I don't feel bold enough to make this
an internal function, and provide a simplified public `join()` on the `vfs`
classes. That can still be done later, if desired. For now, process the
additional args and pass them along, even though there don't appear to be any
current callers that provide extra args to these classes. We need all of the
subclasses to agree on the signature, or they won't be considered to implement
the `Vfs` protocol being developed.
While we're copy/pasting from the base class, bring the type annotations along
for the ride.
util: add a comment to suppress a PyCharm warning about a PEP 8 violation
Slowly trying to get rid of silly warnings, so that real problems aren't hidden.
keepalive: fix a signature mismatch for a http.client.HTTPResponse subclass
Also flagged by PyCharm. This is checked by pytype too, so I'm not sure why it
misses this. I verified in py36 that this argument is documented for the
function, so maybe this is py2 legacy.
profiling: document the py-spy value for `profiling.type`
The feature was not visible otherwise.