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

2016-12-13 Thread Sesha Narayanan Subbiah
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?

Thanks
Sesha
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-13 Thread Sesha Narayanan Subbiah
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?


Thanks

Regards

Sesha
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-13 Thread Sesha Narayanan Subbiah
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?


Thanks

Regards

Sesha
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-13 Thread Robert Collins
On 14 December 2016 at 01:26, Sesha Narayanan Subbiah
 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
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-14 Thread Robert Collins
On 14 December 2016 at 18:10, Sesha Narayanan Subbiah
 wrote:
> Hi Rob
>
> Thanks for your reply.
>
> From http://legacy.python.org/download/, I could see that the current
> production releases are Python 3.4 and Python 2.7.6.

Nope - https://www.python.org/downloads/ - 2.7.12 and 3.5.2 are
current. The 'legacy' domain there was from a site revamp, I think its
causing confusion at this point and we should look at retiring it
completely.

> Since we use python for some our legacy applications, we don't want to
> switch to Python 3.0 right now. Moreover, since Python 2.6 is not supported
> anymore, we want to upgrade to Python 2.7.

> Do you suggest I should use Python 2.7.12 which is the latest version in 2.7
> series? I picked up 2.7.6, since it was listed as production release and
> assumed it is the most stable version.

If you can, 3.5.2 is where to switch to. If that won't work, 2.7.12 yes.

-Rob
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-14 Thread Sesha Narayanan Subbiah
Hi Rob

Thanks for your reply.

>From http://legacy.python.org/download/, I could see that the current
production releases are Python 3.4 and Python 2.7.6.

Since we use python for some our legacy applications, we don't want to
switch to Python 3.0 right now. Moreover, since Python 2.6 is not supported
anymore, we want to upgrade to Python 2.7.

Do you suggest I should use Python 2.7.12 which is the latest version in
2.7 series? I picked up 2.7.6, since it was listed as production release
and assumed it is the most stable version.

Thanks
Sesha




On Tue, Dec 13, 2016 at 11:49 PM, Robert Collins 
wrote:

> On 14 December 2016 at 01:26, Sesha Narayanan Subbiah
>  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
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-14 Thread Sesha Narayanan Subbiah
Thanks Rob. I will try upgrade to 2.7.12. Any idea of this memory view
object that has been back ported to 2.7 can be disabled in any way?

Thanks
Regards
Sesha

On Wed, Dec 14, 2016, 17:33 Robert Collins 
wrote:

> On 14 December 2016 at 18:10, Sesha Narayanan Subbiah
>  wrote:
> > Hi Rob
> >
> > Thanks for your reply.
> >
> > From http://legacy.python.org/download/, I could see that the current
> > production releases are Python 3.4 and Python 2.7.6.
>
> Nope - https://www.python.org/downloads/ - 2.7.12 and 3.5.2 are
> current. The 'legacy' domain there was from a site revamp, I think its
> causing confusion at this point and we should look at retiring it
> completely.
>
> > Since we use python for some our legacy applications, we don't want to
> > switch to Python 3.0 right now. Moreover, since Python 2.6 is not
> supported
> > anymore, we want to upgrade to Python 2.7.
>
> > Do you suggest I should use Python 2.7.12 which is the latest version in
> 2.7
> > series? I picked up 2.7.6, since it was listed as production release and
> > assumed it is the most stable version.
>
> If you can, 3.5.2 is where to switch to. If that won't work, 2.7.12 yes.
>
> -Rob
>
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-14 Thread Paul Moore
On 14 December 2016 at 05:10, Sesha Narayanan Subbiah
 wrote:
> From http://legacy.python.org/download/, I could see that the current
> production releases are Python 3.4 and Python 2.7.6.

That URL seems to be out of date. You should refer to www.python.org,
specifically https://www.python.org/downloads/

Paul
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


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

2016-12-14 Thread Jeff Allen

Hi Sesha:

memoryview is part of the language. Even if you could hide or remove the 
feature, you would be running a specially broken version of Python, 
which can't be good. There is surely a better way to fix the code. If it 
helps any, you're landing here:


https://hg.python.org/cpython/file/v2.7.12/Objects/stringobject.c#l819

in a function used to convert strings to an array of bytes within 
built-in functions. So something that expected a string is being given a 
memoryview object. But it's not possible to guess what or why, and this 
isn't the place to explore your code.


Python-dev is about developing the language. Python-list is the place to 
ask questions about using the language. However, good hunting!


Jeff Allen

On 14/12/2016 12:09, Sesha Narayanan Subbiah wrote:


Thanks Rob. I will try upgrade to 2.7.12. Any idea of this memory view 
object that has been back ported to 2.7 can be disabled in any way?


Thanks
Regards
Sesha




___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com