pyramid_rpc & jsonrpc on Python 3.12

16 views
Skip to first unread message

Petr Blahoš

unread,
Jun 20, 2024, 12:59:09 PMJun 20
to pylons-...@googlegroups.com
Hi, I have encountered a strange problem. My jsonrpc views stopped
working, and it looks like it's because

a = {"a": 1, "b": 2}
a[:]

now raises KeyError instead of TypeError. I have not yet found the change
mentioned in python docs but I suppose it may well be legit. Anyway, do
you guys have any knowledge about this by any chance?

If there is no objection, I will prepare a patch to pyramid_rpc
that catches KeyError alongside TypeError.


Best regards,
Petr
--

Lele Gaifax

unread,
Jun 21, 2024, 2:12:17 AMJun 21
to pylons-...@googlegroups.com
Petr Blahoš <pe...@blahos.com> writes:

> I have not yet found the change mentioned in python docs but I suppose
> it may well be legit.

Mentioned in the "Other Language Changes" section of
https://docs.python.org/3/whatsnew/3.12.html:

slice objects are now hashable, allowing them to be used as dict keys
and set items. (Contributed by Will Bradshaw, Furkan Onder, and
Raymond Hettinger in gh-101264
[https://github.com/python/cpython/pull/101264])

bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
le...@metapensiero.it | -- Fortunato Depero, 1929.

Reply all
Reply to author
Forward
0 new messages