Use native string types for all os.environ keys and values.
Review Request #10228 — Created Oct. 13, 2018 and submitted — Latest diff uploaded
On Python 2, we're supposed to use byte strings for
os.environ
(though
how important this is is platform-dependent), while on Python 3 we're
supposed to use Unicode strings instead. To be compatible with both, we
now ensure we're using native strings by wrapping text instr(...)
and
variables in Django'sforce_str(...)
. While more verbose, it should
ensure compatibility across both versions of Python.
Unit tests pass on Python 2.7 and 3.x (in areas that can currently be
tested).
Diff Revision 1 (Latest)
reviewboard/__init__.py |
---|
reviewboard/manage.py |
---|
reviewboard/settings.py |
---|
reviewboard/admin/checks.py |
---|
reviewboard/admin/siteconfig.py |
---|
reviewboard/admin/tests.py |
---|
reviewboard/cmdline/rbext.py |
---|
reviewboard/cmdline/rbsite.py |
---|
reviewboard/cmdline/rbssh.py |
---|
reviewboard/extensions/packaging.py |
---|
reviewboard/scmtools/bzr/__init__.py |
---|
reviewboard/scmtools/tests/test_bazaar.py |
---|
reviewboard/scmtools/tests/test_hg.py |
---|
reviewboard/ssh/tests.py |
---|
reviewboard/ssh/utils.py |
---|
tests/runtests.py |
---|