HUE-8737 [core] Fix byte string cause migration fail in Python 3.5

Review Request #14335 — Created Oct. 1, 2019 and updated

yingc
hue
master
HUE-8737
hue
jgauthier, johan, romain, weixia
commit dd54122cc837c9ecae1be8aec1eaa3b2f1506c0b (HEAD -> ying-python3-rebased-review5)
Author: Ying Chen <yingchen@cloudera.com>
Date:   Wed Apr 17 13:35:19 2019 -0700

    HUE-8737 [core] Fix byte string cause migration fail in Python 3.5

:100644 100644 553fe74d31... efb8114f2a... M    apps/beeswax/src/beeswax/migrations/0001_initial.py
:100644 100644 9c21bf5fcd... 8f2f034aba... M    apps/jobsub/src/jobsub/migrations/0001_initial.py
:100644 100644 5a6b94405c... 8a0bca70de... M    apps/oozie/src/oozie/migrations/0001_initial.py
:100644 100644 a4781c6d95... c38c51a765... M    apps/pig/src/pig/migrations/0001_initial.py
:100644 100644 7643366ff2... 6c4f9c16f3... M    apps/search/src/search/migrations/0001_initial.py
:100644 100644 4231010c04... 8c7e6f85bc... M    apps/useradmin/src/useradmin/migrations/0001_initial.py
:100644 100644 1598e7e3db... ae9e2004fa... M    desktop/core/src/desktop/migrations/0002_initial.py


romain
  1. btw: do we need a switch to keep the b for python 2 or is it fine?

    1. https://stackoverflow.com/questions/6269765/what-does-the-b-character-do-in-front-of-a-string-literal

      Quote from the Python 2.x documentation:
      A prefix of 'b' or 'B' is ignored in Python 2; it indicates that the literal should become a bytes literal in Python 3 (e.g. when code is automatically converted with 2to3). A 'u' or 'b' prefix may be followed by an 'r' prefix.

      So, it should be fine in Py2 with or without b prefix.

  2. 
      
Loading...