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

Use open() instead of file() to read SPARQL query files #76

Merged
merged 1 commit into from
Oct 20, 2020

Conversation

osma
Copy link
Member

@osma osma commented Oct 20, 2020

This fixes a Python 3 incompatibility. When a configuration file states that a CONSTRUCT or UPDATE SPARQL query should be read from a file (e.g. [email protected]), the code was using the Python 2 builtin function file() to read it. This builtin function was removed in Python 3. open() works in both Python 2 and 3.

@osma osma added the bug label Oct 20, 2020
@osma osma changed the title Use open() instead of file() (removed from python 3) to read SPARQL query files Use open() instead of file() to read SPARQL query files Oct 20, 2020
@codecov-io
Copy link

codecov-io commented Oct 20, 2020

Codecov Report

Merging #76 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #76   +/-   ##
=======================================
  Coverage   58.65%   58.65%           
=======================================
  Files          10       10           
  Lines         924      924           
=======================================
  Hits          542      542           
  Misses        382      382           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc44847...9275acf. Read the comment docs.

@osma osma merged commit 7e169d8 into master Oct 20, 2020
@osma osma deleted the fix-py3-open-instead-of-file branch October 20, 2020 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants