[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2015-05-20 Thread Mateusz Loskot
Mateusz Loskot added the comment: Re msg238016, I confirm python-3.5.0a2-fdvalidation.patch fixes the problem for Python 3.5.0a4 and VS2013. The only issue I encountered was with HAVE_FSTAT which is missing from PC/pyconifg.h, so I edited the patch and removed the check if defined(HAVE_FSTAT

[issue14597] Cannot unload dll in ctypes until script exits

2016-12-13 Thread Mateusz Loskot
Changes by Mateusz Loskot <mate...@loskot.net>: -- nosy: +mloskot ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14597> ___ __

[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2021-05-05 Thread Mateusz Loskot
Change by Mateusz Loskot : -- nosy: +mloskot ___ Python tracker <https://bugs.python.org/issue39511> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-02-14 Thread Mateusz Loskot
Mateusz Loskot added the comment: Possibly, the new partial-input mode of the parser (https://bugs.python.org/issue46521#msg412832) will improve this issue in 3.11. I'm going to play with it soon and I will report back. -- ___ Python tracker

[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-24 Thread Mateusz Loskot
New submission from Mateusz Loskot : Something has changed in Python 3.7 through 3.10 (I'm observing it in 3.10) in behaviour of the Python C API function Py_CompileString such that for an incomplete input it no longer raises SyntaxError: "unexpected EOF while parsing" but Indent

[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Mateusz Loskot
Mateusz Loskot added the comment: Irit, I can and I will submit a patch. However, I'm very keen to learn what is an alternative solution then to distinguish hard invalid from incomplete input. IOW, what would be the new way of achieving what's described in the old FAQ? I believe it would

[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-26 Thread Mateusz Loskot
Mateusz Loskot added the comment: Not quite the answer I'd like to received, but thank you very much for the explanation. I've submitted pull request removing the deprecated FAQ entry https://github.com/python/cpython/pull/30925 -- ___ Python

[issue4442] document immutable type subclassing via __new__

2012-06-07 Thread Mateusz Loskot
Changes by Mateusz Loskot mate...@loskot.net: -- nosy: +mloskot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4442 ___ ___ Python-bugs-list

[issue4442] document immutable type subclassing via __new__

2012-06-07 Thread Mateusz Loskot
Mateusz Loskot mate...@loskot.net added the comment: Is this report about documenting of the concept of immutable types in Python in general or regarding existing built-in types, like datetime.datetime? Generally, the concept of immutable type with relation to tp_new is mentioned (sneaked

[issue15029] Update Defining New Types chapter according to PEP 253

2012-06-07 Thread Mateusz Loskot
New submission from Mateusz Loskot mate...@loskot.net: The chapter '2. Defining New Types in the Python 3.2 documentation [1] does not cover all important elements, especially in the subsection 2.1.4. Subclassing other types. The accepted PEP 253 [2] provides much more detailed and thorough

[issue15029] Update Defining New Types chapter according to PEP 253

2012-06-07 Thread Mateusz Loskot
Mateusz Loskot mate...@loskot.net added the comment: Similar request has been rejected in response to the Issue 621526 [1], but I'm not proposing to include PEP into docs, but to update and improve docs with material discussed in accepted PEPs. [1] http://bugs.python.org/issue621526

[issue621526] docs do not include spec info from PEPs

2012-06-07 Thread Mateusz Loskot
Mateusz Loskot mate...@loskot.net added the comment: I reported issue 15029 [1] which may be related to this one. [1] http://bugs.python.org/issue15029 -- nosy: +mloskot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue621526

[issue4442] document immutable type subclassing via __new__

2012-06-13 Thread Mateusz Loskot
Mateusz Loskot mate...@loskot.net added the comment: Chris Withers' note clarifies it to me, that this should be Python-level rather than C-level documentation. Then the note under __new__() in 3. Data model seems right. Simply, I expected to have some notes in C API too Side note: as mainly

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-09-11 Thread Mateusz Loskot
Mateusz Loskot added the comment: @Antoine (Re msg197480) I'm not sure which minor version of Python 3.2 it was, but in my comment in msg187362, I confirmed that I have tested the later version with added is_valid_fd function. As far as I understand, the changes in http://hg.python.org

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-09-11 Thread Mateusz Loskot
Mateusz Loskot added the comment: On 11 September 2013 12:34, Antoine Pitrou rep...@bugs.python.org wrote: I'm not sure which minor version of Python 3.2 it was, but in my comment in msg187362, I confirmed that I have tested the later version with added is_valid_fd function. As far as I

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-09-11 Thread Mateusz Loskot
Mateusz Loskot added the comment: On 12 September 2013 00:06, Antoine Pitrou rep...@bugs.python.org wrote: Shortly, is_valid_fd always returns true because fd 0 is always false as my tests with Visual Studio 2012 Well, that's not all there is, is_valid_fd() does other checks before

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-09-30 Thread Mateusz Loskot
Mateusz Loskot added the comment: I have just tested Windows GUI application built against Python 3.2.1 with is_valid_fd patch according to http://hg.python.org/cpython/rev/f15943505db0/ All built using VS2012. Again, I can confirm that is_valid_fd does NOT solve the problem. Here is extract

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
New submission from Mateusz Loskot: In pythonrun.c, there is function initstdio() with the following test: static int initstdio(void) { ... /* Set sys.stdin */ fd = fileno(stdin); /* Under some conditions stdin, stdout and stderr may not be connected * and fileno() may point

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
Mateusz Loskot added the comment: Yes, it does. In file Modulfileio.c, in function fileio_init, there is this code: if (fd = 0) { if (check_fd(fd)) goto error; self-fd = fd; self-closefd = closefd; } The check_fd tests: if (!_PyVerify_fd(fd

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
Mateusz Loskot added the comment: In file Modulfileio.c, I messed the path and filename above I meant: In file Modules/_io/fileio.c, -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17797

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-19 Thread Mateusz Loskot
Mateusz Loskot added the comment: Replacing if the current test in Python 3.2 if (fd 0) with if (check_fd(fd) 0) Seems to be a working solution. I just noticed, that in current Python/pythonrun.c in the repo, there the fd 0 tests have been replaced with new function is_valid_fd

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-04-29 Thread Mateusz Loskot
Mateusz Loskot added the comment: I've just got an update on the bug report [1] I submitted to Microsoft. The Visual C++ team confirmed It does appear to be a regression from Visual Studio 2010. So, it's not a bug in Python, but I think it may be important for Python to consider applying some

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2013-07-08 Thread Mateusz Loskot
Mateusz Loskot added the comment: This is still an issue in VS 2012 Version 11.0.60610.01 Update 3 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17797

[issue21452] make_buildinfo.exe with VS2013 fails due ill-formed IntDir path

2014-05-08 Thread Mateusz Loskot
New submission from Mateusz Loskot: While building Python 3.2 or Python 3.4 with Visual Studio 2013 on Windows 8.1, pythoncore.vcxproj fails to build due to illformed pre-link event command. (FYI, I have upgraded all .vcxproj files to VS2013 locally.) Here is the command and the error: pre

[issue17797] Visual C++ 11.0 reports fileno(stdin) == 0 for non-console program

2014-06-21 Thread Mateusz Loskot
Mateusz Loskot added the comment: FYI, I've got it confirmed fix for the bug in VS has been released [1] We have fixed this behavior for the next major release, Visual Studio 14. The fix is present in the Visual Studio 14 CTP that was released earlier this month. [1] https