[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +christian.heimes, gregory.p.smith ___ Python tracker <http://bugs.python.org/issue21288> ___ ___ Python-bugs-list mailin

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Yury Selivanov added the comment: On 2014-04-17, 5:02 PM, Christian Heimes wrote: > Christian Heimes added the comment: > > A callable wouldn't work for the OpenSSL back end of PBKDF2. The function > takes a digest pointer. I have to think about a solution... > > Sorry f

[issue21288] hashlib.pbkdf2_hmac Hash Constructor

2014-04-17 Thread Yury Selivanov
Yury Selivanov added the comment: Armin, FWIW, I don't think it's possible to push this API change in 3.4. -- ___ Python tracker <http://bugs.python.o

[issue21294] len wrong help

2014-04-17 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +ncoghlan, yselivanov ___ Python tracker <http://bugs.python.org/issue21294> ___ ___ Python-bugs-list mailing list Unsub

[issue21302] time.sleep (floatsleep()) should use clock_nanosleep() on Linux

2014-04-18 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +haypo, yselivanov ___ Python tracker <http://bugs.python.org/issue21302> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21314] Bizarre help

2014-04-20 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue21314> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17552] socket.sendfile()

2014-04-23 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue17552> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21399] inspect and class methods

2014-04-30 Thread Yury Selivanov
Yury Selivanov added the comment: > In Python2.7, the cls parameter shows up in pydoc: > >frombuf(cls, buf) from __builtin__.type >Construct a TarInfo object from a 512 byte string buffer. > > > In 3.5, it doesn't: > >frombuf(buf, enco

[issue21399] inspect and class methods

2014-05-01 Thread Yury Selivanov
Yury Selivanov added the comment: Yeah, I'm closing this issue. -- resolution: -> not a bug status: open -> closed ___ Python tracker <http://bugs.python.

[issue1218234] inspect.getsource doesn't update when a module is reloaded

2014-05-06 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, I'll take a look at the patch. -- ___ Python tracker <http://bugs.python.org/issue1218234> ___ ___ Python-bugs-l

[issue21326] asyncio: request clearer error message when event loop closed

2014-06-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue21326> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue21723] Float maxsize is treated as infinity in asyncio.Queue

2014-06-11 Thread Yury Selivanov
Yury Selivanov added the comment: FWIW, this can also be resolved by fixing Queue.full to do "self.qsize() >= self._maxsize" instead of "self.qsize() == self._maxsize". I generally don't like implicit casts as they break duck typing. -- __

[issue16377] Fix bisect unittest

2012-10-31 Thread Yury Selivanov
New submission from Yury Selivanov: TestInsort.test_vsBuiltinSort is a bit broken, as it doesn't test insorting `list` objects. Patch attached. -- files: test_bisect.patch keywords: patch messages: 174365 nosy: christian.heimes, georg.brandl, rhettinger, yselivanov priority: n

[issue16422] Decimal constants should be the same for py & c module versions

2012-11-06 Thread Yury Selivanov
New submission from Yury Selivanov: Right now decimal.py defines 'ROUND_DOWN' as 'ROUND_DOWN' (string), whereas C version define it as 1 (integer). While using constant values directly in your code is not a good idea, there is another case where it doesn't work:

[issue16422] Decimal constants should be the same for py & c module versions

2012-11-06 Thread Yury Selivanov
Yury Selivanov added the comment: Well, I don't care about py 3.2 & 3.3 pickle compatibility in this particular issue. This one is about compatibility of py & c decimal modules in 3.3. -- ___ Python tracker <http://bugs.pytho

[issue16422] Decimal constants should be the same for py & c module versions

2012-11-06 Thread Yury Selivanov
Yury Selivanov added the comment: Right ;) Is there any chance we can fix that in next 3.3 point release or 3.4? -- ___ Python tracker <http://bugs.python.org/issue16

[issue16431] CDecimal disregards subclass passed into __new__ when value argument is an instance of Decimal

2012-11-07 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue16431> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17071] Signature.bind() fails with a keyword argument named "self"

2013-01-29 Thread Yury Selivanov
Yury Selivanov added the comment: I'll take a look later today. -- ___ Python tracker <http://bugs.python.org/issue17071> ___ ___ Python-bugs-list m

[issue17071] Signature.bind() fails with a keyword argument named "self"

2013-01-29 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks Antoine, the patch looks good to me. The only thing I would have done differently myself is to name "self" as "__bind_self__" (with two underscores at the end). Could you pl

[issue19729] [regression] str.format sublevel format parsing broken in Python 3.3.3

2013-11-25 Thread Yury Selivanov
Yury Selivanov added the comment: This broke a lot of our code, I think that priority needs to be raised to urgent. -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue19

[issue21801] inspect.signature doesn't always return a signature

2014-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: This behaviour is indeed a bug. However, I think that the solution you propose is wrong. If we ignore invalid contents of __signature__ we are masking a bug or incorrect behaviour. In this case, you should have checked the requested attribute name in

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: That's the intended and documented behaviour, see https://docs.python.org/3/library/inspect.html#inspect.BoundArguments.arguments. You can easily implement the functionality you need by iterating through Signature.parameters and copying defaults t

[issue17424] help() should use the class signature

2014-06-20 Thread Yury Selivanov
Yury Selivanov added the comment: Since 3.4, help() uses signature. Closing this one. -- nosy: +yselivanov resolution: -> rejected status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue21801] inspect.signature doesn't always return a signature

2014-06-20 Thread Yury Selivanov
Changes by Yury Selivanov : -- assignee: -> yselivanov keywords: +needs review versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/issu

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-23 Thread Yury Selivanov
Yury Selivanov added the comment: Ryan, Can you explain the use case for it? What's the problem you're trying to solve? -- ___ Python tracker <http://bugs.python.o

[issue21801] inspect.signature doesn't always return a signature

2014-06-23 Thread Yury Selivanov
Yury Selivanov added the comment: Fixed in 3.4 and 3.5. Thanks for the bug report! -- ___ Python tracker <http://bugs.python.org/issue21801> ___ ___ Python-bug

[issue21163] asyncio doesn't warn if a task is destroyed during its execution

2014-06-23 Thread Yury Selivanov
Yury Selivanov added the comment: >@Guido, @Yury: What do you think of log_destroyed_pending_task.patch? Does it >sound correct? Premature task garbage collection is indeed hard to debug. But at least, with your patch, one gets an exception and has a chance to track the bug down. So

[issue21684] inspect.signature bind doesn't include defaults or empty tuple/dicts

2014-06-25 Thread Yury Selivanov
Yury Selivanov added the comment: > But I can't think of any use case when it would be undesirable to include the > extra parameters One use case is that you are actually loosing information what arguments Signature.bind() was called with, when defaults are included. In some

[issue20334] make inspect Signature hashable

2014-08-15 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks, Antony, this is a good catch. Your suggestion seems like a good idea. I'll look into this more closely soon. -- ___ Python tracker <http://bugs.python.org/is

[issue22203] inspect.getargspec() returns wrong spec for builtins

2014-08-25 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue22203> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20334] make inspect Signature hashable

2014-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: Antonie, I'm attaching a patch (issue20334-2.01.patch) to this issue which should fix the problem. Please review. -- Added file: http://bugs.python.org/file36607/issue20334-2.01.patch ___ Python tracker

[issue20334] make inspect Signature hashable

2014-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: Antony, I've tweaked the patch a bit and it's now in default branch. Thank you! -- ___ Python tracker <http://bugs.python.o

[issue20537] logging exc_info parameter should accept exception instances

2014-09-12 Thread Yury Selivanov
Yury Selivanov added the comment: Vinay, Please take a look at the second patch -- 'logging_02.patch' -- with updated docs -- Added file: http://bugs.python.org/file36614/logging_02.patch ___ Python tracker <http://bugs.python.o

[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-09-13 Thread Yury Selivanov
Yury Selivanov added the comment: It's not that it doesn't work after fork, right? Should we add a recipe with pid monitoring a self-pipe re-initialization? -- ___ Python tracker <http://bugs.python.o

[issue21998] asyncio: a new self-pipe should be created in the child process after fork

2014-09-14 Thread Yury Selivanov
Yury Selivanov added the comment: > Is there a use case for sharing an event loop across forking? I don't think so. I use forking mainly for the following two use-cases: - Socket sharing for web servers. Solution: if you want to have a shared sockets between multiple child process

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Yury Selivanov
New submission from Yury Selivanov: While writing a lexer for javascript language, I managed to hit the limit of named groups in one regexp, it's 100. The check is in sre_compile.py:compile() function, and there is even an XXX comment on this. Unfortunately, I'm not an expert in t

[issue22437] re module: number of named groups is limited to 100 max

2014-09-18 Thread Yury Selivanov
Yury Selivanov added the comment: Serhiy, This is awesome! Is is possible to split the patch in two, and commit the one that just increases the groups limit to 3.4 as well? Thank you -- ___ Python tracker <http://bugs.python.org/issue22

[issue21566] make use of the new default socket.listen() backlog argument

2014-09-24 Thread Yury Selivanov
Yury Selivanov added the comment: Guys, when you update asyncio code, please make sure you sync your changes with its upstream here: https://code.google.com/p/tulip/ to avoid commits like this 5f001ad90373 The goal is to have single source base for 3.4 and 3.5 in cpython repo and for 3.3 in

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-25 Thread Yury Selivanov
Yury Selivanov added the comment: Hm, strange, usually roundup robot closes issues. Anyways, closed now. Thanks again, Joshua. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue18554] os.__all__ is incomplete

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for the patch. I've committed this to 3.5 only, as there is a slight chance that it breaks backwards compatibility for some scripts. -- resolution: -> fixed status: open -> closed ___ Python tra

[issue22203] inspect.getargspec() returns wrong spec for builtins

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: The problem is that map & filter are classes, and their __init__ and __new__ methods do not provide any text_signature, hence signature uses the one from object.__init__. -- ___ Python tracker &

[issue22203] inspect.getargspec() returns wrong spec for builtins

2014-09-26 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +larry ___ Python tracker <http://bugs.python.org/issue22203> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22437] re module: number of named groups is limited to 100 max

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: I'm fine with either one, Serhiy. The static one looks good to me. -- ___ Python tracker <http://bugs.python.org/is

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: I left some comments in the codereview. I think that having some half-baked solution is great, but I really would like to see a proper fix, i.e. with remove_header and other methods fixed. Ideally, you should add a UserDict implementation for headers that

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: I left some comments in the codereview. I think that having some half-baked solution is great, but I really would like to see a proper fix, i.e. with remove_header and other methods fixed. Ideally, you should add a UserDict implementation for headers that

[issue17319] http.server.BaseHTTPRequestHandler send_response_only doesn't check the type and value of the code.

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Oups, my previous comment is related to issue #5550, wrong window. -- ___ Python tracker <http://bugs.python.org/issue17

[issue5550] [urllib.request]: Comparison of HTTP headers should be insensitive to the case

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Ideally, we should just wait when PEP 455 lands, so we can use TransformDict for headers. Also, I don't think we can land a fix for this in any pythons out there, I would focus on making this right i

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: A second version of the patch (tempfile_02), fixing more tempfile functions to properly support relative paths. Please review. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file36740/tempfile_02.patch

[issue21397] tempfile.py: Fix grammar in docstring, comment typos

2014-09-26 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue21397> ___ ___ Python-bugs-list

[issue1764286] inspect.getsource does not work with decorated functions

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Thanks for the bug report and patch! Committed to 3.5. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue22389] Generalize contextlib.redirect_stdout

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: @Berker Peksag: The patch looks fine, although I would rename 'redirect_stream' -> '_redirect_stream' or '_RedirectStream' -- nosy: +yselivanov ___ Python tracker &

[issue22389] Generalize contextlib.redirect_stdout

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: @Berker Peksag: Also, please update the docs. -- ___ Python tracker <http://bugs.python.org/issue22389> ___ ___ Python-bug

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-26 Thread Yury Selivanov
Yury Selivanov added the comment: Antony, I agree regarding the poor naming of '_sanitize_dir()' helper. As for your other suggestion, I think such a refactoring will actually make code harder to follow (+ it's more invasive). Generally, I'm in favour of transforming

[issue20267] TemporaryDirectory does not resolve path when created using a relative path

2014-09-27 Thread Yury Selivanov
Yury Selivanov added the comment: > Note that abspath() can return incorrect result in case of symbolic links to > directories and pardir components. I.e. abspath('symlink/..'). Good catch.. Should I use os.path.realpath? -- __

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Yury Selivanov added the comment: > IMO it makes the code simpler and easier to understand. But it's a tad slower, like 2-3% ;) You can test it yourself, we only tested it on huge tasks list of 1M items. FWIW, I'm not opposed

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, During the code review we tried the single loop approach. At the end Joshua wrote a small benchmark to test if it's really faster to do it in one loop or not. Turned out that single loop approach is not faster than loop+comprehension (but it&

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, I've done some additional testing. Here's a test that Joshua wrote for the code review: https://gist.github.com/1st1/b38ac6785cb01a679722 It appears that single loop approach works a bit faster for smaller collections of tasks. On a lis

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, Here's an updated benchmark results: NUMBER_OF_TASKS 1 ITERATIONS -> 2000 out of 2000 2 loops: 0.004267875499863294 1 loop: 0.007916624497738667 TOTAL_BENCH_TIME 15.975227117538452 NUMBER_OF_TASKS 10 IT

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Yury Selivanov added the comment: typo: > 2 loops is always about 30-40% slower. 2 loops is always about 30-40% faster. -- ___ Python tracker <http://bugs.python.org/issu

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Yury Selivanov added the comment: Eh, I knew something was wrong. Thanks. NUMBER_OF_TASKS 10 ITERATIONS -> 2000 out of 2000 2 loops: 0.045037232999675325 1 loop: 0.045182990999819594 TOTAL_BENCH_TIME 91.36706805229187 Please commit your change to the tulip repo

[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

2014-09-30 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue22448> ___ ___ Python-bugs-list

[issue22540] speed up isinstance and issubclass for the usual cases

2014-10-02 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue22540> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
New submission from Yury Selivanov: Can you propose a format for it? I'm not sure that including all arguments and their reprs is a good idea, as it will make BA's repr too long. -- nosy: +yselivanov ___ Python tracker <http://bu

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: How about we just list bound arguments names, without values? -- ___ Python tracker <http://bugs.python.org/issue22547> ___ ___

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: Yes and no ;) You can have partially bound args, you can bind just one argument and use defaults for the rest, etc. I agree that it's not an ideal solution, but it is a sane compromise. -- ___ Python tr

[issue22547] Implement an informative `BoundArguments.__repr__`

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > Another thing I proposed in python-ideas is to have `__getitem__` delegate to > `.arguments`, so this proposal is similar in spirit, because I want to have > `__repr__` show information from `.arguments`. Big -1 on __getitem__ > To be honest

[issue19472] inspect.getsource() raises a wrong exception type

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: > @Yury do you agree with this? I think it's a perfectly normal behaviour. OSError is raised for valid kind of objects, and TypeError is raised when you're passing something weird. That's a pretty common

[issue19472] inspect.getsource() raises a wrong exception type

2014-10-03 Thread Yury Selivanov
Changes by Yury Selivanov : -- resolution: -> not a bug status: open -> closed ___ Python tracker <http://bugs.python.org/issue19472> ___ ___ Python-bugs-

[issue22550] issubclass can fail after module reloading

2014-10-03 Thread Yury Selivanov
Yury Selivanov added the comment: I don't think it a bug or that it's possible to do something about it. Reloading modules in Python should usually be just avoided by all means. -- nosy: +brett.cannon, yselivanov ___ Python trac

[issue22572] NoneType object is not iterable error when asyncio Server.close() called

2014-10-06 Thread Yury Selivanov
Yury Selivanov added the comment: I think that the main problem is that '_stop_server' is called from a main thread (by unittest machinery via addCleanup), whereas the loop is in the other thread. asyncio code is not thread-safe in general. If I change your code slightly to a

[issue20223] inspect.signature does not support new functools.partialmethod

2014-01-11 Thread Yury Selivanov
New submission from Yury Selivanov: new and handy functools.partialmethod doesn't fully support inspect.signature. For instance, for the following code: class Spam: def say(self, a, b=1): print(a) hello = functools.partialmethod(say, 'hello')

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, Congrats on the amazing job you did with the arguments clinic. And if you need any assistance with 'inspect.signature' I'd be glad to help. -- nosy: +yselivanov ___ Python tracker <http

[issue17373] Add inspect.Signature.from_callable()

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: Hi Eric, I'm not sure why do you want this. Having "Signature.from_callable" does not allow you to change behaviour of 'inspect.signature' function. More over, it creates a confusion about what API should be used

[issue17481] inspect.getfullargspec could use __signature__

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: Please consider the attached patch (getargsspec_01.patch). It modifies 'getargspec' and 'getfullargspec' to use the 'inspect.signature' API. The entire test suite passes just fine. This also will address issue #16490. I can

[issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins

2014-01-11 Thread Yury Selivanov
Yury Selivanov added the comment: This is related to issue #17481 -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue16490> ___ ___ Python-bug

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: > The difference is that inspect.signature is not friendly to Signature > subclasses. Without from_callable you can't customize the behavior in > inspect.signature easily. OK, suppose you have "Signature.from_callable". You then creat

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: Eric, Moreover, 'Signature.from_function' and newly added 'Signature.from_builtin' are private API, or implementation detail (they are not part of PEP, not mentioned in the docs). If at some point it is needed to rewrite Signature in C

[issue17373] Add inspect.Signature.from_callable()

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: OK, got it now. Green light from me. Looking through the code, I saw that 'from_builtin' doesn't use the 'Signature._parameter_cls' (as in from_function). That's probably needs to be fixed as w

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-12 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, just a small thing.. Could you please add something like "Parameter = cls._parameter_cls" in the "from_builtin" method? (see the discussion in #17373) -- ___ Python tracker <http://bug

[issue20230] structseq types should expose _fields

2014-01-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +yselivanov ___ Python tracker <http://bugs.python.org/issue20230> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20230] structseq types should expose _fields

2014-01-12 Thread Yury Selivanov
Changes by Yury Selivanov : -- components: +Interpreter Core, Library (Lib) versions: +Python 3.5 ___ Python tracker <http://bugs.python.org/issue20230> ___ ___

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-13 Thread Yury Selivanov
Yury Selivanov added the comment: > But this complicates life for inspect.Signature, which needs to not publish > the "self" parameter when it's been bound. That's already supported, isn't it? >>> str(inspect.signature(F.a)) '(se

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
New submission from Yury Selivanov: Can we remove debug timing around "self._selector.select(timeout)" (or at least make it configurable) from BaseEventLoop? Right now the code is: # TODO: Instrumentation only in debug mode? t0 = self.time() event_l

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: And I'd be happy to help with the patch. -- ___ Python tracker <http://bugs.python.org/issue20275> ___ ___ Python-bugs-l

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: > What part of the debug timing is more expensive than the select call itself? Well, there is nothing really expensive there, but: - time.monotonic() is still a syscall - logging.log executes a fair amount of code

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: I wrote a small micro-benchmark, that creates 100K tasks and executes them. With debug code the execution time is around 2.8-3.1s, with debug comment commented out it's around 2.3-2.4s. Again, it's a micro-benchmark, and in a real application the

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: The micro-benchmark i used is here: https://gist.github.com/1st1/8446175 -- ___ Python tracker <http://bugs.python.org/issue20

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: > Wow, that's impressive that such minor syscalls can take so much times! Apparently, it's not syscalls, it's logging. Actually, with commented out "logging.log" code I can't see a difference wether there are calls to mono

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: > Regarding the microbench, please count and report how many times it actually > calls select(). I'm on MacOS X, so it's KqueueSelector. It's 'select' method (and self._kqueue.control respectively) is called twice more times.

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, Re your patch: since it's not really time syscalls, and Guido said he's using this debug code, how about we just have something like: t0 = self.time() event_list = self._selector.select(timeout) t1 = self.time()

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: And, I think that "asyncio._DEBUG" or even "asyncio.DEBUG" would be a great idea. -- ___ Python tracker <http://bug

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: Victor, Guido, Please take a look at the attached one. I believe it's slightly better, than the "logger_is_enabled_for.patch", since it doesn't log stuff that was faster than 1 second

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file33487/greater_than_1sec_logging.patch ___ Python tracker <http://bugs.python.org/issue20275> ___ ___

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Changes by Yury Selivanov : Removed file: http://bugs.python.org/file33487/greater_than_1sec_logging.patch ___ Python tracker <http://bugs.python.org/issue20275> ___ ___

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file33488/greater_than_1sec_logging.patch ___ Python tracker <http://bugs.python.org/issue20275> ___ ___

[issue20275] asyncio: remove debug code from BaseEventLoop

2014-01-15 Thread Yury Selivanov
Yury Selivanov added the comment: > I really want to log the time every time if level == DEBUG and only if > 1 > sec for other levels, so maybe all you need to do is remove the comment? :-) > (Or maybe logger.isEnabledFor(logging.INFO) is faster than logger.log() when > noth

[issue17481] inspect.getfullargspec could use __signature__

2014-01-17 Thread Yury Selivanov
Yury Selivanov added the comment: Can somebody review the patch? I'd be cool if this lands in 3.4. -- nosy: +larry ___ Python tracker <http://bugs.python.org/is

[issue17481] inspect.getfullargspec could use __signature__

2014-01-18 Thread Yury Selivanov
Changes by Yury Selivanov : -- nosy: +terry.reedy ___ Python tracker <http://bugs.python.org/issue17481> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17481] inspect.getfullargspec should use __signature__

2014-01-18 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, getargspec uses getfullargspec, so it's covered. -- ___ Python tracker <http://bugs.python.org/issue17481> ___ ___

[issue17481] inspect.getfullargspec should use __signature__

2014-01-19 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, I saw your message on the tracker regarding adding support for parameters groups to the signature object. Would you mind if I join the discussion with my ideas of how this feature might be implemented? Yury On Sunday, January 19, 2014 at 5:44 AM

<    12   13   14   15   16   17   18   19   20   21   >