Skip to content

Fix w32 problems at AppVeyor #92

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

Closed
wants to merge 2 commits into from

Conversation

phdru
Copy link

@phdru phdru commented Aug 23, 2017

This fixes my problems with pypostgresql at AppVeyor. See successful tests at https://ci.appveyor.com/project/phdru/sqlobject/build/pypostgresql-146

@jwp
Copy link
Contributor

jwp commented Mar 10, 2025

Sorry about the excessive delay here. Aside from working on other projects, I wasn't really sure how I wanted to move forward here as I don't often work in Windows. However, the exception cases would appear to be undesirable so I'll try to sort it out. Some of this might be a matter of documentation and I was also hoping to see some complaints from others on these.

On getpass, getuser appears to be the preferred abstraction to get the user. Defaulting to postgres is a reasonable catch-all, but is there another, even win32 specific, place that should be checked in order to figure out the default user name? Also wondering if getpass.getuser should offer a default parameter for these cases(too late now I guess). Outside of Windows(and unix), I can certainly see cases where a username is not available, but such contexts might conflict with all of clientparameters. It might be reasonable to patch most of clientparameters out entirely in order to integrate the driver in such cases.

On %APPDATA%... clientparameters aspires to have, some or much, consistency with psql/libpq's behavior, so I guess I'll take a look at what libpq does given its absence and make sure that we're consistent here.

The patches are mostly fine at a glance, but I was never sure about whether this would be the desired behavior versus just allowing the user to compensate by adjusting the environment at the Python or system level. It might be the expectation that clientparameters (and postgresql.open)should be avoided entirely in such contexts and Connector's should be used directly. There is a lot of focus on postgresql.open's usage, so I'm not sure someone would even think to disregard it for something lower-level.

@phdru
Copy link
Author

phdru commented Mar 10, 2025

The delay was too excessive. Also my biggest problem with py-postgres is a bug in parsing Pg version on Debian/Ubuntu but the PR #114 was closed. I lost interest in py-postgres and dropped it from the list of supported DB API drivers. Have forgotten to close my issues and PRs, doing it now.

@phdru phdru closed this Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants