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

Change method for getting default user name, some sudo versions unexcepted working with getpass #67

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Dockerfile.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM postgres:${PG_VERSION}-alpine
FROM postgres:${PG_VERSION}-alpine3.14
Copy link
Member

Choose a reason for hiding this comment

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

А зачем эта фиксация версии?

Copy link
Contributor Author

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

Copy link
Collaborator

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.


ENV PYTHON=python${PYTHON_VERSION}
RUN if [ "${PYTHON_VERSION}" = "2" ] ; then \
Expand Down
3 changes: 1 addition & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $PIP install coverage flake8 psutil Sphinx sphinxcontrib-napoleon
# install testgres' dependencies
export PYTHONPATH=$(pwd)
$PIP install .

# test code quality
flake8 .

Expand Down Expand Up @@ -67,4 +66,4 @@ cd ..
set +eux

# send coverage stats to Codecov
bash <(curl -s https://codecov.io/bash)
bash <(curl -s https://codecov.io/bash)
4 changes: 2 additions & 2 deletions testgres/defaults.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime
import getpass
import os
import pwd
import struct
import uuid

Expand All @@ -18,7 +18,7 @@ def default_username():
Return default username (current user).
"""

return getpass.getuser()
return pwd.getpwuid(os.getuid())[0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

А под Windows как это работает?

Copy link
Collaborator

Choose a reason for hiding this comment

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

"No module named 'pwd'"



def generate_app_name():
Expand Down