Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue28482>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Martin, I have opened a PR with your patch at python/typing
https://github.com/python/typing/pull/304
--
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
Here is the patch according to the discussion (modifying inspect).
I didn't change the rendering of docs for classes (neither stripped 'typing.'
nor changed __bases__ to __orig_bases__). First, collections.abc.X are widely
used as base classes
Ivan Levkivskyi added the comment:
For function annotations I did as originally proposed. In my previous comment I
was talking about documentation for classes. For example:
class C(Generic[T], Mapping[int, str]): ...
pydoc.render_doc(C)
will show "class C(typing.Mapping)".
while fo
Ivan Levkivskyi added the comment:
Actually, for classes, it is probably worth adding a separate section "Generic
type info" that will render information using __orig_bases__, __parameters__,
and __args__. At the same time the "header" will be the same as now, listing
runt
New submission from Ivan Levkivskyi:
It was proposed in the discussion of #27989 to update pydoc rendering of
documentation of classes supporting generic types.
Currently there are two ideas:
1. Keep the class header intact (i.e. listing actual runtime __bases__)
and adding a separate section
Ivan Levkivskyi added the comment:
Guido,
> Honestly I think it's better if this remains a "hidden" feature until we have
> support for it in mypy. So let's wait for that.
This patch now could be applied (since the
Ivan Pozdeev added the comment:
@haypo, as I said, it's undesirable to link to a 3rd party site in a built-in
error message because its availability and content are outside the dev team's
control.
--
___
Python tracker
<http://bu
Ivan Pozdeev added the comment:
What's wrong with the Python wiki link in msg263206 above? It is supposed to be
_the_ guide for setting up compilers in Windows, isn't it?
Ideally, this should be a link to `distutils' docs - because, you know, the
wiki isn't carved in ston
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue28556>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Ivan Levkivskyi:
This will remove one test from test_grammar that depends on typing module API
(this test case is already covered in test_typing).
--
components: Tests
files: test-grammar-patch.diff
keywords: patch
messages: 280132
nosy: gvanrossum, levkivskyi
New submission from Ivan Levkivskyi:
Here is the patch with recent additions/changes in typing.py
Summary: Tuple and Callable are now classes, generic type aliases, added
Coroutine, extended docs for get_type_hints.
--
assignee: docs@python
components: Documentation
files: recent
Ivan Levkivskyi added the comment:
Sorry, here is the patch with corrected formatting and base classes for
Coroutine.
--
Added file: http://bugs.python.org/file45402/recent-typing-docs-v2.diff
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
Thanks Mariatta, here is a new version of patch with indentation fixed.
--
Added file: http://bugs.python.org/file45405/recent-typing-docs-v3.diff
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
Yury, Guido, I think I understand why test_typing crashes in refleak hunting
mode. The test relies on caching, namely type variables are compared by id, so
that if cache is cleared between those two lines, then test fails. I think we
should just update those
Ivan Levkivskyi added the comment:
Yury, _tp_cache should be the only one (of course most generic classes have
_abc_cache since GenericMeta inherits from ABCMeta)
--
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
Here is the corrected patch to avoid crash.
--
Added file: http://bugs.python.org/file45416/fix-typing-test-v2.diff
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
Yury, yes I will take a look at this now.
--
___
Python tracker
<http://bugs.python.org/issue28649>
___
___
Python-bugs-list m
Ivan Levkivskyi added the comment:
My impression is like something wrong happens when TypeError is raised by a
cached function.
--
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
A very simple repro:
with self.assertRaises(TypeError):
Union[[]]
It looks like the problem happens when a non-hashable argument is passed to
cached function
--
___
Python tracker
<h
Ivan Levkivskyi added the comment:
FWIW, if I comment out this code
try:
from _functools import _lru_cache_wrapper
except ImportError:
pass
in functools.py to use the pure Python version, then I get much larger numbers:
$ ./python -m test -R : test_typing
Run tests sequentially
0:00
Ivan Levkivskyi added the comment:
It seems to be unrelated to typing.py
With your test from test_functools:
def test_lru_type_error(self):
@functools.lru_cache(maxsize=None)
def infinite_cache(o):
pass
with self.assertRaises(TypeError
Ivan Levkivskyi added the comment:
Anyway, this is not urgent, typing.py uses the default version, which is the C
version.
--
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
> Wow. I can reproduce refleaks in test_typing, but not in test_functools. This
> is weird.
Indeed, I copied the new test from test_functools to test_typing, but now I see
that pure Python version of lru_cache fails even if I remove this test and test
Ivan Levkivskyi added the comment:
I am not sure what does this mean, but when I remove __slots__ = () from some
classes, numbers of leaked references change.
--
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
> * It looks like that some types in the cache are being *reused* by different
> tests.
I also noticed this some time ago, ideally we need to make all tests more
isolated between each other.
> Now this all of this is just my guess of what's
Ivan Levkivskyi added the comment:
It looks like the tearDown() works really well. It also somehow fixes the
problem with test_generic_forward_ref
--
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
I think Yury is right here. The good plan would be to add the tearDown(), but
also fix the problem with test_generic_forward_ref. I could work on it tomorrow
(really don't have time today, sorry).
--
___
P
Ivan Levkivskyi added the comment:
Guido, Yury, it looks like I solved the puzzle. All the remaining problems are
because of forward references. In particular, _ForwardRef keeps a reference to
the frame where it was defined:
typing_globals = globals()
frame = sys._getframe(1
Ivan Levkivskyi added the comment:
> BTW, if I set maxsize=10 for typing lru_cache, test_generic_forward_ref
> crashes in refleak-test mode. Maybe this is another bug...
This one is also related to the mentioned in my previous message. Namely,
forward references are only evaluate
Ivan Levkivskyi added the comment:
OK, here are the PRs:
https://github.com/python/typing/pull/327
https://github.com/python/typing/pull/328
Those two seem to fix everything, I tried various cache sizes with both C and
Python versions of lru_cache and found no refleaks
Ivan Levkivskyi added the comment:
Guido, here is a new patch with your comments implemented.
--
Added file: http://bugs.python.org/file45424/recent-typing-docs-v4.diff
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
I think tearDown() is not necessary. But on the other hand it could be nice to
have a method in tests to force cache clear. I would propose it not as a
default, but as an opt-in to check that cache works well, or that a certain
tested feature is "
New submission from Ivan Tomilov:
The code sample on page https://docs.python.org/3/library/telnetlib.html is a
little confusing. The extra space in string "Password: " before the second
quote basically hangs the example program when you try to run it.
Please, check my answe
Ivan Tomilov added the comment:
I see, thanks for the clarification.
But in my OS X the things are different and I spent about 1 hour trying
this code to take off.
Maybe it's better to change this code to avoid spending time for such
subtle bugs? Say:
tn.read_until(b"Password:"
Changes by Ivan Pozdeev :
Added file: http://bugs.python.org/file45437/bdist_msi.patch
___
Python tracker
<http://bugs.python.org/issue26786>
___
___
Python-bugs-list m
Changes by Ivan Pozdeev :
Removed file: http://bugs.python.org/file42496/bdist_msi.patch
___
Python tracker
<http://bugs.python.org/issue26786>
___
___
Python-bugs-list m
Ivan Levkivskyi added the comment:
Guido, here is the new patch with your corrections. I have some questions in
Rietveld, but those are about mypy, you could apply the patch now.
--
Added file: http://bugs.python.org/file45446/recent-typing-docs-v5.diff
Changes by Ivan Levkivskyi :
Added file: http://bugs.python.org/file45447/recent-typing-docs-v6.diff
___
Python tracker
<http://bugs.python.org/issue28644>
___
___
Pytho
Ivan Levkivskyi added the comment:
I think it would be more useful for multidimensional slicing:
>>> subscript[::-1, ..., ::-1]
(slice(None, None, -1), Ellipsis, slice(None, None, -1))
--
___
Python tracker
<http://bugs.python.or
Ivan Levkivskyi added the comment:
Here is a new patch that does not cause refleaks, I just replaced empty
__slots__ with a __setattr__: it looks like __slots__ are not needed here to
save memory (there is only a singleton instance), they were used just to create
an immutable object
Changes by Ivan Levkivskyi :
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue28651>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
Thank you Yury and Elvis for working on this!
I have few more suggestions for What's New:
* collections.abc.Reversible (http://bugs.python.org/issue25987).
* various ABCs in collections.abc now have means for explicit
"anti-registration&quo
Ivan Levkivskyi added the comment:
The patch is small and it was initially applied before 3.6b1, I think we should
ask Ned (added to nosy) if this is OK to apply the fixed version?
--
nosy: +ned.deily
___
Python tracker
<http://bugs.python.
Ivan Levkivskyi added the comment:
Serhiy, thank you for review! Here is a corrected patch.
--
Added file:
http://bugs.python.org/file45473/operator_subscript_norefleak_v2.patch
___
Python tracker
<http://bugs.python.org/issue24
Ivan Levkivskyi added the comment:
Maybe then it makes sense to apply this to 3.7? It looks like most people are
in favour of this (also on python-ideas), only Raymond is not sure/mildly
against.
--
___
Python tracker
<http://bugs.python.
Changes by Ivan Pozdeev :
--
versions: +Python 3.7
___
Python tracker
<http://bugs.python.org/issue26786>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ivan Levkivskyi added the comment:
The patch looks good, I left just one small comment in Rietveld.
--
nosy: +levkivskyi
___
Python tracker
<http://bugs.python.org/issue28
Ivan Levkivskyi added the comment:
Thank you Manuel!
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue28773>
___
___
Python-bugs-list mailing list
Unsub
New submission from Ivan Radigales Creus :
The global variable DEFAULT_ERROR_MESSAGE on the module http.server is set to a
non W3C standard value.
It would be better to use something like:
DEFAULT_ERROR_MESSAGE = """\
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
Ivan Vilata i Balaguer added the comment:
After so much time I've checked again with the little script I sent and I see
that it doesn't happen under Python 2.7 (2.7.1+), but it does under 2.6 (2.6.6)
and 2.5 (2.5.5).
--
___
Python trac
Ivan Vilata i Balaguer <[EMAIL PROTECTED]> added the comment:
What I find most bothersome is that ``optparse`` is being inconsistent
in the types of localised strings it expects. It needs Unicode strings
for snippets forming part of the help message, while it expects normal
strings in
Ivan Vilata i Balaguer <[EMAIL PROTECTED]> added the comment:
The attached version of ``optparse_unicode.py`` doensn't depend on a
UTF-8 locale, sorry.
Added file: http://bugs.python.org/file10650/optparse_unicode2.py
___
Python tracker <[E
901 - 953 of 953 matches
Mail list logo