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

Expose check_same_thread option for sqlite connection #46

Merged
merged 2 commits into from
Jan 16, 2019

Conversation

jamespeacock
Copy link
Contributor

Set to False by default but now it is a configurable option

@coveralls
Copy link

coveralls commented Jan 15, 2019

Pull Request Test Coverage Report for Build 166

  • 7 of 7 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 63.596%

Totals Coverage Status
Change from base Build 164: 0.04%
Covered Lines: 573
Relevant Lines: 901

💛 - Coveralls

@reece
Copy link
Member

reece commented Jan 15, 2019

@jamespeacock Thanks for the PR!

What do you think about requiring that check_same_thread = True if writable == True? I'm assuming that thread safety only matters when the repo is writable (true?).

@jamespeacock
Copy link
Contributor Author

I think that is super reasonable and will safeguard from improper use.
Does the hgvs package have any usages of SeqRepo with writeable=True?
I'm mostly thinking about implications for users of hgvs if this change by default turns the same thread check off.

Will update the PR with this change!

@reece
Copy link
Member

reece commented Jan 16, 2019

Fabulous. Thanks again, James!
No, hgvs uses seqrepo in the default read-only mode.
In fact, the only time the repo is writable in any of my uses or by biocommons code is during loading.

@reece reece merged commit f778d12 into biocommons:master Jan 16, 2019
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.

None yet

3 participants