[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2017-10-18 Thread Wilfred Hughes

Wilfred Hughes  added the comment:

Note that this also affects the singledispatch library that backports 
singledispatch to Python 2: https://github.com/python/typing/issues/484

--
nosy: +Wilfred.Hughes

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



[issue22237] sorted() docs should state that the sort is stable

2014-08-20 Thread Wilfred Hughes

New submission from Wilfred Hughes:

According to 
https://wiki.python.org/moin/HowTo/Sorting/#Sort_Stability_and_Complex_Sorts 
and Alex Martelli: http://stackoverflow.com/q/1915376/509706, Python's sorted() 
is stable. It would be great to update the docs for sorted() to state this.

--
assignee: docs@python
components: Documentation
messages: 225574
nosy: Wilfred.Hughes, docs@python
priority: normal
severity: normal
status: open
title: sorted() docs should state that the sort is stable
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

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



[issue24857] Crash on comparing call_args with long strings

2015-08-13 Thread Wilfred Hughes

New submission from Wilfred Hughes:

What steps will reproduce the problem?

>>> from mock import Mock
>>> m = Mock()
>>> m(1, 2)

>>> m.call_args == "foob"
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/wilfred/.py_envs/trifle/lib/python2.7/site-packages/mock.py", 
line 2061, in __eq__
first, second = other
ValueError: too many values to unpack

What is the expected output? What do you see instead?

Expected False, got an error instead.

(Migrated from https://github.com/testing-cabal/mock/issues/232 )

--
components: Library (Lib)
messages: 248504
nosy: Wilfred.Hughes
priority: normal
severity: normal
status: open
title: Crash on comparing call_args with long strings
type: crash

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-08-13 Thread Wilfred Hughes

Changes by Wilfred Hughes :


--
title: Crash on comparing call_args with long strings -> mock: Crash on 
comparing call_args with long strings

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-08-13 Thread Wilfred Hughes

Wilfred Hughes added the comment:

This caught me by surprise and I spent a while debugging due to this issue. 
Isn't it reasonable that I can compare two values in Python without exceptions 
being raised?

>>> (1, 2) == "foob"
False

I'm happy to write a patch.

--

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



[issue24857] mock: Crash on comparing call_args with long strings

2015-08-13 Thread Wilfred Hughes

Wilfred Hughes added the comment:

This bug is particularly subtle because it only applies to *long* strings.

>>> m.call_args == "f"
False
>>> m.call_args == "fo"
False
>>> m.call_args == "foo"
False
>>> m.call_args == "foob"
Traceback (most recent call last):
  File "", line 1, in 
  File "build/bdist.linux-x86_64/egg/mock.py", line 2061, in __eq__
ValueError: too many values to unpack

--

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