[issue43542] Add image/heif(heic) to list of media types in mimetypes.py

2021-03-18 Thread Ilya
New submission from Ilya : Add HEIF and HEIC format to list of media types. It has IANA registration. IANA: https://www.iana.org/assignments/media-types/image/heic HEIF Github: https://github.com/nokiatech/heif -- components: Library (Lib) messages: 389012 nosy: martbln priority

[issue43542] Add image/heif(heic) to list of media types in mimetypes.py

2021-03-18 Thread Ilya
Change by Ilya : -- keywords: +patch pull_requests: +23680 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24917 ___ Python tracker <https://bugs.python.org/issu

[issue39202] Python shelve __del__ ignored exception

2020-01-03 Thread Ilya
New submission from Ilya : I'm using my own implementation of the memoize by shelve module. In the attachment, there are 2 simple test cases which pass but the console there are a lot of messages like that: Exception ignored in: Traceback (most recent call last): File "C:\Minic

[issue39670] 2to3 fix_apply tries to fix user-defined apply function calls

2020-02-18 Thread ilya
New submission from ilya : Consider the following code: def apply(a, b): print(a) print(b) apply(1, 1) 2to3 suggests to fix it as follows: --- a.py(original) +++ a.py(refactored) @@ -2,4 +2,4 @@ print(a) print(b) -apply(1, 1) +(1)(*1

[issue39670] 2to3 fix_apply tries to fix user-defined apply function calls

2020-02-18 Thread ilya
ilya added the comment: > apply was a builtin in Python 2 and not sure 2to3 can differentiate between > user defined functions that shadow builtins. > https://docs.python.org/3.8/library/2to3.html#2to3fixer-apply . > Removes usage of apply(). For example apply(function, *args,

[issue39683] 2to3 fix_exitfunc suggests duplicated import of atexit module

2020-02-18 Thread ilya
New submission from ilya : Consider the following code: import sys def foo(): print(1) def bar(): print(2) if input("case: ") == 1: sys.exitfunc = foo else: sys.exitfunc = bar 2to3 -f exitfunc suggests to fix it as follows: --- a.py(original

[issue6869] Embedded python crashed on 4th run, if "ctypes" is used

2009-09-09 Thread Ilya
New submission from Ilya : When embedding python from C, and importing "ctypes" module in embedded script, it always crashes on Py_Finalize() on 4th cycle. Tested with both PyRun_SimpleString(...) and PyRun_String(...). Platform: Windows XP IDE's: LabWindows/CVI 8.5 and Code::B

[issue6869] Embedded python crashed on 4th run, if "ctypes" is used

2009-09-09 Thread Ilya
Ilya added the comment: Tested obj=PyImport_ImportModule("ctypes"); Py_DECREF(obj); instead of PyRun_SimpleString(...) - same result -- ___ Python tracker <http://bugs.python.

[issue43424] Document the `controller.name` field in `webbrowser` module

2021-12-29 Thread Ilya Grigoriev
Ilya Grigoriev added the comment: Thank you very much, Nikita! Your patch would certainly solve my issue. As is, I checked the code I wrote, and it seems that only a lucky ordering of if-statements caused it to work on Macs. Ilya. On Wed, Dec 29, 2021 at 5:30 PM Dong-hee Na wrote

[issue46681] gzip.compress does not forward compresslevel to zlib.compress

2022-02-08 Thread Ilya Leoshkevich
New submission from Ilya Leoshkevich : Started with: commit ea23e7820f02840368569db8082bd0ca4d59b62a Author: Ruben Vorderman Date: Thu Sep 2 17:02:59 2021 +0200 bpo-43613: Faster implementation of gzip.compress and gzip.decompress (GH-27941) Co-authored-by: Łukasz Langa The

[issue46681] gzip.compress does not forward compresslevel to zlib.compress

2022-02-08 Thread Ilya Leoshkevich
Change by Ilya Leoshkevich : -- keywords: +patch pull_requests: +29385 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31215 ___ Python tracker <https://bugs.python.org/issu

[issue13341] Incorrect documentation for "u" PyArg_Parse format unit

2011-11-04 Thread Ilya Novoselov
New submission from Ilya Novoselov : Documentation states that u format unit returns "buffer of 16-bit Unicode (UTF-16) data" while it returns pointer to internal buffer of unicode data, which is either UCS-16 or UCS-32 http://docs.python.org/c-api/arg.html -- assignee: d

[issue13341] Incorrect documentation for "u" PyArg_Parse format unit

2011-11-04 Thread Ilya Novoselov
Ilya Novoselov added the comment: No, I don't feel like I'm up to standard yet. -- ___ Python tracker <http://bugs.python.org/issue13341> ___ ___

[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-26 Thread Ilya Sandler
Ilya Sandler added the comment: I confirm the bug. But I don't think disabling Ctrl-C (SIGINT) handling by default is a good idea. Proper Ctrl-C support seems like a fundamental feature for a command line debugger. However, I think the bug is easily fixable w/o changing SIGINT han

[issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread

2011-11-27 Thread Ilya Sandler
Ilya Sandler added the comment: I think stuff like this can only be tested out-of-process. So I added an out-of-process test to test_pdb.py. The test passes with the fixed pdb.py. (and fails with the original one). Patch for the test attached. -- Added file: http://bugs.python.org

[issue10478] Ctrl-C locks up the interpreter

2010-11-20 Thread Ilya Sandler
New submission from Ilya Sandler : The following program is misbehaving with python3.2 import signal, time def sighandler( arg1, arg2): print("got sigint");assert 0 signal.signal( signal.SIGINT, sighandler) for i in range(100): print(i) I'd expect Ctrl-C t

[issue10478] Ctrl-C locks up the interpreter

2010-11-28 Thread Ilya Sandler
Ilya Sandler added the comment: Would avoiding PyErr_CheckSignals() while the file object is in inconsistent state be a reasonable alternative? I am guessing that it's not that uncommon for a signal handler to need IO (e.g to log a signal). If making IO safer is not an option, then I

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-11-28 Thread Ilya Sandler
Ilya Sandler added the comment: The patch tries to write to stdout in signal handler. This currently does not work in the python 3.x (see http://bugs.python.org/issue10478). -- ___ Python tracker <http://bugs.python.org/issue7

[issue7843] python-dev archives are not updated

2010-02-02 Thread Ilya Sandler
New submission from Ilya Sandler : http://mail.python.org/pipermail/python-dev/ archives have not been updated for a couple of weeks now. A bug? -- messages: 98775 nosy: isandler severity: normal status: open title: python-dev archives are not updated

[issue7843] python-dev archives are not updated

2010-02-07 Thread Ilya Sandler
Ilya Sandler added the comment: As of Feb 2, 2010, archives seem to be functioning as expected ;-) -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue1736483] os.popen('yes | echo hello') stuck

2010-02-20 Thread Ilya Sandler
Ilya Sandler added the comment: I don't think this is a bug in python (see below for analysis). Furthermore, os.popen() is deprecated, so I think this issue can be closed. Here is my understanding of what's happening. When you execute : python -c 'import sys, os; sys.stdout

[issue7245] better Ctrl-C support in pdb (program can be resumed)

2010-02-21 Thread Ilya Sandler
Ilya Sandler added the comment: I fixed some of the style issues mentioned on appspot. (I was not sure about some of them and responded to them in appspot comments). Also sigHandler became sighandler for consistency with the rest of pdb.py. The new version of the patch is attached

[issue7245] better Ctrl-C support in pdb (program can be resumed)

2010-02-21 Thread Ilya Sandler
Ilya Sandler added the comment: Here is a list of Ctrl-C scenarios: ("current" below means the prepatch version of pdb). 1. program is running (last command was "c", "n", etc). Currently, Ctrl-C throws debugger into postmortem. Desired behavior: interrupt

[issue8015] pdb "commands" command throws you into postmortem if you enter an empty command

2010-02-24 Thread Ilya Sandler
New submission from Ilya Sandler : Here is a sample session: cheetah:~/comp/python/trunk> ./python ./Lib/pdb.py hello > /home/ilya/comp/python/trunk/hello(1)() -> print i (Pdb) b 1 Breakpoint 1 at /home/ilya/comp/python/trunk/hello:1 (Pdb) commands 1 (com) Traceback (most re

[issue7245] better Ctrl-C support in pdb (program can be resumed)

2010-02-26 Thread Ilya Sandler
Ilya Sandler added the comment: Another iteration of the patch. Now sigint_handler will generate KeyboardInterrupts when pdb is in the commandloop I think this guarantees consistent "Ctrl-C interrupts the current pdb action" behavior and the program is still resumable. The

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-03-06 Thread Ilya Sandler
Ilya Sandler added the comment: Another version of the patch is attached ( I think, I fixed all the remaining style issues). I'll answer the testing question in a separate post -- Added file: http://bugs.python.org/file16470/sig.pat

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-03-06 Thread Ilya Sandler
Ilya Sandler added the comment: new version of the patch is uploaded to bugs.python.org http://codereview.appspot.com/216067/diff/2001/2002 File Lib/pdb.py (right): http://codereview.appspot.com/216067/diff/2001/2002#newcode63 Lib/pdb.py:63: def sigint_handler(self, signum, frame): On 2010/02

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-03-06 Thread Ilya Sandler
Ilya Sandler added the comment: > Also, can you take a look at how the pdb unittests work and see if you can come up with a way to unittest the KeyboardInterrupt behavior? Yes, this is doable. In fact, I already have such tests written (unix only though). The tests are assert based but

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-03-21 Thread Ilya Sandler
Ilya Sandler added the comment: I'm attaching a test for Ctrl-C behavior on Linux (the patch itself works on Windows too, but I am not sure how to send Ctrl-C on windows programatically and subprocess does not have this functionality either). The test_pdb2.py module is generic and c

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-03-30 Thread Ilya Sandler
Ilya Sandler added the comment: Is there anything else I can do for this patch? -- ___ Python tracker <http://bugs.python.org/issue7245> ___ ___ Python-bug

[issue8309] Sin(x) is Wrong

2010-04-03 Thread Ilya Sandler
Ilya Sandler added the comment: I believe python is fully at mercy of underlying system math library. And as a matter of fact, this C program #include #include main() { printf("%.6f\n", sin(1e22)); } when compiled as 64-bit app (on linux) produces "-0.852201", but when

[issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067)

2010-05-01 Thread Ilya Sandler
Ilya Sandler added the comment: a note on testing: it should be possible to integrate the tests into existing test_pdb.py by simply placing subprocess based tests next to doctest-based tests. This way pdb tests will at least be in a single module. (this is an approach taken by a patch in

[issue2059] OptionMenu class is defined both in Tkinter and Tix

2008-02-10 Thread Ilya Sandler
New submission from Ilya Sandler: Given that Tix imports all names from Tkinter this is likely to result in confusion. E.g. >>> from Tix import * >>> print Button Tkinter.Button >>> print OptionMenu Tix.OptionMenu To get to Tkinter's OptionMenu, one needs to d

[issue2059] OptionMenu class is defined both in Tkinter and Tix

2008-02-21 Thread Ilya Sandler
Ilya Sandler added the comment: I understand your argument. Yet, I am not sure classes with the same name are reasonable here. Tix is too intertwined with Tkinter: E.g a Tix user user can just access Tkinter widgets via Tix: >>> import Tix >>> print Tix.Canvas # This i

[issue35748] urlparse library detecting wrong hostname leads to open redirect vulnerability

2019-08-17 Thread Ilya Konstantinov
Ilya Konstantinov added the comment: >From RFC-1738: hostname = *[ domainlabel "." ] toplabel domainlabel= alphadigit | alphadigit *[ alphadigit | "-" ] alphadigit toplabel = alpha | alpha *[ alphadigit | "-" ] alphadigit alphadigit = alph

[issue38039] Segfault when pickling dictionary with large pandas dataframes

2019-09-05 Thread Ilya Valmianski
New submission from Ilya Valmianski : Tried pickling a dictionary with multiple pandas tables and python primitive types. Pandas tables are large so full object size is ~200GB but system should not be OOM (crashed with ~300 GB system memory available). Reproduced on two machines running RHEL

[issue38039] Segfault when pickling dictionary with large pandas dataframes

2019-09-06 Thread Ilya Valmianski
Ilya Valmianski added the comment: Below is the code. It segfaults with either dill or pickle on 3.6 and 3.7. with open(output_path,'wb') as fout: dill.dump({ 'timed_dfs': timed_dfs, #large pandas dataframe with all b

[issue38039] Segfault when pickling dictionary with large pandas dataframes

2019-09-06 Thread Ilya Valmianski
Ilya Valmianski added the comment: As a sizing clarification, timed_dfs ~ 150GB, control_features ~30 GB, notime_dfs ~ 2GB. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38131] compile(mode='eval') uninformative error message

2019-09-12 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : While trying to construct a valid ast node programmatically, I have tried following: import ast tree = ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), op=ast.Add()) expr = ast.Expression(body=[tree]) ast.fix_missing_locations(expr) exe = compile

[issue43670] Typo in 3.10 changelog

2021-03-30 Thread Ilya Gruzinov
New submission from Ilya Gruzinov : In next lines typo in function `load`: # BUG: "rb" mode or encoding="utf-8" should be used. with open("data.json") as f: data = json.laod(f) -- assignee: docs@python components: Documentation messages: 389825 nosy:

[issue29302] add contextlib.AsyncExitStack

2019-11-12 Thread Ilya Kulakov
Change by Ilya Kulakov : -- pull_requests: +16640 pull_request: https://github.com/python/cpython/pull/17130 ___ Python tracker <https://bugs.python.org/issue29

[issue26467] Add async magic method support to unittest.mock.Mock

2019-11-12 Thread Ilya Kulakov
Change by Ilya Kulakov : -- pull_requests: +16639 pull_request: https://github.com/python/cpython/pull/17130 ___ Python tracker <https://bugs.python.org/issue26

[issue17013] Allow waiting on a mock

2019-11-12 Thread Ilya Kulakov
Change by Ilya Kulakov : -- pull_requests: +16643 pull_request: https://github.com/python/cpython/pull/17133 ___ Python tracker <https://bugs.python.org/issue17

[issue17013] Allow waiting on a mock

2019-11-18 Thread Ilya Kulakov
Ilya Kulakov added the comment: I have submitted an alternative implementation of this feature heavily inspired by _AwaitEvent I wrote for asynctest [0]. There was recently an interest from the community towards asynctest to the point that got some of its measures merged into CPython [1

[issue39626] random choice to delegate to sample on sets

2020-02-13 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : In a few of my projects I had this (minor) pain of having to remember which collections of elements are sets and which are [list, tuple]. It causes me to double check and have random.sample(my_set, 1)[0] in many places. To me this is not how I think

[issue39760] ast.FormattedValue.format_spec unnecessarily wrapped in JoinedStr

2020-02-26 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : Most usual usecase for format_spec is to specify it as a constant, that would be logical to represent as ast.Constant. However, ast.parse wraps value of ast.FormattedValue.format_spec into a JoinedStr with a single constant value, as can be seen from

[issue42943] singledispatchmethod should expose registry of all known overloads

2021-01-16 Thread Ilya Kulakov
New submission from Ilya Kulakov : The wrapper created by singledispatchmethod does not (trivially) expose registry of all known overloads. Consider the following example: @singledispatchmethod def on_message(message): raise NotImplementedError @on_message.register

[issue43424] Document the `controller.name` field in `webbrowser` module

2021-03-06 Thread Ilya Grigoriev
New submission from Ilya Grigoriev : The object `webbrowser.get()` returns has, and had for a long time, a useful but undocumented field `name`. I wonder if it would be OK to document it as something like `a system-dependent name for the browser`. This would go here: https://docs.python.org

[issue17013] Allow waiting on a mock

2020-06-09 Thread Ilya Kulakov
Change by Ilya Kulakov : -- nosy: +Ilya.Kulakov nosy_count: 11.0 -> 12.0 pull_requests: +19958 pull_request: https://github.com/python/cpython/pull/20759 ___ Python tracker <https://bugs.python.org/issu

[issue17013] Allow waiting on a mock

2020-06-09 Thread Ilya Kulakov
Ilya Kulakov added the comment: Correct, it is not backward compatible in that respect. I did not check thoroughly, but a quick lookup shown no such use among public repos on GitHub. I can instead add the called_event property and make the CallEvent “public”. Best Regards Ilya Kulakov >

[issue17013] Allow waiting on a mock

2020-06-10 Thread Ilya Kulakov
Ilya Kulakov added the comment: > Unfortunately, we take backwards compatibility very seriously in the core > team and this is a big downside of this proposal. Current implementation relies on that: 1. called is almost never used in practice (people just use .assert*) 2. The is True /

[issue17013] Allow waiting on a mock

2020-06-10 Thread Ilya Kulakov
Ilya Kulakov added the comment: As far as I understand it introduces 3 methods that may clash. It's unlikely but (I speculate) is still more likely than an identity check with called. That being said, the PR can be redone as a subclass. But that implementation will not play as nicely

[issue17013] Allow waiting on a mock

2020-06-10 Thread Ilya Kulakov
Ilya Kulakov added the comment: > That is not true, is actually encouraged to check for singletons like True, > False and None. You're right, just never used it as I never needed an identity check against True / False The PR is re-done to use an additional property call_event

[issue41478] Empty representation of AssertionError

2020-08-04 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : I have a high level wrapper where I am catching expection and present it in (more) user-friendly format with a message. try: raise ValueError except Exception as e: print(f"Following happened: {e}") >>> prints "Fo

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: That's a solution, except you must know ahead of time this issue exists. Best Regards, -- Ilya Kamen On Tue, Aug 4, 2020 at 6:59 PM Rémi Lapeyre wrote: > > Rémi Lapeyre added the comment: > > Hi, can you not use its repr: >

[issue41478] Empty representation of AssertionError

2020-08-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: Changing behavior and it's impact on existing code is, without a doubt, a big deal here. Maybe it's a reason not to do anything about it. Just to understand guiding design principle, what is expected from __str__ in more general case? I thought a

[issue37182] ast - handling new line inside a string

2019-06-06 Thread Ilya Kamenshchikov
New submission from Ilya Kamenshchikov : parsing two different strings produces identical ast.Str nodes: import ast txt1 = '"""\\n"""' txt2 = '"""\n"""' tree1 = ast.parse(txt1) tree2 = ast.parse(txt2) print(t

[issue37182] ast - handling new line inside a string

2019-06-06 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: Same problem holds for tabs (\\t vs \t). For \\r vs \r, it is even more fun: txt1 = '"""\\r"""' txt2 = '"""\r"""' >>> b'\r' >>> b&

[issue37352] Typo in documentation: "to making it easy"

2019-07-13 Thread Ilya Kamenshchikov
Change by Ilya Kamenshchikov : -- keywords: +patch pull_requests: +14525 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14730 ___ Python tracker <https://bugs.python.org/issu

[issue37352] Typo in documentation: "to making it easy"

2019-07-13 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: The wording from Carol Willing makes it read simpler. Also in the next sentence, 'test-directed development' goes under the name 'test-driven development' as of 2019 (search in google -> https://en.wikipedia.org/wiki/Test-driv

[issue7951] Should str.format allow negative indexes when used for __getitem__ access?

2019-07-13 Thread Ilya Kamenshchikov
Ilya Kamenshchikov added the comment: Py3.6+ f-strings support any indexing as they actually evaluate python expressions. >>> a = ['Java', 'Python'] >>> var = f"Hello {a[-1]}" Hello Python -- nosy: +Ilya Kamenshchikov __

[issue29302] add contextlib.AsyncExitStack

2017-08-19 Thread Ilya Kulakov
Ilya Kulakov added the comment: I'm not sure about type() to get a class object and calling __aenter__, __aexit__ through it: that makes it hard to mock these classes as Mock's spec= relies on __class__ and type() seem to ignore it (learned it a hard way. Yury, I could take a secon

[issue29302] add contextlib.AsyncExitStack

2017-08-19 Thread Ilya Kulakov
Ilya Kulakov added the comment: > but at the same time rejected by the 'async with' statement. Perhaps unittest.mock (or type) needs to be adjusted to allow mocking via spec= without subclassing? > By all means you can submit a PR! I

[issue31363] __PYVENV_LAUNCHER__ breaks calling another venv's interpreter

2017-09-06 Thread Ilya Kulakov
New submission from Ilya Kulakov: There are 2 venvs. One has the pkg_resources (pkgr_venv) package installed, another (venv) doesn't. Venv without pkg_resources is currently active. Works: $ /python -c "import pkg_resources" Doesn't work: $ python -

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-07 Thread Ilya Kulakov
Ilya Kulakov added the comment: Christian, If you have windows under your hand and can try an alike path, you should see the problem right away if it's still there. I think the original problem was unnecessary PyUnicode_FSConverter: it failed to encode string into mbcs, while OpenSSL di

[issue27354] SSLContext.load_verify_locations cannot handle paths on Windows which cannot be encoded using mbcs

2017-09-08 Thread Ilya Kulakov
Ilya Kulakov added the comment: > On Python 3.5, PyUnicode_FSConverter() uses MBCS, which is CP-1552 on your > system. Will the behavior of Python 3.6 be different? Could you point me to relevant notes or code? > If I understood correctly, it's possible to work around the iss

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-09-15 Thread Ilya Kulakov
New submission from Ilya Kulakov: It looks like a signal delivered to multiprocessing's process implicitly created by ProcessPoolExecutor triggers signal handler in the parent: ``` from concurrent.futures import ProcessPoolExecutor import asyncio import os import signal import sys import

[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-09-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: I think either loop's signal handler should not be called from a subprocess or at the very least, os.getpid / os.getpgrp should report correctly. -- ___ Python tracker <https://bugs.python.org/is

[issue35548] memoryview needlessly (?) requires represented object to be hashable

2018-12-20 Thread Ilya Kulakov
New submission from Ilya Kulakov : Implementation of memoryview's hashing method [1] imposes the following constraints in order to be hashable (per documentation): > One-dimensional memoryviews of hashable (read-only) types with formats ‘B’, > ‘b’ or ‘c’ are also hashable. The hash

[issue35548] memoryview needlessly (?) requires represented object to be hashable

2018-12-21 Thread Ilya Kulakov
Ilya Kulakov added the comment: True, but perhaps it's too strict to require both memoryview and the represented object to be immutable? The logic is as follows: Every object in Python can be seen as a view of some outside data (in memory, on disk etc.). And while Python's r

[issue35548] memoryview needlessly (?) requires represented object to be hashable

2018-12-22 Thread Ilya Kulakov
Ilya Kulakov added the comment: Perhaps another path is optionally allow hashing of memoryviews (all current conditions - hashability of the original object) via a parameter? Like unsafe_hash like in dataclass. -- status: pending -> o

[issue22962] ipaddress: Add optional prefixlen argument to ip_interface and ip_network

2017-03-23 Thread Ilya Kulakov
Ilya Kulakov added the comment: You can initialize ip_interface via a tuple of 2 elements: IP address and a prefix (prefixlen or string representation of a netmask). I believe the issue can be closed now. -- nosy: +Ilya.Kulakov ___ Python tracker

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-03-23 Thread Ilya Kulakov
New submission from Ilya Kulakov: As per documentation, it should understand the same arguments as IPv*Network. Unfortunately it does not recognize netmask in string form. Hence the following code will fail: ipaddress.ip_interface(('192.168.1.10', '255.255.255.0'))

[issue30078] "-m unittest --help" says nothing about direct script exection

2017-04-15 Thread Ilya Kazakevich
New submission from Ilya Kazakevich: In Py3 it is possible to run test filelike "python -m unittest tests/test_something.py" (it is *not* possible in Py2!) Here is doc: https://docs.python.org/3/library/unittest.html But "--help" seems to be simply copied from Py2 beca

[issue36529] Python from WindowsStore: can't install package using "-m pip"

2019-04-04 Thread Ilya Kazakevich
New submission from Ilya Kazakevich : No packages could be installed with "-m pip" because of "Access Denied". It seems that it tries to install package to "site-packages' instead of "local-packages". However, "pip.exe" works. Does it mean &q

[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-10-27 Thread Ilya Kulakov
Ilya Kulakov added the comment: Can this be included into the next bugfix release? -- ___ Python tracker <https://bugs.python.org/issue29890> ___ ___ Python-bug

[issue31909] Missing definition of HAVE_SYSCALL_GETRANDOM

2017-10-30 Thread Ilya Kulakov
New submission from Ilya Kulakov : Python 3.5 and 3.6 in their corresponding configure.ac try to detect presence of sys_getrandom. The result is written into the `HAVE_GETRANDOM_SYSCALL` definition. libexpact checks for `HAVE_SYSCALL_GETRANDOM` and since it's not defined, does not u

[issue31909] Missing definition of HAVE_SYSCALL_GETRANDOM

2017-10-30 Thread Ilya Kulakov
Ilya Kulakov added the comment: Just compiling Python 3.6.3 from sources on Ubuntu 16.04 Is there any reason to fall back to XML_POOR_ENTROTPY when proper source is actually available? -- ___ Python tracker <https://bugs.python.org/issue31

[issue31909] Missing definition of HAVE_SYSCALL_GETRANDOM

2017-10-30 Thread Ilya Kulakov
Ilya Kulakov added the comment: nvm my last question. My process is as per README: ./configure && make I'll take a further look at what's wrong. -- ___ Python tracker <https://bugs.

[issue31909] Missing definition of HAVE_SYSCALL_GETRANDOM

2017-10-31 Thread Ilya Kulakov
Ilya Kulakov added the comment: Not a bug in Python. -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
New submission from Ilya Polyakovskiy : I'm using exec() to run code with globals object inherited from dict. The problem is overloaded __getitem__ doesn't called to load default argument for class methods. Here the example. Let's assume we create some variable storage for

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
Change by Ilya Polyakovskiy : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue31968> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
Change by Ilya Polyakovskiy : -- keywords: +patch pull_requests: +4272 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31968> ___ _

[issue31968] exec(): method's default arguments from dict-inherited globals

2017-11-07 Thread Ilya Polyakovskiy
Change by Ilya Polyakovskiy : -- pull_requests: +4274 ___ Python tracker <https://bugs.python.org/issue31968> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32041] Cannot cast '\0' to c_void_p

2017-11-15 Thread Ilya Kulakov
New submission from Ilya Kulakov : Happens on 3.6.3 only: >>> import ctypes >>> ctypes.cast('\0', ctypes.c_void_p) ctypes.ArgumentError: argument 1: : embedded null character -- components: ctypes messages: 306307 nosy: Ilya.Kulakov priority: normal severit

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: Victor, Does this change imply that no python-traceback-for-every-thread will be printed upon both handled and unhandled C++ exception? -- nosy: +Ilya.Kulakov ___ Python tracker <https://bugs.python.org/issue31

[issue32041] Cannot cast '\0' to c_void_p

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: That's the change that introduced the bug: https://github.com/python/cpython/pull/2285 -- ___ Python tracker <https://bugs.python.org/is

[issue32041] Cannot cast '\0' to c_void_p

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: I have fixed that problem by ensuring that ctypes-facing code passes bytes, not strings. -- ___ Python tracker <https://bugs.python.org/issue32

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-15 Thread Ilya Kulakov
Ilya Kulakov added the comment: May I ask why AddVectoredExceptionHandler is used instead of SetUnhandledExceptionFilter? -- ___ Python tracker <https://bugs.python.org/issue31

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-16 Thread Ilya Kulakov
Ilya Kulakov added the comment: I think faulthandler should use both. E.g. in [1] you can read about an exception that can be handled by AddVectoredExceptionHandler but not SetUnhandledExceptionFilter. Perhaps implementation should use SetUnhandledExceptionFilter for everything and

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-16 Thread Ilya Kulakov
Ilya Kulakov added the comment: Another option is to use AddVectoredContinueHandler [1]. It seems to be called if both VEH and SEH failed to handle the error. 1: https://msdn.microsoft.com/en-us/library/windows/desktop/ms679273(v=vs.85).aspx

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Ilya Kulakov
Ilya Kulakov added the comment: Steve, the difficulty with SetUnhandledExceptionFilter is that it can replace filter installed by the user (e.g. one of loaded libraries). The information about AddVectoredContinueHandler is scarce, but according to what I found at [1]: If the exception is

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Ilya Kulakov
Ilya Kulakov added the comment: Please ignore everything I said about AddVectoredContinueHandler. I finally got a chance to test the code on Windows and the way it's called is not suitable for faulthandler. -- ___ Python tracker &

[issue31701] faulthandler dumps 'Windows fatal exception: code 0xe06d7363'

2017-11-17 Thread Ilya Kulakov
Ilya Kulakov added the comment: Victor, it's very helpful to analyze which Python stack caused exceptions in native code on user's machines. -- ___ Python tracker <https://bugs.python.o

[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov
New submission from Ilya Kulakov : When superclass inherits from Generic, attributes set for a subclass are incorrectly propagated to its superclass. Without Generic attribute access raises an exception: class X: def __init_subclass__(cls, **kwargs): super

[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov
Ilya Kulakov added the comment: This issue is more server that I expected: it doesn't just propagate value to superclasses, but overrides them. The last subclass created by Python runtime will overwrite value for the whole chain. -- ___ P

[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov
Ilya Kulakov added the comment: Current workaround is class X(typing.Generic[T] if typing.TYPE_CHECKING else object): -- ___ Python tracker <https://bugs.python.org/issue32

[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov
Ilya Kulakov added the comment: Nah, that's a bad one: you cannot use Generic classes as intended by specifying types. It looks like it happens because cls._grog is not yet set properly by the time __init_subclass__ is called. -- ___ P

[issue32162] typing.Generic breaks __init_subclass__

2017-11-28 Thread Ilya Kulakov
Ilya Kulakov added the comment: That's a better workaround: class X(typing.Generic[T]): def __init_subclass__(cls, **kwargs): super(typing.GenericMeta, cls).__setattr__('_gorg', cls) super().__init_subc

[issue29302] add contextlib.AsyncExitStack

2017-12-10 Thread Ilya Kulakov
Change by Ilya Kulakov : -- keywords: +patch pull_requests: +4690 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issu

  1   2   >