[issue29051] Improve error reporting involving f-strings (PEP 498)

2017-03-12 Thread Claudiu Popa

Claudiu Popa added the comment:

I'm adding another example here, where the lineno reporting is wrong:

  from ast import parse 
  n = parse('''

  def test():
 return f"{a}"
  ''')
  f = n.body[0].body[0].value.values[0]
  n = f.value
  print("name lineno", n.lineno)

In this example, the line number of the f-string inner variable is 1, while it 
should be 3.
As Mark Shannon said, this bug is affecting tools such as pyflakes and pylint.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue29051>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12516] imghdr.what should take one argument

2014-06-12 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +Claudiu.Popa
versions: +Python 3.5 -Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12516>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12516] imghdr.what should take one argument

2014-06-12 Thread Claudiu Popa

Claudiu Popa added the comment:

imghdr got a test file in 94813eab5a58. Your patch also needs documentation 
updates. Besides that, +1 from me. Maybe it would be okay to add a deprecation 
warning for the second argument?

--

___
Python tracker 
<http://bugs.python.org/issue12516>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21230] imghdr does not accept adobe photoshop mime type

2014-06-12 Thread Claudiu Popa

Claudiu Popa added the comment:

Issue issue16512 has a patch which will recognize this format of JPEG, as well 
as others.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue21230>
___
___
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

2014-06-12 Thread Claudiu Popa

Claudiu Popa added the comment:

Antoine, how does my latest patch look?

--
stage:  -> patch review

___
Python tracker 
<http://bugs.python.org/issue19776>
___
___
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

2014-06-13 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage:  -> patch review

___
Python tracker 
<http://bugs.python.org/issue15795>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2014-06-13 Thread Claudiu Popa

Claudiu Popa added the comment:

Hi. Would you like to provide a patch?

--
keywords: +easy
nosy: +Claudiu.Popa
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.5 -Python 3.4

___
Python tracker 
<http://bugs.python.org/issue18108>
___
___
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

2014-06-13 Thread Claudiu Popa

Changes by Claudiu Popa :


--
dependencies: +Expose RegUnloadKey in winreg

___
Python tracker 
<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

2014-06-13 Thread Claudiu Popa

Claudiu Popa added the comment:

Attached a new version of the patch which cleanups properly after tests.

--
Added file: http://bugs.python.org/file35618/issue21518_2.patch

___
Python tracker 
<http://bugs.python.org/issue21518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11287] Add context manager support to dbm modules

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Hi. This was already fixed in c2f1bb56760d. I'm sorry that this patch didn't 
make it through.

--
nosy: +Claudiu.Popa
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue11287>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12617] Mutable Sequence Type can work not only with iterable in slice[i:j] = t

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

This was fixed in the latest versions.

>>> b = bytearray(b'457')
>>> b[:1] = 4
Traceback (most recent call last):
  File "", line 1, in 
TypeError: can assign only bytes, buffers, or iterables of ints in range(0, 256)
>>>

--
nosy: +Claudiu.Popa
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue12617>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

This seems to be a reasonable fix. Michael, could you have a look at this 
patch, please?

--
nosy: +Claudiu.Popa
versions: +Python 3.5 -Python 3.2, Python 3.3, Python 3.4

___
Python tracker 
<http://bugs.python.org/issue15836>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Looks good to me. But aren't the last two lines skipped if an error is raised 
by the first line from the with block?

+with self.assertRaises(FileNotFoundError):
+shutil.chown('invalid-file', user=uid, dir_fd=dirfd)
+shutil.chown('invalid-file', group=gid, dir_fd=dirfd)
+shutil.chown('invalid-file', user=uid, group=gid, dir_fd=dirfd)

--

___
Python tracker 
<http://bugs.python.org/issue18108>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19768] Not so correct error message when giving incorrect type to maxlen in deque

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

I believe that returning a TypeError instead of a ValueError is better in this 
situation. Technically, passing 'a' as maxlen makes that value inappropiate, 
thus the use of TypeError. It will also be backward compatible. Also, your 
patch needs test updates.

--
nosy: +Claudiu.Popa
stage:  -> patch review
versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4

___
Python tracker 
<http://bugs.python.org/issue19768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19898] No tests for dequereviter_new

2014-06-14 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: needs patch -> patch review
versions: +Python 3.5

___
Python tracker 
<http://bugs.python.org/issue19898>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21151] winreg.SetValueEx causes crash if value = None

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Hi. You have some trailing whitespaces in the test file (run make patchcheck or 
python ../Tools/scripts/patchcheck.py). Except that, looks good to me.

--
nosy: +Claudiu.Popa
stage:  -> patch review
versions: +Python 3.5 -Python 3.4

___
Python tracker 
<http://bugs.python.org/issue21151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-06-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Hi, I left a couple of comments on rietveld.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21768] Fix a NameError in test_pydoc

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

There's no 'o' in test_pydoc.TestDescriptions.test_builtin, but 'name'.

--
components: Tests
files: test_pydoc_nameerror.patch
keywords: patch
messages: 220618
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Fix a NameError in test_pydoc
versions: Python 3.5
Added file: http://bugs.python.org/file35642/test_pydoc_nameerror.patch

___
Python tracker 
<http://bugs.python.org/issue21768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21769] Fix a NameError in test_descr

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Hi. Here's a patch which uses `self.fail` in test_descr instead of `raise 
TestFailed`.

--
components: Tests
files: test_descr_nameerror.patch
keywords: patch
messages: 220619
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Fix a NameError in test_descr
versions: Python 3.5
Added file: http://bugs.python.org/file35643/test_descr_nameerror.patch

___
Python tracker 
<http://bugs.python.org/issue21769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21770] Module not callable in script_helper.py

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Using make_zip_pkg from script_helper with compiled=True will lead to the 
following failure:

Traceback (most recent call last):
  File "D:\Projects\cpython\lib\test\test_cmd_line_script.py", line 305, in 
test_module_in_subpackage_in_zipfile
zip_name, run_name = _make_test_zip_pkg(script_dir, 'test_zip', 'test_pkg', 
'script', depth=2)
  File "D:\Projects\cpython\lib\test\test_cmd_line_script.py", line 86, in 
_make_test_zip_pkg
source, depth, compiled=True)
  File "D:\Projects\cpython\lib\test\script_helper.py", line 158, in 
make_zip_pkg
init_name = py_compile(init_name, doraise=True)
TypeError: 'module' object is not callable

The attached patch fixes this.

--
components: Tests
files: script_helper_fix.patch
keywords: patch
messages: 220622
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Module not callable in script_helper.py
versions: Python 3.5
Added file: http://bugs.python.org/file35644/script_helper_fix.patch

___
Python tracker 
<http://bugs.python.org/issue21770>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21773] Fix a NameError in test_enum

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

There's a bug in test_enum.TestStdLib.test_pydoc, print_diffs is undefined and 
using assertEqual seems to be clearer.

--
components: Tests
files: test_enum.patch
keywords: patch
messages: 220669
nosy: Claudiu.Popa, ethan.furman
priority: normal
severity: normal
status: open
title: Fix a NameError in test_enum
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35650/test_enum.patch

___
Python tracker 
<http://bugs.python.org/issue21773>
___
___
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

2014-06-15 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: test needed -> patch review
versions: +Python 3.5

___
Python tracker 
<http://bugs.python.org/issue19714>
___
___
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

2014-06-15 Thread Claudiu Popa

Claudiu Popa added the comment:

Attached a new version of the patch. The previous one called find_spec twice in 
the same test.

--
Added file: http://bugs.python.org/file35651/issue19714_2.patch

___
Python tracker 
<http://bugs.python.org/issue19714>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Claudiu Popa

New submission from Claudiu Popa:

Hi. This patch fixes a NameError found in xml.dom.minidom. Here's an example 
for reproducing it:


from xml.dom import minidom
dom = minidom.parseString("1")
pi = dom.createProcessingInstruction('xml-stylesheet',
 'type="text/xsl" href="mystyle.xslt"')
pi.nodeValue = "4"

with output:


Traceback (most recent call last):
  File "a.py", line 5, in 
pi.nodeValue = "4"
  File "C:\Python34\lib\xml\dom\minidom.py", line 979, in _set_nodeValue
self.data = data
NameError: name 'data' is not defined

--
components: Library (Lib)
files: minidom.patch
keywords: patch
messages: 220673
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Fix a NameError in xml.dom.minidom
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35652/minidom.patch

___
Python tracker 
<http://bugs.python.org/issue21774>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21774] Fix a NameError in xml.dom.minidom

2014-06-15 Thread Claudiu Popa

Claudiu Popa added the comment:

My pleasure. I run Pylint from time to time over stdlib in order to find false 
positives for Pylint and in the process I stumble across these type of bugs.

--

___
Python tracker 
<http://bugs.python.org/issue21774>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21776] distutils.upload uses the wrong order of exceptions

2014-06-16 Thread Claudiu Popa

New submission from Claudiu Popa:

Hi. Currently, distutils.command.upload has this code:

try:
result = urlopen(request)
status = result.getcode()
reason = result.msg
except OSError as e:
self.announce(str(e), log.ERROR)
return
except HTTPError as e:
status = e.code
reason = e.msg

This is wrong because HTTPError is a subclass of OSError and OSError branch 
will be chosen in case HTTPError is raised. The HTTPError branch was added in 
4373f0e4eb21, but after a while socket.error became an alias for OSError, as 
well for HTTPError. This patch also adds a `return` in order to prevent an 
UnboundLocalError (found in issue10367 as well), but it can be removed if other 
solutions are preferable.

--
components: Distutils
files: distutils.patch
keywords: patch
messages: 220705
nosy: Claudiu.Popa, dstufft, eric.araujo
priority: normal
severity: normal
status: open
title: distutils.upload uses the wrong order of exceptions
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35653/distutils.patch

___
Python tracker 
<http://bugs.python.org/issue21776>
___
___
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

2014-06-16 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage:  -> patch review

___
Python tracker 
<http://bugs.python.org/issue19628>
___
___
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

2014-06-16 Thread Claudiu Popa

Claudiu Popa added the comment:

Attached the new version of the patch with fixes according to Antoine's review.

--
Added file: http://bugs.python.org/file35666/issue19776_1.patch

___
Python tracker 
<http://bugs.python.org/issue19776>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21786] Use assertEqual in test_pydoc

2014-06-16 Thread Claudiu Popa

Changes by Claudiu Popa :


--
title: Use self.assertEqual in test_pydoc -> Use assertEqual in test_pydoc

___
Python tracker 
<http://bugs.python.org/issue21786>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21786] Use self.assertEqual in test_pydoc

2014-06-16 Thread Claudiu Popa

New submission from Claudiu Popa:

Hello. Here's a patch which uses self.assertEqual in various places across 
test_pydoc, instead of the current idiom:

if result != expected_text:
   print_diffs(expected_text, result)
   self.fail("outputs are not equal, see diff above")

--
components: Tests
files: modernize_test_pydoc.patch
keywords: patch
messages: 220793
nosy: Claudiu.Popa
priority: normal
severity: normal
status: open
title: Use self.assertEqual in test_pydoc
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35667/modernize_test_pydoc.patch

___
Python tracker 
<http://bugs.python.org/issue21786>
___
___
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

2014-06-17 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: needs patch -> patch review

___
Python tracker 
<http://bugs.python.org/issue15582>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2014-06-17 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: test needed -> patch review
versions: +Python 3.5 -Python 3.3

___
Python tracker 
<http://bugs.python.org/issue7769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7769] SimpleXMLRPCServer.SimpleXMLRPCServer.register_function as decorator

2014-06-17 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue7769>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21790] Change blocksize in http.client to the value of resource.getpagesize

2014-06-17 Thread Claudiu Popa

Claudiu Popa added the comment:

resource module is available only on Unix.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue21790>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-06-18 Thread Claudiu Popa

New submission from Claudiu Popa:

Hello. I noticed the following behaviour while working with xmlrpc proxy 
methods.

>>> import inspect, xmlrpc.client
>>> proxy = xmlrpc.client.ServerProxy('http://localhost:8000')
>>> proxy.mul

>>> inspect.signature(proxy.mul)

>>>


Now, according to the documentation, inspect.signature should return a 
signature or fail, but in this case it returns the actual object, which is 
misleading at least. This happens because _Method implements a proxy 
__getattr__, any accessed attribute becoming again a _Method. At the same time, 
inspect.signature happily uses 

try:
   obj.__signature__
except AttributeError:
   ...

to obtain the signature, if present.

The attached patch checks if __signature__ is an actual Signature object. I 
searched, but couldn't find any, if __signature__ can be anything, so I hope 
that this approach works.

--
components: Library (Lib)
files: inspect_signature.patch
keywords: patch
messages: 220936
nosy: Claudiu.Popa, yselivanov
priority: normal
severity: normal
status: open
title: inspect.signature doesn't always return a signature
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35682/inspect_signature.patch

___
Python tracker 
<http://bugs.python.org/issue21801>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-06-18 Thread Claudiu Popa

Claudiu Popa added the comment:

os.chown is not available on Windows. But maybe pwd can't be built on any Unix 
system, so not using import_module is okay.

"=> I can not because assertRaisesRegex can not be used with "with" statement."

Not true (see 
https://docs.python.org/3/library/unittest.html?highlight=assertraisesregex#unittest.TestCase.assertRaisesRegex).

--

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20295] imghdr add openexr support

2014-06-19 Thread Claudiu Popa

Claudiu Popa added the comment:

Here's an updated patch with a small exr test file.

--
Added file: http://bugs.python.org/file35692/issue20295.patch

___
Python tracker 
<http://bugs.python.org/issue20295>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-06-20 Thread Claudiu Popa

Claudiu Popa added the comment:

I think you can skip the entire test class if os.chown is not available. Also, 
maybe you can move the obtaining of groups and users in setUpClass? 
Also, in 

+with self.assertRaises(PermissionError) as cx:
+os.chown(support.TESTFN, uid_1, gid)
+os.chown(support.TESTFN, uid_2, gid)

if the first os.chown will raise the PermissionError, the second one won't be 
called, maybe that's not what you intended to do.

--

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-06-20 Thread Claudiu Popa

Changes by Claudiu Popa :


--
versions: +Python 3.5 -Python 3.3

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21740] doctest doesn't allow duck-typing callables

2014-06-20 Thread Claudiu Popa

Claudiu Popa added the comment:

How about using this?

diff -r 1e74350dd056 Lib/doctest.py
--- a/Lib/doctest.pyTue Jun 17 22:27:46 2014 -0500
+++ b/Lib/doctest.pyFri Jun 20 11:08:00 2014 +0300
@@ -984,7 +984,8 @@
 for valname, val in obj.__dict__.items():
 valname = '%s.%s' % (name, valname)
 # Recurse to functions & classes.
-if ((inspect.isroutine(val) or inspect.isclass(val)) and
+
+if ((inspect.isroutine(inspect.unwrap(val)) or 
inspect.isclass(val)) and
 self._from_module(module, val)):
 self._find(tests, val, valname, module, source_lines,
globs, seen)

This seems to work for the given example and if the decorator uses 
update_wrapper or @wraps.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue21740>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21768] Fix a NameError in test_pydoc

2014-06-20 Thread Claudiu Popa

Claudiu Popa added the comment:

Through a checker program. I ran pylint from time to time to detect crashes and 
other stuff and I stumble across these bugs.

--

___
Python tracker 
<http://bugs.python.org/issue21768>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-06-20 Thread Claudiu Popa

Claudiu Popa added the comment:

Your patch looks good to me.

--

___
Python tracker 
<http://bugs.python.org/issue21801>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21817] `concurrent.futures.ProcessPoolExecutor` swallows tracebacks

2014-06-21 Thread Claudiu Popa

Claudiu Popa added the comment:

Hello. Here's a patch based on c4f92b597074, which adds something similar to 
multiprocessing.pool.
The output after the patch is:

concurrent.futures.process.RemoteTraceback:
"""
Traceback (most recent call last):
  File "D:\Projects\cpython\lib\concurrent\futures\process.py", line 153, in 
_process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "D:\Projects\cpython\PCbuild\a.py", line 9, in f
return g()
  File "D:\Projects\cpython\PCbuild\a.py", line 13, in g
assert False
AssertionError
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "a.py", line 20, in 
future.result()
  File "D:\Projects\cpython\lib\concurrent\futures\_base.py", line 402, in 
result
return self.__get_result()
  File "D:\Projects\cpython\lib\concurrent\futures\_base.py", line 354, in 
__get_result
raise self._exception
AssertionError


It's a little better than the current output, even though it's a little verbose.

--
keywords: +patch
nosy: +Claudiu.Popa
stage:  -> patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file35719/issue21817.patch

___
Python tracker 
<http://bugs.python.org/issue21817>
___
___
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

2014-06-21 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage:  -> patch review

___
Python tracker 
<http://bugs.python.org/issue21527>
___
___
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

2014-06-22 Thread Claudiu Popa

Claudiu Popa added the comment:

The problem is that the repr of the underlying db is not very helpful either, 
as seen for the dbm backend.

>>> import dbm
>>> dbm.open("test", "c")

>>> f=_
>>> f[b"2"] = b"a"
>>> f

>>>

But it shows the content of the underlying database, not the key / value pairs 
passed in the constructor:

>>> shelve.open("test1")
DbfilenameShelf({})
>>> f=_
>>> f["2"] = "4"
>>> f
DbfilenameShelf({'2': '4'})
>>> f["40"] = "50"
>>> f.dict

>>> f.dict.keys()
[b'40', b'2']
>>>

--

___
Python tracker 
<http://bugs.python.org/issue21670>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21829] Wrong test in ctypes

2014-06-23 Thread Claudiu Popa

New submission from Claudiu Popa:

There's a problem with ctypes.test.test_values on Windows.
First, the test is wrong because it uses the following:

if __debug__:
self.assertEqual(opt, 0)
elif ValuesTestCase.__doc__ is not None:
self.assertEqual(opt, 1)

ValuesTestCase doesn't have a docstring and the check always fails when running 
the test suite with -O or -OO.
Second, running the test suite with -O and afterwards with -OO, will lead to 
the following failure:

==
FAIL: test_optimizeflag (ctypes.test.test_values.Win_ValuesTestCase)
--
Traceback (most recent call last):
  File "D:\Projects\cpython\lib\ctypes\test\test_values.py", line 50, in 
test_optimizeflag
self.assertEqual(opt, 1)
AssertionError: 2 != 1

--

That's because the .pyo file for test_values already exist when rerunning with 
-OO and the docstring will be there. Now, I don't know why the file is not 
rebuilt and the documentation regarding -OO and -O is pretty scarce. The 
attached file tries a different approach, regenerate a test class each time the 
test is run in order to obtain its docstring. If run with -OO, it will be 
dropped properly.

--
components: Tests, ctypes
files: ctypes.patch
keywords: patch
messages: 221351
nosy: Claudiu.Popa
priority: normal
severity: normal
stage: patch review
status: open
title: Wrong test in ctypes
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file35738/ctypes.patch

___
Python tracker 
<http://bugs.python.org/issue21829>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21829] Wrong test in ctypes

2014-06-23 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +zach.ware

___
Python tracker 
<http://bugs.python.org/issue21829>
___
___
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

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

Fair point, Serhiy. But I see the shelve more similar to a persistent, 
dictionary-like object, than to a file. The fact that it uses some database 
behind is just an implementation detail.

--

___
Python tracker 
<http://bugs.python.org/issue21670>
___
___
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

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

Alright, I agree with you now. You can close the issue if you want.

--

___
Python tracker 
<http://bugs.python.org/issue21670>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

It would be nice if this could be committed. It's cumbersome to always have to 
deactivate the AV solution when running the tests on Windows, in order to avoid 
a failure of test_httpservers.

--

___
Python tracker 
<http://bugs.python.org/issue20155>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12622] failfast argument to TextTestRunner not documented

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

Mark, why not contributing a patch? Seems pretty straight forward to write it.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue12622>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

Why the need of "as _" in the with statement? I don't understand it. Otherwise, 
looks good to me.

--

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12916] Add inspect.splitdoc

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

There's a small typo in your patch, strign instead of string. Otherwise, looks 
good to me.

--
stage: patch review -> commit review

___
Python tracker 
<http://bugs.python.org/issue12916>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20295] imghdr add openexr support

2014-06-24 Thread Claudiu Popa

Claudiu Popa added the comment:

This seems commit ready.

--
stage: patch review -> commit review

___
Python tracker 
<http://bugs.python.org/issue20295>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18853] Got ResourceWarning unclosed file when running Lib/shlex.py demo

2014-06-25 Thread Claudiu Popa

Claudiu Popa added the comment:

It seems commit ready.

--
nosy: +Claudiu.Popa
stage: patch review -> commit review
versions: +Python 3.5

___
Python tracker 
<http://bugs.python.org/issue18853>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21476] Inconsistent behaviour between BytesParser.parse and Parser.parse

2014-06-25 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage:  -> commit review
title: Inconsitent behaviour between BytesParser.parse and Parser.parse -> 
Inconsistent behaviour between BytesParser.parse and Parser.parse

___
Python tracker 
<http://bugs.python.org/issue21476>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20295] imghdr add openexr support

2014-06-25 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +r.david.murray

___
Python tracker 
<http://bugs.python.org/issue20295>
___
___
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

2014-06-25 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +r.david.murray

___
Python tracker 
<http://bugs.python.org/issue17442>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19821] pydoc.ispackage() could be more accurate

2014-06-25 Thread Claudiu Popa

Claudiu Popa added the comment:

I would go on the deprecation route with this and removing it in 3.6, just like 
the formatter module.

--

___
Python tracker 
<http://bugs.python.org/issue19821>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-06-26 Thread Claudiu Popa

Claudiu Popa added the comment:

Looks good to me.

--
stage: patch review -> commit review

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
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

2014-06-26 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +r.david.murray

___
Python tracker 
<http://bugs.python.org/issue19628>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21151] winreg.SetValueEx causes crash if value = None

2014-06-26 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: patch review -> commit review

___
Python tracker 
<http://bugs.python.org/issue21151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19546] configparser leaks implementation detail

2014-06-26 Thread Claudiu Popa

Claudiu Popa added the comment:

Ɓukasz, do you have some time to take a look at this patch?

--
type:  -> behavior
versions: +Python 3.5
Added file: http://bugs.python.org/file35791/issue19546_1.patch

___
Python tracker 
<http://bugs.python.org/issue19546>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2014-06-26 Thread Claudiu Popa

Claudiu Popa added the comment:

I got a failure on FreeBSD:

[1/1] test_shutil
test test_shutil failed -- Traceback (most recent call last):
  File "/tank/libs/cpython/Lib/test/test_shutil.py", line 1258, in test_chown
shutil.chown(os.path.basename(filename), dir_fd=dirfd)
  File "/tank/libs/cpython/Lib/shutil.py", line 983, in chown
raise ValueError("user and/or group must be set")
ValueError: user and/or group must be set


It seems that either user or group argument must be passed along with dir_fd.

--

___
Python tracker 
<http://bugs.python.org/issue18108>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10312] intcatcher() can deadlock

2014-06-26 Thread Claudiu Popa

Changes by Claudiu Popa :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue10312>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10312] intcatcher() can deadlock

2014-06-26 Thread Claudiu Popa

Claudiu Popa added the comment:

It's still in Python 2, though.

--
nosy: +Claudiu.Popa
resolution: out of date -> 
stage: resolved -> 
status: closed -> open
versions:  -Python 3.1, Python 3.2

___
Python tracker 
<http://bugs.python.org/issue10312>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10513] sqlite3.InterfaceError after commit

2014-06-27 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue10513>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20562] sqlite3 returns result set with doubled first entry

2014-06-27 Thread Claudiu Popa

Claudiu Popa added the comment:

issue10513 has a patch that fixes this problem as well.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue20562>
___
___
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

2014-06-28 Thread Claudiu Popa

Claudiu Popa added the comment:

It seems that this was actual the case for Python 3.2 and 3.3, but fixed in 
3.4. Unfortunately, it's too late now to add those fields back, since 3.2 and 
3.3 receives only security updates. So I guess this issue can be closed.

--
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue10445>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-06-29 Thread Claudiu Popa

Claudiu Popa added the comment:

Terry is right, this patch doesn't completely work. But with this fix the 
problem is solved:

diff -r 394e6bda5a70 Lib/test/test_httpservers.py
--- a/Lib/test/test_httpservers.py  Sun Jun 29 15:56:21 2014 +0300
+++ b/Lib/test/test_httpservers.py  Sun Jun 29 19:27:16 2014 +0300
@@ -306,7 +306,7 @@
 response = self.request('/', method='FOO')
 self.check_status_and_reason(response, 501)
 # requests must be case sensitive,so this should fail too
-response = self.request('/', method='get')
+response = self.request('/', method='gets')
 self.check_status_and_reason(response, 501)
 response = self.request('/', method='GETs')
 self.check_status_and_reason(response, 501)

--

___
Python tracker 
<http://bugs.python.org/issue20155>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-06-29 Thread Claudiu Popa

Claudiu Popa added the comment:

Although it is incorrect, because the test specifically tests case sensitivity.

--

___
Python tracker 
<http://bugs.python.org/issue20155>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20155] Regression test test_httpservers fails, hangs on Windows

2014-06-29 Thread Claudiu Popa

Claudiu Popa added the comment:

It works with 'custom'.

--

___
Python tracker 
<http://bugs.python.org/issue20155>
___
___
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

2014-06-29 Thread Claudiu Popa

Claudiu Popa added the comment:

Well, for instance, my use cases with InteractiveInterpreter are for debugging 
or creating custom interpreters for various apps and in those cases the patch 
helps, by giving better debugging clues through the exception cause. I agree 
that this was overlooked when exception chaining was added. Also, idlelib's 
PyShell is based on InteractiveInterpreter, but in addition, it implements the 
exception chaining.

--

___
Python tracker 
<http://bugs.python.org/issue17442>
___
___
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

2014-06-29 Thread Claudiu Popa

Claudiu Popa added the comment:

Also, solving this issue seems to be, partially, a prerequisite for issue14805.

--

___
Python tracker 
<http://bugs.python.org/issue17442>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10342] trace module cannot produce coverage reports for zipped modules

2014-06-29 Thread Claudiu Popa

Claudiu Popa added the comment:

Hi, I left a couple of comments on Rietveld.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue10342>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21861] io class name are hardcoded in reprs

2014-06-30 Thread Claudiu Popa

Claudiu Popa added the comment:

The same should be done for _pyio?

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue21861>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8585] zipimporter.find_module is untested

2014-07-02 Thread Claudiu Popa

Changes by Claudiu Popa :


--
stage: needs patch -> commit review
versions: +Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 
<http://bugs.python.org/issue8585>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20069] Add unit test for os.chown

2014-07-03 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +berker.peksag

___
Python tracker 
<http://bugs.python.org/issue20069>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21151] winreg.SetValueEx causes crash if value = None

2014-07-03 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +steve.dower, zach.ware
priority: normal -> high

___
Python tracker 
<http://bugs.python.org/issue21151>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21740] doctest doesn't allow duck-typing callables

2014-07-03 Thread Claudiu Popa

Claudiu Popa added the comment:

Here's a test patch which uses inspect.unwrap. Unfortunately, I can't test with 
numba, so I don't know if it works for that, but any decorated function which 
uses `functools.update_wrapper` or `wraps` should be detected by doctest.

--
keywords: +patch
Added file: http://bugs.python.org/file35838/issue21740.patch

___
Python tracker 
<http://bugs.python.org/issue21740>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21518] Expose RegUnloadKey in winreg

2014-07-06 Thread Claudiu Popa

Claudiu Popa added the comment:

Any type of feedback will be appreciated.

--
stage:  -> patch review

___
Python tracker 
<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

2014-07-07 Thread Claudiu Popa

Claudiu Popa added the comment:

Sure, that sounds good.

--

___
Python tracker 
<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

2014-07-08 Thread Claudiu Popa

Claudiu Popa added the comment:

Here's the patch with only the change for winreg.UnloadKey. I'll have the patch 
with windows_helper soon.

--
Added file: http://bugs.python.org/file35907/winreg_unload_key.patch

___
Python tracker 
<http://bugs.python.org/issue21518>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Hi, thanks for the report. Here's a patch which implements __setstate__ and 
__getstate__ for Row objects.

--
keywords: +patch
nosy: +Claudiu.Popa, ghaering
stage:  -> patch review
versions: +Python 3.5 -Python 3.3
Added file: http://bugs.python.org/file35952/issue21975.patch

___
Python tracker 
<http://bugs.python.org/issue21975>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Using your example, I can't make it to crash using the tip, nor with Python 3.4.

--

___
Python tracker 
<http://bugs.python.org/issue21975>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Nevermind, I didn't see the len call.

--

___
Python tracker 
<http://bugs.python.org/issue21975>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

It doesn't crash anymore with your patch, but the pickle.load fails:

Traceback (most recent call last):
  File "a.py", line 19, in 
load = pickle.loads(dump)
TypeError: function takes exactly 2 arguments (0 given)

--
stage: patch review -> 

___
Python tracker 
<http://bugs.python.org/issue21975>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21975] Using pickled/unpickled sqlite3.Row results in segfault rather than exception

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Ups, I accidentally removed the patch review stage, sorry for that.

--
stage:  -> patch review

___
Python tracker 
<http://bugs.python.org/issue21975>
___
___
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

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Since all the comments have been addressed, it would be nice if this gets 
committed.

--
stage: patch review -> commit review

___
Python tracker 
<http://bugs.python.org/issue19776>
___
___
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

2014-07-14 Thread Claudiu Popa

Claudiu Popa added the comment:

Serhiy, if there's no actual gain in changing this, should we close the issue?

--

___
Python tracker 
<http://bugs.python.org/issue18615>
___
___
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

2014-07-15 Thread Claudiu Popa

Claudiu Popa added the comment:

This new patch fixes some comments from Serhiy. Thanks for the review!

--
stage: commit review -> patch review
Added file: http://bugs.python.org/file35955/issue19776_2.patch

___
Python tracker 
<http://bugs.python.org/issue19776>
___
___
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

2014-07-15 Thread Claudiu Popa

Claudiu Popa added the comment:

Thanks, Serhiy, for the review. Here's the updated version.

--
Added file: http://bugs.python.org/file35956/issue18615.patch

___
Python tracker 
<http://bugs.python.org/issue18615>
___
___
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

2014-07-15 Thread Claudiu Popa

Claudiu Popa added the comment:

Here's a new version. It adds versionchanged directive for 'whathdr' and 
'what'. Serhiy, I hope that now I got right the documentation of the return 
type. I didn't understand at first what was wrong.

--
Added file: http://bugs.python.org/file35958/issue18615_1.patch

___
Python tracker 
<http://bugs.python.org/issue18615>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21986] Pickleability of code objects is inconsistent

2014-07-15 Thread Claudiu Popa

Claudiu Popa added the comment:

It works in IDLE because it registers a custom pickling for code objects, in 
idlelib.rpc:

  copyreg.pickle(types.CodeType, pickle_code, unpickle_code)


where pickle_code / unpickle_code calls marshal.dumps/loads.

Although, I admit that this is weird. If idlelib.rpc is using this for 
transferring data between RPC instances, that's okay, but leaking the behaviour 
in the IDLE's interactive interpreter is not that okay, because leads to 
different results and expectancies between IDLE and Python's interactive 
interpreter.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue21986>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa

Claudiu Popa added the comment:

Maybe something like the attached patch. It doesn't have tests, though, I 
didn't find any tests for the idlelib.rpc anyway.

--
keywords: +patch
Added file: http://bugs.python.org/file35968/idlelib.patch

___
Python tracker 
<http://bugs.python.org/issue21986>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa

Claudiu Popa added the comment:

Thanks, Serhiy.

--
Added file: http://bugs.python.org/file35969/issue21986.patch

___
Python tracker 
<http://bugs.python.org/issue21986>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa

Claudiu Popa added the comment:

TypeError is raised only in Python 2, in Python 3 it's PicklingError.

--

___
Python tracker 
<http://bugs.python.org/issue21986>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21992] New AST node Else() should be introduced

2014-07-16 Thread Claudiu Popa

Changes by Claudiu Popa :


--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue21992>
___
___
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

2014-07-18 Thread Claudiu Popa

Claudiu Popa added the comment:

No, my home directory is actually /root. The attached patch should be clearer 
now (I hope). Regarding your question, wouldn't checking for this duplicate 
what os.path.expanduser already does? (Unless checking for the exact same 
string before returning it.)

--
Added file: http://bugs.python.org/file35994/issue19776_3.patch

___
Python tracker 
<http://bugs.python.org/issue19776>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22013] Add at least minimal support for thread groups

2014-07-20 Thread Claudiu Popa

Claudiu Popa added the comment:

This seems indeed like a weaker version of ThreadPoolExecutor. Here's how your 
example looks with it, not very different and still easy to understand and 
grasp:


from concurrent.futures import ThreadPoolExecutor
from urllib.request import urlretrieve

with ThreadPoolExecutor(max_workers=3) as executor:
url = 'http://www.{site}.org/'
for site in ('perl', 'python', 'jython', 'pypy'):
future = executor.submit(urlretrieve, url.format(site=site), site)



3 lines without imports and the initialisation of the pool.

--
nosy: +Claudiu.Popa

___
Python tracker 
<http://bugs.python.org/issue22013>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   >