Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Py2/Py3 compat: Use "gettext.install(..., unicode=True)" in Python 2. #3

Merged
merged 1 commit into from
May 31, 2019

Conversation

pmav99
Copy link
Contributor

@pmav99 pmav99 commented May 18, 2019

unicode is no longer a valid keyword for gettext.install() in Python 3
but we need it on Python 2.

This is in continuation of https://trac.osgeo.org/grass/changeset/74307
which was a fix for: https://trac.osgeo.org/grass/ticket/3790

Fixes https://trac.osgeo.org/grass/ticket/3838

`unicode` is no longer a valid keyword for `gettext.install()` in Python 3
but we need it on Python 2.

This is in continuation of https://trac.osgeo.org/grass/changeset/74307
which was a fix for: https://trac.osgeo.org/grass/ticket/3790

Fixes https://trac.osgeo.org/grass/ticket/3838
@landam landam added the bug Something isn't working label May 19, 2019
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said in https://trac.osgeo.org/grass/ticket/3790, I think https://trac.osgeo.org/grass/changeset/74307 should be reverted because:

I don't know how these changes would be applicable with 74307 reverted. It is okay as a quick fix for part of 3838, but I would prefer this being revisited from the beginning, esp. if we are trying to make the grass package behave like a generally usable Python package.

@pmav99
Copy link
Contributor Author

pmav99 commented May 24, 2019

This PR contains the patch that @marisn confirmed that solves 3838.

WRT to the traceback that is mentioned on comment 12, I still haven't heard from @marisn, but I did try to reproduce it and I could not. If someone can offer clear instructions on how to reproduce the issue, I will be happy to look into it. BTW, the traceback is incomplete, so it is not easy to understand what is the problem, but from what I can tell, it does not seem to be related to gettext.

That being said, the other points should probably be discussed on a separate issue or on the ML.

Copy link
Contributor

@petrasovaa petrasovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine and makes sense. I can't reproduce the problem either.

@landam
Copy link
Member

landam commented May 30, 2019

Please merge the PR.

@petrasovaa petrasovaa merged commit c3be212 into OSGeo:master May 31, 2019
@pmav99 pmav99 deleted the t3838 branch June 2, 2019 21:17
landam added a commit to landam/grass that referenced this pull request Jul 26, 2019
landam added a commit to landam/grass that referenced this pull request Jul 26, 2019
landam added a commit to ctu-geoforall-lab/grass that referenced this pull request Jun 10, 2020
landam pushed a commit to ctu-geoforall-lab/grass that referenced this pull request Jun 10, 2020
Change of input arguments, and adding test.  OSGeo#3

Co-Authored-By: dekanluc <dekanluc@users.noreply.github.com>
@neteler neteler added this to the 7.8.0 milestone Dec 9, 2021
echoix added a commit that referenced this pull request Jun 19, 2024
* CI: Switch Travis to Ubuntu 22.04 (jammmy)

Default Python version reported by Travis for 20.04 is 3.7.13. While that's still a supported version for 8.3 release if it would be released now, 2023-06-27 is end of support for 3.7, so it seems safe to not test the main branch with 3.7 at this point.

Ubuntu 22.04 in Travis uses Python 3.10 by default according to the documentation.

* Update wxgtk pkg to 4.0

* Replace custom install list by apt.txt file from GitHub Actions

* Change shebang to use bash instead of POSIX sh (#3)

* CI(travis): Add --with-pdal in linux.script.sh

* CI(travis): Remove sudo: required as it has no effect

* CI(travis): Fix warning os and dist missing from root

* CI(travis): Fix warning matrix is an alias for jobs

* CI(travis): Run make with make -j $(nproc)

* CI(travis): Show MAKEFLAGS at start of script

* CI(travis): use c++17 standard

* CI(travis): Remove duplicated dist key in include array

* CI(travis): Remove invalid --with-python from configure flags

* CI(travis): Remove unused codecov upload

* CI(travis): Remove irc notification

* CI(travis): Add -Werror and -fPIC to CFLAGS and CXXFLAGS on make call

* CI(travis): Limit runs on branches to main and release branches

* CI(travis): Add -Wfatal-errors

* db: Fix -Wdeprecated-non-prototype in describe.c for clang builds

* CI(travis): Add --no-keep-going in MAKEFLAGS to stop on errors

* db: Fix -Wdeprecated-non-prototype in odbc driver's fetch.c for clang builds

* db: Fix -Wdeprecated-non-prototype in odbc driver's listtab.c for clang builds

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
kritibirda26 pushed a commit to kritibirda26/grass that referenced this pull request Jun 29, 2024
…o#3002)

* CI: Switch Travis to Ubuntu 22.04 (jammmy)

Default Python version reported by Travis for 20.04 is 3.7.13. While that's still a supported version for 8.3 release if it would be released now, 2023-06-27 is end of support for 3.7, so it seems safe to not test the main branch with 3.7 at this point.

Ubuntu 22.04 in Travis uses Python 3.10 by default according to the documentation.

* Update wxgtk pkg to 4.0

* Replace custom install list by apt.txt file from GitHub Actions

* Change shebang to use bash instead of POSIX sh (OSGeo#3)

* CI(travis): Add --with-pdal in linux.script.sh

* CI(travis): Remove sudo: required as it has no effect

* CI(travis): Fix warning os and dist missing from root

* CI(travis): Fix warning matrix is an alias for jobs

* CI(travis): Run make with make -j $(nproc)

* CI(travis): Show MAKEFLAGS at start of script

* CI(travis): use c++17 standard

* CI(travis): Remove duplicated dist key in include array

* CI(travis): Remove invalid --with-python from configure flags

* CI(travis): Remove unused codecov upload

* CI(travis): Remove irc notification

* CI(travis): Add -Werror and -fPIC to CFLAGS and CXXFLAGS on make call

* CI(travis): Limit runs on branches to main and release branches

* CI(travis): Add -Wfatal-errors

* db: Fix -Wdeprecated-non-prototype in describe.c for clang builds

* CI(travis): Add --no-keep-going in MAKEFLAGS to stop on errors

* db: Fix -Wdeprecated-non-prototype in odbc driver's fetch.c for clang builds

* db: Fix -Wdeprecated-non-prototype in odbc driver's listtab.c for clang builds

---------

Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants