Comments (12)
I'll submit a follow up PR tomorrow morning to get this released
from pytest-mock-resources.
Actually, i think the PR might have inadvertantly broken sqlalchemy 1.3, so i'm going to try to test that today and fix if so before i release
from pytest-mock-resources.
I'm actually not concerned about tests being 1.3 specific, necessarily, because we can choose our own version in the test suite. although we may want to add a 1.3-specific CI job to have detected this.
I'm more concerned about 1.3 runtime compatibility, which i think #110 should address (hopefully). Tests passed locally with 1.3
from pytest-mock-resources.
Yup, https://pypi.org/project/pytest-mock-resources/2.1.0/
from pytest-mock-resources.
Because the function returns the fixture, i suppose i'd prefer the async_
parameter to a secondary function. @oakhan3?
I suspect it's going to be vastly easier to produce an async engine after things like model creation/data insertion, lest you have to duplicate all that logic unnecessarily. Given that, I maybe don't expect that we will need an event loop, handy, so i think we shouldn't need pytest-asyncio.
We should probably have a new extra (postgres-async, say) to include the driver.
A "problem" that occurs to me is that there are more (relative to psycopg2 for sync) realistically usable drivers for async (asyncpg, aiopg). The extra can pick one (i'd guess asyncpg), but today we have no mechanism to pick which one you want your engine created with. That's probably something we can worry about if anyone ever cares though :D.
Speaking of which (@oakhan3). Today we technically support python2, adding this code (unless we @coroutine
decorate instead of async def
) will break <3.5. Personally I'm happy for us to drop support and document 1.0 as the version to use if you use python2.
from pytest-mock-resources.
An async_ parameter works if all original inputs are supported which would be ideal and preferred.
SQLAlchemy does offer asyncio support although it seems to be beta-level atm and only supports python 3.6+. This would likely be the most straight forward way to implement support - albeit more opinionated that letting the user pick via package extras. I'm open to all suggestions!
With that said, I agree, we should drop python 2 support so that we aren't forced to use older syntax and miss out on new performance and options.
from pytest-mock-resources.
@oakhan3 @DanCardin so two different releases? One for dropping python 2 first then followed by another for adding async support?
from pytest-mock-resources.
I dont necessarily think we even really need a release for dropping python 2 explicitly Jk, i think i actually will version bump. I will update the docs, version constraint, and CI in a PR of my own.
You should just be able to deal with the async support in your PR for now, and ignore <3.5 compat freely
EDIT: Yea, so just released 2.0 as a release which just removes "support" for <3.6, so you should be good to go
from pytest-mock-resources.
I dont necessarily think we even really need a release for dropping python 2 explicitlyJk, i think i actually will version bump. I will update the docs, version constraint, and CI in a PR of my own.You should just be able to deal with the async support in your PR for now, and ignore <3.5 compat freely
EDIT: Yea, so just released 2.0 as a release which just removes "support" for <3.6, so you should be good to go
Awesome! Thanks, let me get to it.
from pytest-mock-resources.
I see what you meaning. Some of the tests I added were specific to > 1.3. Maybe we can a CI job to test 1.3 specifically?
from pytest-mock-resources.
Should be released as version 2.1.0
from pytest-mock-resources.
Hey @DanCardin, has the release been made yet?
from pytest-mock-resources.
Related Issues (20)
- Allow specificying an image when using pmr cli HOT 4
- Make use of built-in sqlite json and strict support
- Add support for MySQL 8 HOT 5
- Exception trying to unlink pmr.json when when ran with --pmr-multiprocess-safe HOT 3
- Add Redis the CLI HOT 3
- $round operation for MongoDB HOT 2
- SQLAlchemy 2.0 Support HOT 7
- Certain schema DDL is issued only once per test but should be once per metadata
- Dependabot warning for docker subdependency HOT 3
- [Support] Tests hang when using fixture HOT 7
- Error opening connection from redshift_connector HOT 5
- Add in Left/Right UDF's for Redshift HOT 2
- No such event 'before_execute' for target '<sqlalchemy.orm.session.Session object ... HOT 4
- Support SQLAlchemy 1.4 future mode HOT 4
- Dependency on attrs package should be explicit HOT 3
- get_sqlalchemy_engine() not compatible with asyncpg HOT 5
- Allow defining run_args HOT 1
- Getting errors when using `create_redis_fixture` HOT 3
- Missing delete function in redis fixture HOT 1
- Redis Container dont start after update Docker for Desktop on windows. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-mock-resources.