8000 Initialization of Helpers._get_default_encoding_func is corrected [py3.9] by dmitry-lipetsk · Pull Request #221 · postgrespro/testgres · GitHub
[go: up one dir, main page]

Skip to content

Initialization of Helpers._get_default_encoding_func is corrected [py3.9] #221

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Initialization of Helpers._get_default_encoding_func is corrected [py…
…3.9]

Python 3.9 does not undestand the following code:

_get_default_encoding_func = _make_get_default_encoding_func()

ERROR - TypeError: 'staticmethod' object is not callable

https://app.travis-ci.com/github/postgrespro/testgres/jobs/631402370

The code:
_get_default_encoding_func = _make_get_default_encoding_func.__func__()

is processed without problems.
  • Loading branch information
dmitry-lipetsk committed Mar 16, 2025
commit b20ace6b2edf3b373e5598094c877604e2870e1a
2 changes: 1 addition & 1 deletion testgres/operations/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def _make_get_default_encoding_func():
return locale.getpreferredencoding

# Prepared pointer on function to get a name of system codepage
_get_default_encoding_func = _make_get_default_encoding_func()
_get_default_encoding_func = _make_get_default_encoding_func.__func__()

@staticmethod
def GetDefaultEncoding():
Expand Down
0