[issue21729] Use `with` statement in dbm.dumb
New submission from Claudiu.Popa: Hello. Here's a short patch for dbm.dumb, which uses in various places the `with` statement for opening and closing files. Thanks. -- components: Library (Lib) files: dbm_with_open.patch keywords: patch messages: 220335 nosy: Claudiu.Popa, serhiy.storchaka priority: normal severity: normal status: open title: Use `with` statement in dbm.dumb type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35588/dbm_with_open.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21729 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10445] _ast py3k : add lineno back to args node
Claudiu.Popa added the comment: This doesn't seem to be the case for Python 3.4. Also, _ast.arguments didn't have lineno and col_offset attributes neither in Python 2. But the _arg.arg nodes have those attributes, as seen in this example. from ast import parse parse( ... def test(a): pass ... ) _ast.Module object at 0x02E43330 f=_ f.body[0].args _ast.arguments object at 0x02E43390 f.body[0].args.lineno Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'arguments' object has no attribute 'lineno' f.body[0].args.args [_ast.arg object at 0x02E43270] f.body[0].args.args[0].lineno 2 -- nosy: +Claudiu.Popa type: resource usage - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10445 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16512] imghdr doesn't support jpegs with an ICC profile
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16512 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16512] imghdr doesn't support jpegs with an ICC profile
Changes by Claudiu.Popa pcmantic...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16512 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16512] imghdr doesn't support jpegs with an ICC profile
Claudiu.Popa added the comment: Using \xff\xd8 sounds good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16512 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17457] Unittest discover fails with namespace packages and builtin modules
Claudiu.Popa added the comment: Can we close this? The feature already landed in Python 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19840] The is no way to tell shutil.move to ignore metadata
Claudiu.Popa added the comment: Any type of feedback will be appreciated. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS
Claudiu.Popa added the comment: Since issue15745 hasn't been fixed yet, would be okay to skip these tests when the test suite runs from a ZFS container? Currently, these failures are a nuissance when running the test suite. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18039] dbm.open(..., flag=n) does not work and does not give a warning
Claudiu.Popa added the comment: Thanks for the reviews, Serhiy. Here's the new version of the patch. -- Added file: http://bugs.python.org/file35549/issue18039_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18039 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS
Claudiu.Popa added the comment: Here's a patch that marks those tests as expected failures if the source checkout is inside a zfs container. It uses `df -t zfs`, it was the easiest way I could find to detect that we are running from a zfs container. -- keywords: +patch Added file: http://bugs.python.org/file35553/issue19838.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19838 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19840] The is no way to tell shutil.move to ignore metadata
Claudiu.Popa added the comment: Thanks, David. The new version of the patch is attached. -- Added file: http://bugs.python.org/file35554/issue19840_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19840 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18039] dbm.open(..., flag=n) does not work and does not give a warning
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file3/issue18039_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18039 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18039] dbm.open(..., flag=n) does not work and does not give a warning
Claudiu.Popa added the comment: Thanks, Serhiy. Here's the new version of the patch. Hope that the warning message is clear enough. -- Added file: http://bugs.python.org/file35544/issue18039_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18039 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21670] Add repr to shelve.Shelf
New submission from Claudiu.Popa: Hello! Working with Shelf instances in the interactive console is cumbersome because you can't have an instant feedback when running the following: from shelve import Shelf s = Shelf({}) s['a'] = 1 s shelve.Shelf object at 0x033D0AF0 This patch adds an useful repr to Shelf objects. s Shelf({'a': 1}) Thanks! -- components: Library (Lib) files: shelve.patch keywords: patch messages: 219827 nosy: Claudiu.Popa priority: normal severity: normal status: open title: Add repr to shelve.Shelf type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35492/shelve.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21670 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21641] smtplib leaves open sockets around if SMTPResponseException is raised in __init__
Claudiu.Popa added the comment: It's actually better to close the socket in __init__ in this case. -- Added file: http://bugs.python.org/file35466/issue21641.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21641 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21648] urllib urlopener leaves open sockets for FTP connection
New submission from Claudiu.Popa: To be precise, when running test_urllib on a machine with a local FTP server, but with a set of credentials different than the ones used by test_urllib.urlopen_HttpTests.test_ftp_nonexisting. In this case, ftpwrapper from urllib.request will succesfully connect to the FTP server, but it will fail when sending the credentials, leaving the connection opened. The attached patch tries to fix this. -- components: Library (Lib) files: urllib_ftp_resource_warning.patch keywords: patch messages: 219671 nosy: Claudiu.Popa priority: normal severity: normal status: open title: urllib urlopener leaves open sockets for FTP connection type: resource usage versions: Python 3.5 Added file: http://bugs.python.org/file35467/urllib_ftp_resource_warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21648 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21651] asyncio tests ResourceWarning
New submission from Claudiu.Popa: Running asyncio tests on Windows will give a ResourceWarning. The attached patch fixes this problem. [1/1] test_asyncio D:\Projects\cpython\lib\test\test_asyncio\test_events.py:233: ResourceWarning: unclosed socket.socket fd=668, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, pro o=0, laddr=('127.0.0.1', 53044), raddr=('127.0.0.1', 53043) gc.collect() D:\Projects\cpython\lib\test\test_asyncio\test_events.py:233: ResourceWarning: unclosed socket.socket fd=724, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, pro o=0, laddr=('127.0.0.1', 53043), raddr=('127.0.0.1', 53044) gc.collect() 1 test OK. -- components: Library (Lib) files: asyncio_resource_warning.patch keywords: patch messages: 219681 nosy: Claudiu.Popa priority: normal severity: normal status: open title: asyncio tests ResourceWarning type: resource usage versions: Python 3.5 Added file: http://bugs.python.org/file35469/asyncio_resource_warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21651 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18039] dbm.open(..., flag=n) does not work and does not give a warning
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18039 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18039] dbm.open(..., flag=n) does not work and does not give a warning
Claudiu.Popa added the comment: Serhiy, could you please have a look at this patch? Given the fact that you committed my last dbm patch, I hope you have a couple of minutes to have a look at this one as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18039 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19997] imghdr.what doesn't accept bytes paths
Claudiu.Popa added the comment: There are other modules with support for bytes filenames in their API: bz2 codecs gzip lzma pipes.Template tarfile tokenize fileinput filecmp sndhdr configparser Also, given the fact that sndhdr supports them and its purpose is similar with imghdr, it would be a surprise for a beginner to find out that imghdr.what(bimg) is not working, while sndhdr.what(bsnd) works. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19997 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21636] test_logging fails on Windows for Unix tests
New submission from Claudiu.Popa: Hello! The attached patch fixes a crash for the logging tests on Windows. That's because the tests assume that socket.AF_UNIX exists. The actual traceback is: [1/1] test_logging test test_logging crashed -- Traceback (most recent call last): File D:\Projects\cpython\lib\test\regrtest.py, line 1271, in runtest_inner the_module = importlib.import_module(abstest) File D:\Projects\cpython\lib\importlib\__init__.py, line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File frozen importlib._bootstrap, line 2203, in _gcd_import File frozen importlib._bootstrap, line 2186, in _find_and_load File frozen importlib._bootstrap, line 2175, in _find_and_load_unlocked File frozen importlib._bootstrap, line 1149, in _load_unlocked File frozen importlib._bootstrap, line 1420, in exec_module File frozen importlib._bootstrap, line 321, in _call_with_frames_removed File D:\Projects\cpython\lib\test\test_logging.py, line 863, in module class TestUnixStreamServer(TestTCPServer): File D:\Projects\cpython\lib\test\test_logging.py, line 864, in TestUnixStreamServer address_family = socket.AF_UNIX AttributeError: module 'socket' has no attribute 'AF_UNIX' 1 test failed: test_logging -- components: Tests files: logging_windows.patch keywords: patch messages: 219572 nosy: Claudiu.Popa, vinay.sajip priority: normal severity: normal status: open title: test_logging fails on Windows for Unix tests type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file35449/logging_windows.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21636 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21636] test_logging fails on Windows for Unix tests
Claudiu.Popa added the comment: No, because the tests will be skipped after the assignment of the address family. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21636 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21639] tracemalloc crashes with floating point exception when using StringIO
New submission from Claudiu.Popa: Given the following code, tracemalloc crashes with: Floating point exception: 8 (core dumped) import tracemalloc tracemalloc.start(10) import io io.StringIO() The culprit is this line assert(nelem = PY_SIZE_MAX / elsize); from tracemalloc_alloc. elsize is 0 from stringio.c, self-buf = (Py_UCS4 *)PyMem_Malloc(0);. The attached patch skips the assert if elsize is 0, but I don't know if this is the right approach. Thanks! -- components: Library (Lib) files: tracemalloc.patch keywords: patch messages: 219587 nosy: Claudiu.Popa, haypo priority: normal severity: normal status: open title: tracemalloc crashes with floating point exception when using StringIO type: crash versions: Python 3.5 Added file: http://bugs.python.org/file35450/tracemalloc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21639 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21641] smtplib leaves open sockets around if SMTPResponseException is raised in __init__
Claudiu.Popa added the comment: An alternative to this approach would be to catch the error in __init__ and close the socket there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21641 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21641] smtplib leaves open sockets around if SMTPResponseException is raised in __init__
New submission from Claudiu.Popa: Hello! I noticed that test_smtplib raises a ResourceWarning, tracking this to this piece of code: self.assertRaises(smtplib.SMTPResponseException, smtplib.SMTP, HOST, self.port, 'localhost', 3) What happens is that `SMTP.getreply` is called in `SMTP.__init__` after the socket was opened, but if getreply raises SMTPResponseException, the socket remains opened. The attached patch fixes this. -- components: Library (Lib) files: smtplib_resource_warning.patch keywords: patch messages: 219592 nosy: Claudiu.Popa priority: normal severity: normal status: open title: smtplib leaves open sockets around if SMTPResponseException is raised in __init__ type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35459/smtplib_resource_warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21641 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Claudiu.Popa added the comment: Looks good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10203] sqlite3.Row doesn't support sequence protocol
Claudiu.Popa added the comment: Thanks. Patch modified. -- Added file: http://bugs.python.org/file35376/issue10203_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21589] Use better idiom in unittest example
New submission from Claudiu.Popa: Hello. This patch proposes using `assertIn` in the first unittest example, instead of `assertTrue(x in seq)`. This is clearer and recommending it first is better for beginners. -- assignee: docs@python components: Documentation files: unittest_better_idiom.patch keywords: patch messages: 219216 nosy: Claudiu.Popa, docs@python priority: normal severity: normal status: open title: Use better idiom in unittest example type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35378/unittest_better_idiom.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21589 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10203] sqlite3.Row doesn't support sequence protocol
Claudiu.Popa added the comment: Thanks. Here's a fix. -- Added file: http://bugs.python.org/file35373/issue10203_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21574] Port image types detections from PIL to the imghdr module
Claudiu.Popa added the comment: Sounds good, I'll create a patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21574 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10203] sqlite3.Row doesn't support sequence protocol
Claudiu.Popa added the comment: Thanks. Here's the updated patch. It supports negative indeces (my previous patch didn't do that). -- Added file: http://bugs.python.org/file35354/issue10203.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21493] Add test for ntpath.expanduser
Claudiu.Popa added the comment: Here's an updated patch. -- Added file: http://bugs.python.org/file35355/issue21493.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21493 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21560] gzip.write changes trailer ISIZE field before type checking - corrupted gz file after trying to write string
Claudiu.Popa added the comment: Moving `self.crc = zlib.crc32(data, self.crc) 0x` before `self.size = self.size + len(data)` should be enough. Also, your patch needs a test. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21560 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21550] Add Python implementation of the tar utility
Claudiu.Popa added the comment: I don't think that adding it to Tools/script helps that much on Windows at least. See issue21027 for reference. Except this, +1 from me. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21550 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21090] File read silently stops after EIO I/O error
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: -Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21090 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg
Claudiu.Popa added the comment: I'm working on this issue and I have a minimal patch ready, but it depends on issue21518, which proposes adding UnloadKey to winreg, so that we can unload the keys mounted with LoadKey. Also, that issue adds a mechanism for privilege acquisition, which I'll utilize for this issue. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8579 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21518] Expose RegUnloadKey in winreg
Claudiu.Popa added the comment: This version of the patch skips the test if the privileges can't be acquired. -- Added file: http://bugs.python.org/file35285/issue21518.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21527] concurrent.futures.ThreadPoolExecutor does not use a default value
New submission from Claudiu.Popa: As the title says, ThreadPoolExecutor does not use a default value for max_workers parameter, as ProcessPoolExecutor does. When the user does not care about the number of workers and wants only for something to run in background, he has to write code like this: if processes: executor = ProcessPoolExecutor() elif threads: executor = ThreadPoolExecutor(1) # or any other value This situation can also occur when the class is passed as a factory function: def create_pool(executor_factory): if executor_factory is process pool: executor = executor_factory() else: executor = executor_factory(1) This patch proposes using the number of cores as the default value for max_workers. For instance, multiprocessing.pool.ThreadPool uses the same value. -- components: Library (Lib) files: concurrent_futures_workers.patch keywords: patch messages: 218763 nosy: Claudiu.Popa, bquinlan priority: normal severity: normal status: open title: concurrent.futures.ThreadPoolExecutor does not use a default value type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35287/concurrent_futures_workers.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21527 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21518] Expose RegUnloadKey in winreg
Claudiu.Popa added the comment: Thanks. Here's the updated version. Also, I only tested it on Windows 8.1. I'll try to find another machine with an older OS for testing it. -- Added file: http://bugs.python.org/file35288/issue21518_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21518] Expose RegUnloadKey in winreg
New submission from Claudiu.Popa: Hello. While working on issue8579, I noticed that there is no way to detach a key from the registry, loaded with LoadKey function. The attached patch exposes RegUnLoadKeyW as winreg.UnloadKey. Also, this patch adds a new script in the test folder, windows_helper.py, which could be an useful addition for testing Windows specific issues, like acquiring / releasing a privilege. -- components: Library (Lib) files: winreg_unload_key.patch keywords: patch messages: 218708 nosy: Claudiu.Popa priority: normal severity: normal status: open title: Expose RegUnloadKey in winreg type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35271/winreg_unload_key.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21518] Expose RegUnloadKey in winreg
Claudiu.Popa added the comment: It needs administrator elevation for running the test. I'll update the patch to skip the test if the user doesn't have elevation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
Claudiu.Popa added the comment: Attached the new version of the patch which removes the resource warnings. Raymond, I disagree on certain points. `difflib -m` does help the development, especially for platforms where there aren't many readily available alternatives (like Windows). I gave an example for this in my first message, where you can't modify the PATH, nor install additional software. Also, you say that this should remain in tools as a demo. Wouldn't be better to have that demo well tested in stdlib and in a place where you can easy access it? This way, the user doesn't have to reimplement the wheel everytime he needs the differences between two files. And we are not competing with well developed, tested tools. By this argument, having `-m zipfile` and `-m tarfile` is redundant, because we can always use zip and tar instead. -- Added file: http://bugs.python.org/file35263/issue21027_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file35247/issue21027_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19776] Provide expanduser() on Path objects
Claudiu.Popa added the comment: Added a new version of the patch with improvements suggested by Berker Peksag. Thanks for the review! -- Added file: http://bugs.python.org/file35237/issue19776.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19776 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21493] Add test for ntpath.expanduser
New submission from Claudiu.Popa: Hello. This patch adds a test for ntpath.expanduser, which was missing. Also, it increases the test coverage for ntpath.py from 68% to 75%. -- components: Tests files: expanduser.patch keywords: patch messages: 218427 nosy: Claudiu.Popa priority: normal severity: normal status: open title: Add test for ntpath.expanduser type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35239/expanduser.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21493 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18615] sndhdr.whathdr could return a namedtuple
Claudiu.Popa added the comment: But it improves the API. It's much nicer to actually access the values returned by sndhdr as f.type, f.sampling_rate, f.channels than f[0], f[1], f[2]. You do have a point though. Would it be more acceptable if we'll provide a new function which returns a namedtuple and leaving `whathdr` and `what` in peace? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Claudiu.Popa added the comment: Right, my benchmark was indeed flawed. Here are the new results on my machine: Without the patch # ./python -S -m timeit -n 10 -s import dbm.dumb as dbm; d=dbm.open('x.dat', 'c') len(d) 10 loops, best of 3: 0.564 usec per loop With the patch # ./python -S -m timeit -n 10 -s import dbm.dumb as dbm; d=dbm.open('x.dat', 'c') len(d) 10 loops, best of 3: 0.857 usec per loop Even having an empty _verify_open in __len__ method leads to this: # ./python -S -m timeit -n 10 -s import dbm.dumb as dbm; d=dbm.open('x.dat', 'c') len(d) 10 loops, best of 3: 0.749 usec per loop -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Claudiu.Popa added the comment: Here's a new patch which uses the EAFP approach for dunder methods (__len__, __contains__ etc) and the _verify_open method for the other methods (.keys, .iterkeys) etc. Now the results are similar with the benchmark without the patch. -- Added file: http://bugs.python.org/file35241/issue19385_speed.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21436] bring back importlib.load_source() et al.
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21436 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16104] Compileall script: add option to use multiple cores
Claudiu.Popa added the comment: Updated patch according to the python-dev thread: - processes renamed to workers - `workers` defaults to 1 - When `workers` is equal to 0, then `os.cpu_count` will be used - When `workers` 1, multiple processes will be used - When `workers` == 1, run normally (no multiple processes) - Negative values raises a ValueError - Will raise NotImplementedError if multiprocessing can't be used (when `workers` equals to 0 or 1) -- Added file: http://bugs.python.org/file35106/issue16104_12.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21394] Lib/random.py: use more efficient code to convert bytes to integer
Claudiu.Popa added the comment: Do you mean int.from_bytes? It's already changed in Python 3.5: int.from_bytes(_urandom(32), 'big'). -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21394 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21378] ImportError: No module named 'concurrent.futures'
Claudiu.Popa added the comment: Do you have a module/file named concurrent.py in your PATH? -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21378 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19950] Document that unittest.TestCase.__init__ is called once per test
Claudiu.Popa added the comment: In Python 3 docs there is a hint in the documentation for `loadTestsFromModule`: This method searches module for classes derived from TestCase and creates an instance of the class for each test method defined for the class. The phrase with a fixture per test from Python 2 docs is gone though. It would be nice if the same explanation from loadTestsFromModule could be applied to TestCase documentation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19950 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20642] Enhance deepcopy-ing for tuples
Claudiu.Popa added the comment: Ping? The change is clear, has the same semantics and its a little bit faster. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20642 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18039] dbm.open(..., flag=n) does not work and does not give a warning
Claudiu.Popa added the comment: Can anyone review this patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18039 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18615] sndhdr.whathdr could return a namedtuple
Claudiu.Popa added the comment: Ping. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21362] concurrent.futures does not validate that max_workers is proper
New submission from Claudiu.Popa: Due to some bad math on my side, I passed max_workers=0 to concurrent.futures.ThreadPoolExecutor. This didn't fail properly, but hanged. The same behaviour occurs in ProcessPoolExecutor, but this time it fails internally with something like this: Exception in thread Thread-1: Traceback (most recent call last): File C:\Python34\lib\threading.py, line 921, in _bootstrap_inner self.run() File C:\Python34\lib\threading.py, line 869, in run self._target(*self._args, **self._kwargs) File C:\Python34\lib\concurrent\futures\process.py, line 225, in _queue_management_worker assert sentinels AssertionError The attached patch checks that *max_workers* is = 0 and raises ValueError if so. -- components: Library (Lib) files: futures_max_workers.patch keywords: patch messages: 217258 nosy: Claudiu.Popa, bquinlan priority: normal severity: normal status: open title: concurrent.futures does not validate that max_workers is proper type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file35053/futures_max_workers.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21362] concurrent.futures does not validate that max_workers is proper
Claudiu.Popa added the comment: For instance, multiprocessing behaves like this: multiprocessing.Pool(-1) Traceback (most recent call last): File stdin, line 1, in module File C:\Python34\lib\multiprocessing\context.py, line 118, in Pool context=self.get_context()) File C:\Python34\lib\multiprocessing\pool.py, line 157, in __init__ raise ValueError(Number of processes must be at least 1) ValueError: Number of processes must be at least 1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16104] Compileall script: add option to use multiple cores
Claudiu.Popa added the comment: Added a new patch with improvements suggested by Jim. Thanks! I removed the handling of processes=1, because it can still be useful: having a background worker which processes the files received from _walk_dir. Also, it checks that compile_dir receives a positive *processes* value, otherwise it raises a ValueError. As a side note, I just found that ProcessPoolExecutor / ThreadPoolExecutor don't verify the value of processes, leading to certain types of errors (see issue21362 for more details). Jim, the default for processes is still None, meaning do not use multiple process, because the purpose of ProcessPoolExecutor makes it easy for it to use processes=None=os.cpu_count(). Here we want the user to be explicit about wanting multiple processes or not. -- Added file: http://bugs.python.org/file35054/issue16104_9.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16104] Compileall script: add option to use multiple cores
Claudiu.Popa added the comment: Add new patch with fixes proposed by Berker Peksag. Thanks for the review. Hopefully, this is the last iteration of this patch. -- Added file: http://bugs.python.org/file35055/issue16104_10.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16104] Compileall script: add option to use multiple cores
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file35056/issue16104_11.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21362] concurrent.futures does not validate that max_workers is proper
Claudiu.Popa added the comment: Attached patch with improvements suggested by Charles-François Natali. Thank you for the review. -- Added file: http://bugs.python.org/file35057/issue21362.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21362] concurrent.futures does not validate that max_workers is proper
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file35058/issue21362_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21362 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21367] multiprocessing.JoinableQueue requires new kwarg
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21367 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16104] Compileall script: add option to use multiple cores
Claudiu.Popa added the comment: Added a new version of the patch which incorporates suggestions made by Jim. Thanks for the review! -- Added file: http://bugs.python.org/file35018/issue16104_8.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21344] save scores or ratios in difflib get_close_matches
Claudiu.Popa added the comment: It would be easier to review your patch if you'll upload it as a proper patch. Usually for these cases (modifying the return by passing a specific argument) it's best to provide a new function with this functionality, by having get_close_matches and get_scored_close_matches (for instance), which returns the modified result. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21344 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21344] save scores or ratios in difflib get_close_matches
Claudiu.Popa added the comment: Ah, nevermind my first comment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21344 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21344] save scores or ratios in difflib get_close_matches
Claudiu.Popa added the comment: Your patch needs tests and documentation update. For examples, you could look in test_difflib.py and see how get_close_matches is tested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21344 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9731] Add ABCMeta.has_methods and tests that use it
Claudiu.Popa added the comment: I have updated the previous patch, by documenting the new class method. -- versions: +Python 3.5 -Python 3.4 Added file: http://bugs.python.org/file35027/issue9731.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9731 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Claudiu.Popa added the comment: gzip uses the same name, _check_closed, but your suggestion sounds good. I'll update the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17442] code.InteractiveInterpreter doesn't display the exception cause
Claudiu.Popa added the comment: Python's interactive interpreter doesn't show the offending code lines too. And given the fact that code.InteractiveInterpreter tries to be an emulation of the default interpreter, first the change should be addressed directly there, I think. But I agree that it could be useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17442 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Claudiu.Popa added the comment: On my machine I get the following results for the unclosed-database case. With patch: # ./python -S -m timeit -n 10 -s import dbm.dumb as dbm; d=dbm.open('x.dat', 'c');len(d) 10 loops, best of 3: 0.0638 usec per loop Without patch: # ./python -S -m timeit -n 10 -s import dbm.dumb as dbm; d=dbm.open('x.dat', 'c');len(d) 10 loops, best of 3: 0.0634 usec per loop -- Added file: http://bugs.python.org/file35016/issue19385_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20752] Difflib should provide the option of overriding the SequenceMatcher
Claudiu.Popa added the comment: Hi. I added a couple of comments for your previous patch, the new one doesn't seem to have a review link. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20752 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
Claudiu.Popa added the comment: Raymond, any news on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15795] Zipfile.extractall does not preserve file permissions
Claudiu.Popa added the comment: Hello. I added a couple of comments to your latest patch. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15795 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21217] inspect.getsourcelines finds wrong lines when lambda used argument to decorator
Claudiu.Popa added the comment: - We added tests of decorated classes. The source of decorated classes does not include the decorators, which is different than the usual behavior of decorated functions. What is the correct behavior here? There is an open issue for this, http://bugs.python.org/issue1764286. It has a patch which uses inspect.unwrap in order to unwrap the decorated functions. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21217 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19546] configparser leaks implementation detail
Claudiu.Popa added the comment: If there is anything left to do for this patch, please tell me. -- Added file: http://bugs.python.org/file34837/issue19546.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19628] maxlevels -1 on compileall for unlimited recursion
Claudiu.Popa added the comment: Added patch which addresses the comments of Berker Peksag. Thanks for the review! -- Added file: http://bugs.python.org/file34786/issue19628_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19628] maxlevels -1 on compileall for unlimited recursion
Claudiu.Popa added the comment: Ping. :) Can someone review this patch, please? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19628 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21159] configparser.InterpolationMissingOptionError is not very intuitive
New submission from Claudiu.Popa: The error message from the title is not very intuitive from a user point of view. For instance, in the following traceback, only the first one gives a meaning to this error, through the leaked KeyError, thus the user knows that home_dir1 is invalid and missing. But the second message with Bad value substitution doesn't emphasize the actual problem and you have to stare at it for a couple of moments to figure out what's happening and why. Maybe changing the Bad value substitution with a Missing value would suffice. This came up in issue19546. Traceback (most recent call last): File C:\Python34\lib\configparser.py, line 410, in _interpolate_some v = map[var] File C:\Python34\lib\collections\__init__.py, line 789, in __getitem__ return self.__missing__(key)# support subclasses that define __missing__ File C:\Python34\lib\collections\__init__.py, line 781, in __missing__ raise KeyError(key) KeyError: 'home_dir1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File stdin, line 1, in module File C:\Python34\lib\configparser.py, line 1204, in __getitem__ return self._parser.get(self._name, key) File C:\Python34\lib\configparser.py, line 773, in get d) File C:\Python34\lib\configparser.py, line 374, in before_get self._interpolate_some(parser, option, L, value, section, defaults, 1) File C:\Python34\lib\configparser.py, line 413, in _interpolate_some option, section, rest, var) configparser.InterpolationMissingOptionError: Bad value substitution: section: [Paths] option : my_dir key: home_dir1 rawval : /lumberjack -- components: Library (Lib) messages: 215589 nosy: Claudiu.Popa priority: normal severity: normal status: open title: configparser.InterpolationMissingOptionError is not very intuitive type: behavior versions: Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21159 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19546] configparser leaks implementation detail
Claudiu.Popa added the comment: I've created a new issue for the InterpolationMissingOptionError message, issue21159. This issue can be closed. -- resolution: - 3rd party ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19546] configparser leaks implementation detail
Claudiu.Popa added the comment: Ups, sorry for the change of resolution. -- resolution: 3rd party - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15582] Enhance inspect.getdoc to follow inheritance chains
Claudiu.Popa added the comment: Yury, Nick, how is my latest patch? -- Added file: http://bugs.python.org/file34733/issue15582_1.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15582 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19546] configparser leaks implementation detail
Claudiu.Popa added the comment: But the last traceback conveys enough information, the user can see immediately that the given section does not exist. My problem with the current behaviour is that the first error distracts the user, while the actual problem is the second traceback. But I have another example which might contradict my proposal. In the example in the second traceback, it's not clear what `Bad value substitution` stands for and the first traceback adds the relevant context (the fact that key is missing). But I guess this stands for another issue, for enhancing the message for InterpolationMissingOptionError to transmit the fact that a given option is missing. Traceback (most recent call last): File C:\Python34\lib\configparser.py, line 410, in _interpolate_some v = map[var] File C:\Python34\lib\collections\__init__.py, line 789, in __getitem__ return self.__missing__(key)# support subclasses that define __missing__ File C:\Python34\lib\collections\__init__.py, line 781, in __missing__ raise KeyError(key) KeyError: 'home_dir1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File stdin, line 1, in module File C:\Python34\lib\configparser.py, line 1204, in __getitem__ return self._parser.get(self._name, key) File C:\Python34\lib\configparser.py, line 773, in get d) File C:\Python34\lib\configparser.py, line 374, in before_get self._interpolate_some(parser, option, L, value, section, defaults, 1) File C:\Python34\lib\configparser.py, line 413, in _interpolate_some option, section, rest, var) configparser.InterpolationMissingOptionError: Bad value substitution: section: [Paths] option : my_dir key: home_dir1 rawval : /lumberjack -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19546 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21090] File read silently stops after EIO I/O error
Changes by Claudiu.Popa pcmantic...@gmail.com: -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21090 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16104] Use multiprocessing in compileall script
Claudiu.Popa added the comment: What can I do to move this forward? I believe all concerns have been addressed and it seems ready to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16104 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34570/issue19714.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19714 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
New submission from Claudiu.Popa: Hello! The attached patch proposes a new command line interface to difflib module. Currently, `python -m difflib` does nothing useful, it runs the doc suite for the difflib module. Right now, there are a couple of modules in the standard lib, which provides helpful cli interfaces. For instance, inspect for analyzing an object, compileall for compilation of Python files or json.tool for validating and pretty printing JSON. Also, in Tools/scripts/ there is a small utility called diff.py, which uses difflib to implement a simple diff like utility, but the following issue proposes its deprecation and I'll enumerate my reasons for this: - On Windows, py -3 -m difflib is easier to use. Yes, Tools/Scripts can be added to PATH, so that diff.py can be used there, but we can't do always that. I have at work a couple of machines where I can't modify the PATH due to user limitations. Having `py -3 -m difflib` as a handy diff tool is invaluable on such systems. - Continuing the same argument as above, you can't always install a proper diff tool, due to same limitations. Having a simple one builtin in the stdlib is more than useful! Also, you can't always use a versioning system, in order to use its diff feature. - Tools/Scripts/diff.py is not tested at all. - diff.py was added before the `-m` thingy came, now `-m difflib` is the more natural way and I hope to see even more modules providing it with useful cli interfaces, like compileall or inspect. Thanks in advance! -- components: Library (Lib) files: difflib_cli.patch keywords: patch messages: 214516 nosy: Claudiu.Popa priority: normal severity: normal status: open title: difflib new cli interface type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file34571/difflib_cli.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34572/difflib_cli.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21027] difflib new cli interface
Claudiu.Popa added the comment: Here's a new patch which addresses the comments of berker.peksag. Thank you for the review! -- Added file: http://bugs.python.org/file34573/issue21027.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21027 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder
Claudiu.Popa added the comment: Hello. Here's a patch for this issue. It tests only the conditions described by Eric. -- keywords: +patch nosy: +Claudiu.Popa Added file: http://bugs.python.org/file34549/issue19714.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19714 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20627] Add context manager support to xmlrpc.client.ServerProxy
Claudiu.Popa added the comment: My pleasure! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20627 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue21010] asyncio doc typo
New submission from Claudiu.Popa: There is an invalid item meth:`resume_reading`. -- assignee: docs@python components: Documentation files: asyncio_doc_fix.patch keywords: patch messages: 214381 nosy: Claudiu.Popa, docs@python priority: normal severity: normal status: open title: asyncio doc typo versions: Python 3.5 Added file: http://bugs.python.org/file34552/asyncio_doc_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21010 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19714] Add tests for importlib.machinery.WindowsRegistryFinder
Changes by Claudiu.Popa pcmantic...@gmail.com: Added file: http://bugs.python.org/file34553/issue19714.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19714 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20375] ElementTree: Document handling processing instructions
Claudiu.Popa added the comment: Hello. I left a couple of comments on Rietveld. -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20375 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20897] @abstractmethod does not enforce method signatures
Claudiu.Popa added the comment: Hello. In 3.3 you can instantiate META class, because it does not properly say that it wants abc.ABCMeta as a metaclass. For this, you have to write your class as such: class META(metaclass=abc.ABCMeta): @abc.abstractmethod def _junk(self): ... -- nosy: +Claudiu.Popa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20897 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20627] Add context manager support to xmlrpc.client.ServerProxy
Claudiu.Popa added the comment: Now that the 3.5 branch is the default, can this feature be committed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20627 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19385] dbm.dumb should be consistent when the database is closed
Claudiu.Popa added the comment: Can this patch be committed, now that 3.5 is active? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19385 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10203] sqlite3.Row doesn't support sequence protocol
Claudiu.Popa added the comment: What can be done to move this forward? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10203 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18615] sndhdr.whathdr could return a namedtuple
Changes by Claudiu.Popa pcmantic...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18615 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com