[issue35840] Control flow inconsistency on closed asyncio stream
Marc Schlaich added the comment: No, I'm seeing the same issue on MacOS. Attached modified example. -- Added file: https://bugs.python.org/file48160/tcp_test.py ___ Python tracker <https://bugs.python.org/issue35840> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35873] Controlling venv from venv no longer works in 3.7.2
New submission from Marc Schlaich : Controlling a venv from the python.exe from another venv does not work since 3.7.2 on Windows. This is probably related to the change bpo-34977: venv on Windows will now use a python.exe redirector rather than copying the actual binaries from the base environment. This is obviously related to bpo-35872, but this could be a different bug. When a Python script in a venv wants to control another venv by running commands like `another-venv\python.exe -m pip` with subprocess, python.exe is not referencing the other venv. It is referencing to the venv the script currently running from. This is probably because os.environ contains a '__PYVENV_LAUNCHER__' which is pointing to the venv from the script. This can be reproduced with pipx (https://github.com/pipxproject/pipx-app) by running pipx install --python "C:\Program Files (x86)\Python37-32\python.exe" --verbose tox This results in pip installing to venvs\pipx-app and not in venvs\tox. I assume a simpler reproduction might be (but I cannot check this anymore as I'm back on 3.7.1 right now): C:\Program Files (x86)\Python37-32\python.exe -m venv C:\Users\$USER\.local\pipx\venvs\tox c:\users\$USER\.local\pipx\venvs\pipx-app\scripts\python.exe -c "import subprocess; subprocess.run(['C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe', '-m', 'pip', 'install', 'tox'])" Downstream bugreport in pipx is https://github.com/pipxproject/pipx-app/issues/81. -- components: Library (Lib), Windows messages: 334659 nosy: paul.moore, schlamar, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Controlling venv from venv no longer works in 3.7.2 type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35873> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35872] Creating venv from venv no longer works in 3.7.2
New submission from Marc Schlaich : Creating a venv from the python.exe from another venv does not work since 3.7.2 on Windows. This is probably related to the change bpo-34977: venv on Windows will now use a python.exe redirector rather than copying the actual binaries from the base environment. For example running c:\users\$USER\.local\pipx\venvs\pipx-app\scripts\python.exe -m venv C:\Users\$USER\.local\pipx\venvs\tox C:\Users\$USER\.local\pipx\venvs\tox\Scripts\python.exe -m pip install --upgrade pip results in pip installing to venvs\pipx-app and not in venvs\tox. Downstream bugreport in pipx is https://github.com/pipxproject/pipx-app/issues/81. -- components: Library (Lib), Windows messages: 334658 nosy: paul.moore, schlamar, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Creating venv from venv no longer works in 3.7.2 type: behavior versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35872> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35840] Control flow inconsistency on closed asyncio stream
Marc Schlaich added the comment: After having a closer look I fear that there isn't a correct implementation for half closed sockets and returning True from eof_received results in a fundamentally broken state machine. I'm not sure if a selector implementation can handle half closed sockets, at least I'm pretty sure that this is not supported on Windows (https://docs.microsoft.com/en-us/windows/desktop/api/winsock2/nf-winsock2-select). -- ___ Python tracker <https://bugs.python.org/issue35840> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35840] Control flow inconsistency on closed asyncio stream
New submission from Marc Schlaich : After closing a StreamWriter the `StreamReaderProtocol.connection_lost` on the other end is not getting called. In this case the StreamReader is at EOF but calling write/drain does not raise any Exception (and sending data to Nirvana). I would expect that StreamWriter.is_closing returns True after the close and calling write/drain raises immediately and not just after the second call. Please see attached example. I see the same behavior with Proactor and Selector event loop on Windows. Maybe this is expected behavior. But in this case it is completely undocumented. Should there be a check for `StreamReader.at_eof` (and maybe `StreamReader.exception`) before writing to the StreamWriter? This might be related to bpo-34176. -- components: asyncio files: tcp_test.py messages: 334450 nosy: asvetlov, schlamar, yselivanov priority: normal severity: normal status: open title: Control flow inconsistency on closed asyncio stream type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48082/tcp_test.py ___ Python tracker <https://bugs.python.org/issue35840> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35699] distutils cannot find Build Tools 2017 since 3.7.2
Change by Marc Schlaich : -- keywords: +patch, patch pull_requests: +11016, 11017 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35699> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35699] distutils cannot find Build Tools 2017 since 3.7.2
Change by Marc Schlaich : -- keywords: +patch, patch, patch pull_requests: +11016, 11017, 11018 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35699> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35699] distutils cannot find Build Tools 2017 since 3.7.2
Change by Marc Schlaich : -- keywords: +patch pull_requests: +11016 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue35699> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35699] distutils cannot find Build Tools 2017 since 3.7.2
Marc Schlaich added the comment: We are passing arguments -latest(Return only the newest version and last installed.) and "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", So this should handle the cases multiple installs and different products without compilers. I try to get a PR ready. -- ___ Python tracker <https://bugs.python.org/issue35699> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35699] distutils cannot find Build Tools 2017 since 3.7.2
New submission from Marc Schlaich : vshwere.exe doesn't return Build Tools 2017 per default. This means Build Tools 2017 are not detected by distutils in 3.7.2 and you get the famous "Microsoft Visual C++ 14.0 is required" error. Please see https://github.com/Microsoft/vswhere/issues/125 for more details. The solution is to add "-products", "*", to the vswhere.exe call. This is a regression of https://bugs.python.org/issue35067. -- components: Distutils messages: 12 nosy: dstufft, eric.araujo, schlamar, steve.dower priority: normal severity: normal status: open title: distutils cannot find Build Tools 2017 since 3.7.2 type: behavior versions: Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue35699> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions
Marc Schlaich added the comment: Davin, why isn't just one of the simple one-line patches applied. This would be much more reasonable instead of closing this as won't fix. This is a really ugly bug and it took me hours to find the cause... -- nosy: +schlamar ___ Python tracker <https://bugs.python.org/issue9400> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35596] Fatal Python error: initfsencoding: unable to load the file system codec zipimport.ZipImportError: can't find module 'encodings'
Change by Marc Schlaich : -- nosy: +schlamar ___ Python tracker <https://bugs.python.org/issue35596> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26434] multiprocessing cannot spawn grandchild from a Windows service
Marc Schlaich added the comment: I opened a PR on GitHub, please review. -- ___ Python tracker <http://bugs.python.org/issue26434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29533] urllib2 works slowly with proxy on windows
Marc Schlaich added the comment: Well, you can read the proxy settings from registry and write them to os.environ (no_proxy needs to be transformed as it has a different format). This will only take effect for the current process. -- ___ Python tracker <http://bugs.python.org/issue29533> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29533] urllib2 works slowly with proxy on windows
Marc Schlaich added the comment: BTW, you can workaround this issue by defining the `http_proxy` and `no_proxy` environment variables. In this case urllib isn't doing any DNS request. -- ___ Python tracker <http://bugs.python.org/issue29533> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29533] urllib2 works slowly with proxy on windows
Marc Schlaich added the comment: Julia, could you please add other major browsers/HTTP clients (Firefox, Chrome, curl, ...) to your comparison (compare_ie_urllib.txt). I would expect that Python/urllib is the only implementation doing DNS requests for proxy bypass handling. Please note that curl uses the `no_proxy` environment variable, so the syntax is slightly different. For anyone who doesn't fully grasp the details of this issue, there might be a better explanation at https://github.com/kennethreitz/requests/issues/2988. -- ___ Python tracker <http://bugs.python.org/issue29533> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue29533] urllib2 works slowly with proxy on windows
Marc Schlaich added the comment: This could be even a security issue. People might rely on a proxy as a privacy feature. In this case the proxy should do forward/reverse DNS requests and not the client. Doing DNS lookups to check for proxy bypass doesn't seem right. I don't think that major browsers are doing this, at least Firefox is not (https://bugzilla.mozilla.org/show_bug.cgi?id=136789). -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue29533> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26434] multiprocessing cannot spawn grandchild from a Windows service
Marc Schlaich added the comment: Wrong bug... -- status: closed -> open ___ Python tracker <http://bugs.python.org/issue26434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Marc Schlaich added the comment: We have some business privilege management solution running which might have corrupted the installation. As no one else is reporting this issue, this is my best guest for this phenomena and I'm going to close this issue. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26434] multiprocessing cannot spawn grandchild from a Windows service
Marc Schlaich added the comment: We have some business privilege management solution running which might have corrupted the installation. As no one else is reporting this issue, this is my best guest for this phenomena and I'm going to close this issue. -- status: open -> closed ___ Python tracker <http://bugs.python.org/issue26434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
Marc Schlaich added the comment: This wasn't decided yet for 2.7 so I'm reopening it until a decision is made. I'm still +1 for an update to 3.8.3.1 on Windows so that this is on par with the version on OSX and the version in Python 3. -- resolution: fixed -> status: closed -> open ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26434] multiprocessing cannot spawn grandchild from a Windows service
Marc Schlaich added the comment: I can confirm that this patch is working. Maybe the test case can be modified to simulate a "pythonservice.exe" run (by patching sys.executable or something like that) so it can be run without admin privileges. -- ___ Python tracker <http://bugs.python.org/issue26434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue26434] multiprocessing cannot spawn grandchild from a Windows service
New submission from Marc Schlaich: This is a follow up of #5162. There are some occasions where you can still run into this issue. One example is if you want to spawn a new multiprocessing.Process as a child of a multiprocessing.Process: pythonservice.exe - multiprocessing.Process - multiprocessing.Process (does not start!) Attached is a test case. If you run this in pywin32 service debug mode, you see that the process crashes with: Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\multiprocessing\forking.py", line 380, in main prepare(preparation_data) File "C:\Python27\lib\multiprocessing\forking.py", line 503, in prepare file, path_name, etc = imp.find_module(main_name, dirs) ImportError: No module named PythonService In get_preparation_data is the following state: WINSERVICE: False WINEXE: False _python_exe: C:\Python27\python.exe And so you get as preparation data: {'authkey': '...', 'sys_path': [...], 'name': 'test', 'orig_dir': '...', 'sys_argv': ['C:\\Python27\\lib\\site-packages\\win32\\PythonService.exe'], 'main_path': 'C:\\Python27\\lib\\site-packages\\win32\\PythonService.exe', 'log_to_stderr': False} A workaround for me is patching `get_preparation_data` as follows: import multiprocessing.forking _org_get_preparation_data = multiprocessing.forking.get_preparation_data def _get_preparation_data(*args): data = _org_get_preparation_data(*args) main_path = data.get('main_path') if main_path is not None and main_path.endswith('exe'): data.pop('main_path') return data multiprocessing.forking.get_preparation_data = _get_preparation_data BTW, the test case does not run on Python 3.5, but starting the service manually did work. So this is probably a Python 2 issue only. -- components: Library (Lib), Windows files: test_mp_service.py messages: 260846 nosy: paul.moore, schlamar, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: multiprocessing cannot spawn grandchild from a Windows service type: crash versions: Python 2.7 Added file: http://bugs.python.org/file42025/test_mp_service.py ___ Python tracker <http://bugs.python.org/issue26434> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Marc Schlaich added the comment: Not sure. Somehow I got these corrupted files just by upgrading to 2.7.11. It might be that they are not getting updated when installing 2.7.11 over an existing 2.7.10. So maybe it's worth to investigate further as others could be affected, too. -- ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Marc Schlaich added the comment: After deleting them, they are getting recreated and everything works now. -- ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Marc Schlaich added the comment: I'm attaching those bad files. -- Added file: http://bugs.python.org/file41378/PatternGrammar2.7.11.final.0.pickle ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Changes by Marc Schlaich : Added file: http://bugs.python.org/file41379/Grammar2.7.11.final.0.pickle ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
Marc Schlaich added the comment: The issue is in Grammar2.7.11.final.0.pickle or PatternGrammar2.7.11.final.0.pickle. I have copied these files to my manually built Python and getting the same issue in this case. -- ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue25918] AssertionError in lib2to3 on 2.7.11 Windows
New submission from Marc Schlaich: This simple test case results in a lib2to3 crash with an AssertionError in 2.7.11 source = ''' class Test(object): tests = [] ''' from lib2to3.refactor import RefactoringTool def main(): tool = RefactoringTool([]) tool.refactor_string(source, '') Exception: Traceback (most recent call last): File "test.py", line 21, in main() File "test.py", line 16, in main tool.refactor_string(source, '') File "c:\Python27\Lib\lib2to3\refactor.py", line 380, in refactor_string name, err.__class__.__name__, err) File "c:\Python27\Lib\lib2to3\refactor.py", line 377, in refactor_string tree = self.driver.parse_string(data) File "c:\Python27\Lib\lib2to3\pgen2\driver.py", line 106, in parse_string return self.parse_tokens(tokens, debug) File "c:\Python27\Lib\lib2to3\pgen2\driver.py", line 71, in parse_tokens if p.addtoken(type, value, (prefix, start)): File "c:\Python27\Lib\lib2to3\pgen2\parse.py", line 127, in addtoken assert t < 256 AssertionError Pretty weird: A manually built Python 2.7.11 with VS 2008 doesn't show this issue. -- components: 2to3 (2.x to 3.x conversion tool) messages: 256790 nosy: schlamar priority: normal severity: normal status: open title: AssertionError in lib2to3 on 2.7.11 Windows type: crash versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue25918> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10128] multiprocessing.Pool throws exception with __main__.py
Marc Schlaich added the comment: Please see my latest comments to https://github.com/pypa/pip/issues/1891. tl;dr It is related to the -m switch as pip's wheel launcher does PYTHONPATH=script.exe python -m __main__ -- ___ Python tracker <http://bugs.python.org/issue10128> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
Marc Schlaich added the comment: I'm still +1 for an update in 2.7 as there are a lot of important bug fixes and a new SQLite version is 100% backwards compatible for my medium to big size (SQLAlchemy) SQLite applications. -- ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10128] multiprocessing.Pool throws exception with __main__.py
Marc Schlaich added the comment: Please fix this. Scripts with multiprocessing bundled as wheels are broken with Python 2.7 on Windows: https://github.com/pypa/pip/issues/1891 -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue10128> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5162] multiprocessing cannot spawn child from a Windows service
Marc Schlaich added the comment: This issue is not fully fixed, there are some occasions where you can still run into it. One example is if you want to spawn a new multiprocessing.Process as sub process in a multiprocessing.Process: pythonservice.exe - multiprocessing.Process - multiprocessing.Process (does not start!) In this case you get: WINSERVICE: False WINEXE: False _python_exe: C:\Python27\python.exe prep data: {'authkey': '...', 'sys_path': [...], 'name': 'test', 'orig_dir': '...', 'sys_argv': ['C:\\Python27\\lib\\site-packages\\win32\\PythonService.exe'], 'main_path': 'C:\\Python27\\lib\\site-packages\\win32\\PythonService.exe', 'log_to_stderr': False} -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue5162> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Marc Schlaich added the comment: Yes, all yield-based coroutines are generators. I know that there is a backward compatible upgrade path, but this might have a huge impact on existing code. Interestingly, I didn't know before researching this PEP that you can actually use `return` without arguments in generators before Python 3.3 (even in 2.3) and I have worked a lot with coroutines/generators. So I'm not even against this proposal and using `return` instead of `raise StopIteration` seems the right way to exit a generator/coroutine, but there could be lots of affected users... -- ___ Python tracker <http://bugs.python.org/issue22906> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22906] PEP 479: Change StopIteration handling inside generators
Marc Schlaich added the comment: AFAIS this would break all existing code for yield-based coroutine schedulers (Tornado, Twisted, Trollius, monocle, ...) when a coroutine is exited with `raise StopIteration` in client code. And this seems like a lot, a quick GitHub code search gives various examples, e.g. - https://github.com/circus-tent/circus-web/blob/3b76c83d1eb984a78ed69a9abcb13054cde78f89/circusweb/circushttpd.py#L170 - https://github.com/kzahel/falcon-api/blob/5c62454db971bc99c52694cf2ce0613fb1504d80/python/falcon_api/session.py#L159 - https://github.com/peterhajas/Genesis/blob/2f1a03c38934b892ee6bb04e07e867bf463b7ae5/servers/genesis/clients.py#L24 -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue22906> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
Marc Schlaich added the comment: Well, OSX release ships with 3.8.3.1, too: https://hg.python.org/cpython/file/2.7/Mac/BuildScript/build-installer.py#l290 -- ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
Marc Schlaich added the comment: Yes, but this is no practical solution. Telling *all* my clients to update the sqlite3.dll after *every* Python update is just not feasible and will just not work out in practice. What would be the required steps to update the *.dll in the build? Just update the external.bat to fetch another version or I am missing something? I would suggest synchronizing it with Python 3, which means SQLite 3.8.3.1. Or what do you think? -- ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
Marc Schlaich added the comment: I've now run various and partially complex applications including SQLAlchemy against SQLite 3.8.1 for months without having any issues. Right now I have run extensive database test suites against the current SQLite release 3.8.6 without any issues, too. So I would say it's save to bundle a newer SQLite version in the next Python 2.7.x. Who would be responsible for this? Is there anything I can do to get progress on this issue? -- ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21372] multiprocessing.util.register_after_fork inconsistency
Marc Schlaich added the comment: Your statement is not correct, it does work on Windows (where fork is not available) if you register the hook on module level instead of in `__main__`. -- ___ Python tracker <http://bugs.python.org/issue21372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21372] multiprocessing.util.register_after_fork inconsistency
New submission from Marc Schlaich: multiprocessing.util.register_after_fork does not behave consistently on Windows because the `_afterfork_registry` is not transferred to the subprocess. The following example fails on Windows while it works perfectly on Linux: import multiprocessing.util def hook(*args): print (args) def func(): print ('func') if __name__ == '__main__': multiprocessing.util.register_after_fork(hook, hook) p = multiprocessing.Process(target=func) p.start() -- components: Windows messages: 217347 nosy: schlamar priority: normal severity: normal status: open title: multiprocessing.util.register_after_fork inconsistency type: behavior versions: Python 2.7, Python 3.3, Python 3.4 ___ Python tracker <http://bugs.python.org/issue21372> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20844] coding bug remains in 3.3.5rc2
Marc Schlaich added the comment: I can reproduce this one. There are a few conditions which needs to be met: - Linux line endings - File needs to have at least x lines (empty lines are fine). I guess this is the point why no one could reproduce it. The attached file has 19 lines but probably no one copy/pasted the empty lines. Downloading the file reproduces this in my case. The length of the encoding declaration is relevant to the number of required newlines. `#coding:latin-1` fails at a file with 19 lines, `#coding: latin-1` (whitespace added) requires 20 lines. More observations: - Also reproducible if utf8 is used as alias for utf-8 (`#coding: utf8` + 17 lines), but not reproducible with utf-8 - Python 3.4 is affected, too - No issues on Python 3.3.2 -- nosy: +schlamar versions: +Python 3.4 ___ Python tracker <http://bugs.python.org/issue20844> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Marc Schlaich added the comment: This was fixed in #19284 for Python 3.4 (without having possible consequences in mind). I have updated my patch accordingly. Maybe it's worth to port my test case to Python 3.4. Removed Python 3.3 as it isn't in bugfix maintenance anymore. -- versions: -Python 3.3 Added file: http://bugs.python.org/file34480/Issue20954.patch ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Changes by Marc Schlaich : -- nosy: +ncoghlan ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11949] Make float('nan') unorderable
Changes by Marc Schlaich : -- nosy: -schlamar ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Marc Schlaich added the comment: Merged test case and fix in a single commit/patch. -- Added file: http://bugs.python.org/file34460/Issue20954.patch ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Marc Schlaich added the comment: BTW, patches are for 2.7 branch. -- ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Marc Schlaich added the comment: Added TestCase. -- Added file: http://bugs.python.org/file34459/20954_test.patch ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Marc Schlaich added the comment: This comes from http://bugs.python.org/issue12098. Python 3.3 is affected, too. Reproduction can be minimized by running the following script: import multiprocessing def main(): p = multiprocessing.Process(target=lambda: None) p.start() p.join() if __name__ == '__main__': main() as $ PYTHONHASHSEED=2147483647 python test.py Traceback (most recent call last): File "test.py", line 12, in main() File "test.py", line 7, in main p.start() File "c:\Python27\lib\multiprocessing\process.py", line 130, in start self._popen = Popen(self) File "c:\Python27\lib\multiprocessing\forking.py", line 258, in __init__ cmd = get_command_line() + [rhandle] File "c:\Python27\lib\multiprocessing\forking.py", line 364, in get_command_line opts = util._args_from_interpreter_flags() File "c:\Python27\lib\subprocess.py", line 508, in _args_from_interpreter_flags args.append('-' + opt * v) MemoryError -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
Marc Schlaich added the comment: Patch added. -- keywords: +patch Added file: http://bugs.python.org/file34453/Issue20954.patch ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20954] Bug in subprocess._args_from_interpreter_flags causes MemoryError
New submission from Marc Schlaich: Steps to reproduce: - clone pytest-cov at https://bitbucket.org/schlamar/pytest-cov/commits/ac14225a67d715b6649f8158e05d2389b78620d2 - remove `@pytest.mark.skipif` from `test_multiprocessing_subprocess` in test_pytest_cov.py - run: `tox --develop -e py27 -- -x` Result: it fails with MemoryError in `subprocess._args_from_interpreter_flags` because sys.flags.hash_randomization has a value of 2147483647 and it tries to build a string with such a length. Find more details in attached log. Patch is following. -- components: Library (Lib), Windows files: output.log messages: 213844 nosy: schlamar priority: normal severity: normal status: open title: Bug in subprocess._args_from_interpreter_flags causes MemoryError type: crash versions: Python 2.7 Added file: http://bugs.python.org/file34452/output.log ___ Python tracker <http://bugs.python.org/issue20954> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue777588] asyncore is broken for windows if connection is refused
Changes by Marc Schlaich : -- nosy: -schlamar ___ Python tracker <http://bugs.python.org/issue777588> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
Marc Schlaich added the comment: Ah that's great. The issue is resolved with SQLite 3.8.1. However, would be great if a newer SQLite version comes already bundled with Python. -- ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18683] Core dumps on CentOS
Marc Schlaich added the comment: Ok, these issues were probably due to the shipped version of PyGTK (which is used as event scheduler). Since I built my own Python and own PyGTK everything looks fine. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/issue18683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19450] Bug in sqlite in Windows binaries
New submission from Marc Schlaich: My System: $ python Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 >>> sqlite3.version '2.6.0' >>> sqlite3.sqlite_version '3.6.21' Test Script: import sqlite3 conn = sqlite3.connect(':memory:') conn.execute('PRAGMA foreign_keys = ON') fk = (conn.execute("PRAGMA foreign_keys").fetchone()[0]) print 'version = %s, foreign keys = %r' % (sqlite3.sqlite_version, bool(fk)) if not fk: raise Exception('No foreign keys!?') c = conn.cursor() c.executescript(''' create table if not exists main.one (resource_id TEXT PRIMARY KEY, data TEXT); create table if not exists main.two (node_id INTEGER PRIMARY KEY, data TEXT); create table if not exists main.mapping (node_id INTEGER REFERENCES two, resource_id TEXT REFERENCES one); insert into main.one(resource_id, data) values('A', 'A one thing'); insert into main.two(node_id, data) values(1, 'A two thing'); insert into main.mapping(resource_id, node_id) values('A', 1); insert into main.one(resource_id, data) values('B', 'Another one thing'); insert into main.two(node_id, data) values(2, 'Another two thing'); insert into main.mapping(resource_id, node_id) values('B', 2); insert into main.one(resource_id, data) values('C', 'Yet another one thing'); ''') for tbl in 'one', 'two', 'mapping': print 'TABLE main.%s:\n%s\n' % (tbl, '\n'.join(repr(r) for r in c.execute('select * from main.%s' % tbl).fetchall())) del_cmd = """delete from main.one where resource_id='B'""" print 'Attempting: %s' % (del_cmd,) try: c.execute(del_cmd) except Exception, e: print 'Failed to delete: %s' % e cmd = """delete from main.one where resource_id='C'""" print 'Attempting: %s' % (cmd,) c.execute(cmd) cmd = """delete from main.mapping where resource_id='B' AND node_id=2""" print '\nAttempting: %s' % (cmd,) c.execute(cmd) for tbl in 'one', 'two', 'mapping': print 'TABLE main.%s:\n%s\n' % (tbl, '\n'.join(repr(r) for r in c.execute('select * from main.%s' % tbl).fetchall())) print 'Attempting: %s' % (del_cmd,) c.execute(del_cmd) This fails with "sqlite3.IntegrityError: foreign key constraint failed". Original report comes from SO: http://stackoverflow.com/questions/9342763/sqlite3-foreign-keys-remembered The proposed solution (to upgrade sqlite) is not possible on Windows as it comes bundled with Python. So please update the bundled sqlite version where this bug is solved. -- components: Extension Modules messages: 201728 nosy: schlamar priority: normal severity: normal status: open title: Bug in sqlite in Windows binaries versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue19450> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18683] Core dumps on CentOS
Marc Schlaich added the comment: The generator.patch from #14432 didn't help. The other couldn't be applied to 2.7. I have a core dump, should I upload it? -- ___ Python tracker <http://bugs.python.org/issue18683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18683] Core dumps on CentOS
Marc Schlaich added the comment: Yes, I could reproduce segfaults on Python 2.7 (looks like it is even worse than on 2.6 where it appeared only randomly). I was not quite accurate in my initial comment. I don't use any custom C extensions but I'm using pygtk/gobject so it might be a bug there. However, my library contains a coroutine scheduler similar to tulip so it is very likely that this is related to #14432. I'll try that patch and keep you posted. -- versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue18683> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18683] Core dumps on CentOS
New submission from Marc Schlaich: I'm running unittests on a CentOS 6.4 Virtual Box slave via Jenkins on a Windows host. Randomly I get core dumps for no obvious reason. I don't use any C extension in my code and don't use ctypes. The (proprietary) software is plain Python with a multi-threaded architecture. There might be a threading race condition in the code but according to http://stackoverflow.com/a/13654489/851737 this shouldn't result in a segfault. So it might be a bug in Python. I appended one log (I have various others if you wish to see them) with faulthandler enabled by https://pypi.python.org/pypi/nose-faulthandler. -- files: crash.log messages: 194660 nosy: schlamar priority: normal severity: normal status: open title: Core dumps on CentOS type: crash versions: Python 2.6 Added file: http://bugs.python.org/file31196/crash.log ___ Python tracker <http://bugs.python.org/issue18683> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11949] Make float('nan') unorderable
Marc Schlaich added the comment: I'm +1 for a warning. The current behavior is really unexpectable: In [6]: sorted([nan, 0, 1, -1]) Out[6]: [nan, -1, 0, 1] In [7]: sorted([0, 1, -1, nan]) Out[7]: [-1, 0, 1, nan] In [8]: sorted([0, nan, 1, -1]) Out[8]: [0, nan, -1, 1] -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue11949> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16208] getaddrinfo returns wrong results if IPv6 is disabled
Marc Schlaich added the comment: I agree with schmir, this is really unexpected behavior. At least it should be fixed in the documentation. The doc currently says you get a 4-tuple for IPv6, which is just wrong in this case. Prominent library stumbled about this issue is Tornado (https://github.com/facebook/tornado/pull/670) and there are likely more. -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue16208> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses
Marc Schlaich added the comment: Ok, I found #16208, just ignore me :-) -- ___ Python tracker <http://bugs.python.org/issue8858> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses
Marc Schlaich added the comment: I get the same result from `getaddrinfo` if Python is compiled with `--disable-ipv6`. Is this the correct behaviour? I would expect no IP v6 address at all. Python 2.5.6 (r256:88840, Jan 22 2013, 08:41:04) [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> socket.has_ipv6 False >>> socket.getaddrinfo(None, 9966, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, >>> socket.AI_PASSIVE) [(2, 1, 6, '', ('0.0.0.0', 9966)), (10, 1, 6, '', (10, '&\xee\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'))] -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue8858> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16743] mmap accepts files > 1 GB, but processes only 1 GB
New submission from Marc Schlaich: Platform: Windows 7 64 bit Interpreter: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit Intel)] on win32 Here are the steps to reproduce: 1. Create a big file (5 GB): with open('big', 'wb') as fobj: for _ in xrange(1024 * 1024 * 5): fobj.write('1' + '0' * 1023) 2. Open and process it with `mmap`: import mmap import re import sys with open('big', 'rb') as fobj: data = mmap.mmap(fobj.fileno(), 0, access=mmap.ACCESS_READ) print data.size() try: counter = 0 for match in re.finditer('1' + '0' * 1023, data): counter += 1 print len(data[1073740800:1073741824]) # (1 GB - 1024, 1 GB) print len(data[1073741824:1073742848]) # (1 GB, 1 GB + 1024) finally: data.close() print counter This returns the following lines: 5368709120 1024 0 1048576 So this is a behavioral issue. `mmap` accepts a file which cannot fit in the interpreter memory but fits in the system memory. On processing the data, it only reads data until the maximum interpreter memory is reached (1 GB). -- components: None messages: 177879 nosy: schlamar priority: normal severity: normal status: open title: mmap accepts files > 1 GB, but processes only 1 GB type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue16743> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue777588] asyncore is broken for windows if connection is refused
Marc Schlaich added the comment: This issue is not fixed. Another workaround would be the `win32select` function from twisted: http://twistedmatrix.com/trac/browser/trunk/twisted/internet/selectreactor.py#L23 -- nosy: +schlamar ___ Python tracker <http://bugs.python.org/issue777588> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14907] SSL module cannot handle unicode filenames
Marc Schlaich added the comment: For example it is broken in the well known requests library: >>> import requests >>> requests.get('x', cert=u'öäü.pem') Traceback (most recent call last): File "", line 1, in ... UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) -- ___ Python tracker <http://bugs.python.org/issue14907> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14907] SSL module cannot handle unicode filenames
Marc Schlaich added the comment: Well, the Unicode HOWTO states: When opening a file for reading or writing, you can usually just provide the Unicode string as the filename, and it will be automatically converted to the right encoding for you This is really an unexpected behavior which could be easily missed by a test case so I would really vote for making this clear in the documentation. -- ___ Python tracker <http://bugs.python.org/issue14907> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14907] SSL module cannot handle unicode filenames
New submission from Marc Schlaich : Here is a short example to reproduce the error: >>> import socket, ssl >>> sock = socket.socket() >>> sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=u'ä.crt') >>> sock.connect((None, None)) Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\ssl.py", line 322, in connect self._real_connect(addr, False) File "C:\Python27\lib\ssl.py", line 305, in _real_connect self.ca_certs, self.ciphers) UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 0: ordinal not in range(128) -- components: Library (Lib), Unicode messages: 161554 nosy: ezio.melotti, ms4py priority: normal severity: normal status: open title: SSL module cannot handle unicode filenames type: crash versions: Python 2.6, Python 2.7 ___ Python tracker <http://bugs.python.org/issue14907> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14285] Traceback wrong on ImportError while executing a package
New submission from Marc Schlaich : It is very simple to reproduce this error. There is an executable package: package/ __init__.py __main__.py The __init__ imports a missing module: import missing_module And the __main__ imports from it: from . import missing_module Now I get the following output which is not what I am expecting: C:\Python27\python.exe: No module named missing_module; 'package' is a package and cannot be directly executed -- messages: 155574 nosy: ms4py priority: normal severity: normal status: open title: Traceback wrong on ImportError while executing a package type: behavior versions: Python 2.7 ___ Python tracker <http://bugs.python.org/issue14285> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com