-
Notifications
You must be signed in to change notification settings - Fork 35
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
Change method for getting default user name, some sudo versions unexcepted working with getpass #67
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #67 +/- ##
=======================================
Coverage 95.93% 95.93%
=======================================
Files 18 18
Lines 1674 1674
=======================================
Hits 1606 1606
Misses 68 68
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -1,4 +1,4 @@ | |||
FROM postgres:${PG_VERSION}-alpine | |||
FROM postgres:${PG_VERSION}-alpine3.14 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А зачем эта фиксация версии?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в новом alpine python 3.10 и
A) там нужен крупный рефакторинг чтобы прошел flake8
Б) make html не работает на 3.10 (sphinxcontrib-napoleon не импортируется, ибо не обновлялся уже 4 года)
т.е. правка только для того, чтобы прошел тревис
пункты A и Б предлагаю решать отдельным большим issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://pypi.org/project/sphinxcontrib-napoleon/
As of Sphinx 1.3, the napoleon extension will come packaged with Sphinx under sphinx.ext.napoleon. The sphinxcontrib.napoleon extension will continue to work with Sphinx <= 1.2.
@@ -18,7 +18,7 @@ def default_username(): | |||
Return default username (current user). | |||
""" | |||
|
|||
return getpass.getuser() | |||
return pwd.getpwuid(os.getuid())[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А под Windows как это работает?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"No module named 'pwd'"
For example sudo version 1.8.25p1:
[root@centos-8 ~]# sudo -u test sh -c 'python3 -c "import getpass; print(getpass.getuser())"';
root
[root@centos-8 ~]# sudo -u test sh -c 'python3 -c "import os; print(os.getlogin())"';
test