Status: New Owner: ---- New issue 99 by n...@redtetrahedron.org: DeprecationWarning from inputstream.EncodingBytes http://code.google.com/p/html5lib/issues/detail?id=99
../home/nem/html5lib/python/src/html5lib/inputstream.py:448: DeprecationWarning: object.__init__() takes no parameters str.__init__(self, value) After switching to python2.6 I started getting the above warning. The fix is to have EncodingBytes define a __new__ function that call str.__new__ with the value argument. This is because strings are immutable objects and creation is completed before the __init__ method is run. The attached (trivial) patch corrects this. I tested on 2.5 and 2.6 but I believe this should work everywhere Technically you don't need to define the new method, just stop passing "value" to str.__init__. However that makes it unclear as to what is actually happening. Attachments: html5lib.diff 618 bytes -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "html5lib-discuss" group. To post to this group, send email to html5lib-discuss@googlegroups.com To unsubscribe from this group, send email to html5lib-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/html5lib-discuss?hl=en-GB -~----------~----~----~----~------~----~------~--~---
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4