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

Adodbapi missing files #1445

Merged
merged 70 commits into from
Nov 25, 2019
Merged

Conversation

vernondcole
Copy link
Collaborator

@vernondcole vernondcole commented Nov 23, 2019

This PR does much more than the title suggests.

With this PR, the pywin32/adodbapi subfolder becomes the definitive source for adodbapi. Therefore, the source code can never get out of sync again.

The changes here include:

  • two bug fixes
  • removal of support for Python 2.6 (with simplifications for testing)
  • (unsupported) remote access database connection feature
  • test script set to use Internet available database servers for MS-sql, postgreSQL, and MariaDB.
  • documentation converted from .odt to .md format.

Query: with the addition of my three online database servers, it is possible to run a full "--all" test from anywhere, but that adds about five minutes, per pass, to the unit testing for USA based users. I have, therefore set the default test to run on only a local Jet database. It is not a complete test, but takes only around three seconds. I am working on a subsystem which will spin up Vagrant virtual machines for building and testing pywin32. If that were in place, the long Internet delay in testing would go away, and --all tests would be viable. Did I pick the correct optimization for the present moment?

Explanation: Testing of adodbapi has always been problematical because of the need for test databases. Microsoft has been kind enough to grant me an open source developer's free account which includes the ability to run a small VM on the azure cloud. Using that, I have spun up an Ubuntu-based SQL Server instance that we can use for testing. I have also opened up access on non-standard ports for MySQL and PostgreSQL servers on small VMs that I fund myself in France and California. None of these machines have enough capacity to make it worthwhile for anyone to use them for anything useful, nor are they mission critical for other uses.

xoviat and others added 30 commits January 26, 2018 10:46
When executing python setup.py --user, self.prefix will be set to None. Of course, you will get an error that None can't be os.join'd.
Therefore, using distutils' own variable, which has the script install directory already resolved.
mhammond and others added 20 commits November 16, 2019 11:33
This directory is now added to the start of PATH for version 3.7 and earlier,
and passed to os.add_dll_directory() on 3.8 and later. This will hopefully
work around problems loading pywintypes.dll in various situations.

Fixes mhammond#1432, fixes mhammond#1431
@vernondcole vernondcole requested a review from mhammond November 23, 2019 15:16
@mhammond
Copy link
Owner

I think you did pick the sweet-spot for testing, particularly if the servers being hit are ones not really expecting more traffic. That said though, the reality is that I'm probably not going to work out how to run the more exhaustive tests regularly, so there's a bit of a risk they will not get run. However, we can iterate on that over time.

The changes here look fine. We should get something in CHANGES.txt too, explaining a bit of the motivation etc. If you could add that and then let me know when you think it's ready to merge, I'll pull the pin!

@vernondcole
Copy link
Collaborator Author

Okay. I added a short paragraph in CHANGES.txt and a bit to adodbapi/readme.txt.
It looks like I have fixed enough things that the failures in the CI tests are no longer caused by me.
I don't have a build environment so that I can actually create a test binary, which makes me nervous,
now that I am officially a Q.A. engineer.
I have created a Salt system for provisioning build machines, and I intend to use the pywin32 build environment as an example script there. Then we could add a link to it, and some simple instructions, and anybody could spin up a build machine quite easily, so they can test or customize on their own environment.
I don't have that yet, so for now -- everything I can test works, so, yes, pull the pin.

@mhammond
Copy link
Owner

Awesome, thanks!

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.