[Python-Dev] Removing memoryview object patch from Python 2.7

Robert Collins robertc at robertcollins.net
Tue Dec 13 13:19:11 EST 2016


On 14 December 2016 at 01:26, Sesha Narayanan Subbiah
<sesha.subbiah at gmail.com> wrote:
> Hello
>
>
> I have some implementation that currently uses python 2.6.4, which I m
> trying to upgrade to Python 2.7.6. After upgrade, I get the following error:
>
>
> "expected string or Unicode object, memoryview found"
>
>
> On checking further, I could find that memory view object has been back
> ported to python 2.7 using this patch:
>
>
> https://bugs.python.org/issue2396
>
>
> I would like to know if it is safe to revert this patch alone from Python
> 2.7.6, or do we know if there are any other dependencies?

I'm not sure - if you're going to run with old, custom, builds of
Python, you're probably best served by testing comprehensively for
this yourself.

That said, I have to presume that the error you're getting is from
some code that should be changed anyway, and will need to be changed
when you move to Python 3. Please remember that Python 2.7.6 was
released in 2013 - there have been many security issues since then,
including some of the most egregious SSL issues ever, which should
prompt you to run the latest 2.7 branch (if you're unable to migrate
straight to 3.x.

-Rob


More information about the Python-Dev mailing list