diff mbox series

[ovs-dev] v2, python-windows: Fix unicode python tests on Windows

Message ID 20180328091118.14700-1-aserdean@ovn.org
State Changes Requested
Headers show
Series [ovs-dev] v2, python-windows: Fix unicode python tests on Windows | expand

Commit Message

Alin-Gabriel Serdean March 28, 2018, 9:11 a.m. UTC
This patch changes the default filesystem encodings to the values used
before python3.6 to ensure compatibility with older versions.

Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
Co-authored-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
---
v2: update commit message
---
 tests/atlocal.in | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Ben Pfaff March 31, 2018, 7:45 p.m. UTC | #1
On Wed, Mar 28, 2018 at 12:11:18PM +0300, Alin Gabriel Serdean wrote:
> This patch changes the default filesystem encodings to the values used
> before python3.6 to ensure compatibility with older versions.
> 
> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
> Co-authored-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
> ---
> v2: update commit message

I don't really understand this change, but if it fixes a problem in the
tests then I'm all in favor of it.

If it is not difficult, then I would suggest adding a little more
information to the commit message, such as an example of what goes wrong
without it.

Acked-by: Ben Pfaff <blp@ovn.org>
Alin-Gabriel Serdean April 2, 2018, 7:57 a.m. UTC | #2
> -----Mesaj original-----
> De la: ovs-dev-bounces@openvswitch.org <ovs-dev-
> bounces@openvswitch.org> În numele Ben Pfaff
> Trimis: Saturday, March 31, 2018 10:46 PM
> Către: Alin Gabriel Serdean <aserdean@ovn.org>
> Cc: dev@openvswitch.org
> Subiect: Re: [ovs-dev] [PATCH] v2, python-windows: Fix unicode python
> tests on Windows
> 
> On Wed, Mar 28, 2018 at 12:11:18PM +0300, Alin Gabriel Serdean wrote:
> > This patch changes the default filesystem encodings to the values used
> > before python3.6 to ensure compatibility with older versions.
> >
> > Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>
> > Co-authored-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com>
> > ---
> > v2: update commit message
> 
> I don't really understand this change, but if it fixes a problem in the
tests
> then I'm all in favor of it.
> 
> If it is not difficult, then I would suggest adding a little more
information to
> the commit message, such as an example of what goes wrong without it.
> 
> Acked-by: Ben Pfaff <blp@ovn.org>
> _______________________________________________
I'll drop this change and improve the commit message in the next revision.
Thanks for the review!

Alin.
diff mbox series

Patch

diff --git a/tests/atlocal.in b/tests/atlocal.in
index 55f9333ee..0df504be7 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -106,6 +106,15 @@  FreeBSD|NetBSD)
     ;;
 esac
 
+if test x"$PYTHON3" != x && test "$IS_WIN32" = yes; then
+    # enables legacy windows unicode printing needed for Python3 compatibility
+    # with the Python2 tests
+    PYTHONLEGACYWINDOWSFSENCODING=true
+    export PYTHONLEGACYWINDOWSFSENCODING
+    PYTHONLEGACYWINDOWSSTDIO=true
+    export PYTHONLEGACYWINDOWSSTDIO
+fi
+
 # Check whether to run IPv6 tests.
 if $PYTHON -c '
 import socket