profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/rchateauneu/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Remi Chateauneu rchateauneu Primhill Computers London http://primhillcomputers.com/

rchateauneu/survol 6

Legacy software analysis. Based on CIM/WMI/WBEM, with a web ui

rchateauneu/pydbg 5

A pure-python win32 debugger interface.

rchateauneu/psutil 1

Cross-platform lib for process and system monitoring in Python

rchateauneu/cells 0

Dependencies direct acyclic graph based expressions, in C++.

rchateauneu/conda-build 0

Commands and tools for building conda packages

rchateauneu/dl-fldigi 0

Modified version of fldigi - a soundcard decoding program

rchateauneu/hamlib 0

Ham radio control libraries

rchateauneu/itoa-benchmark 0

C++ integer-to-string conversion benchmark

rchateauneu/proc_events 0

Access the process event connector in linux kernels from Python.

rchateauneu/python-libslp 0

OpenSLP API Python binidngs

issue openedRDFLib/sparqlwrapper

Fails to execute a query on dbpedia: ssl certificate problem

Hello I'm used to use SPARQLWrapper with success. But, today, in my environment, I get the following error Début de run Comment :=>> <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)> and I don't understand how tosolve this problem. If I directly use urlopen, I can do something like this (unsecure, I know) unsecurecontext = ssl._create_unverified_context() ... urlopen(urldbpedia, context=unsecurecontext) ... But, I'm unable to find a method to manage that with SPARQLWrapper, cleanly or uncleanly.

created time in 10 hours

pull request commentRDFLib/rdflib

Configure pytest

I looked a bit at the test generation from test/manifest.py. I think the easiest way to map this to pytest is to use https://github.com/pytest-dev/pytest-subtests

Would like to get some feedback here before moving forward with that though.

white-gecko

comment created time in 19 hours

pull request commentRDFLib/rdflib

Configure pytest

To clarify the scope here, I presume the goal is to get rid of everything nose related?

white-gecko

comment created time in 19 hours

issue openedOpenRCE/paimei

Proposing a PR to fix a few small typos

Issue Type

[x] Bug (Typo)

Steps to Replicate and Expected Behaviour

  • Examine MacOSX/macdll/Exception.c, console/modules/_PAIMEIdiff/ModuleMatcher.py, deprecated/codenomicrap.py, deprecated/fuzzie.py, struct_spy.py, utils/code_coverage.py and observe occured, however expect to see occurred.
  • Examine console/modules/_PAIMEIpstalker/TargetsTreeCtrl.py, pida/module.py and observe propogate, however expect to see propagate.
  • Examine utils/crash_binning.py and observe disassemly, however expect to see disassembly.
  • Examine MacOSX/macdll/Exception.c and observe succes, however expect to see success.
  • Examine console/modules/_PAIMEIpstalker/HitsListCtrl.py and observe occurence, however expect to see occurrence.
  • Examine ollydbg_connector/plugin.h and observe menues, however expect to see menus.
  • Examine console/modules/PAIMEIdiff.py and observe insiginificant, however expect to see insignificant.
  • Examine console/modules/_PAIMEIpstalker/export_idc_dialog.py and observe informaton, however expect to see information.
  • Examine ollydbg_connector/plugin.h and observe hiliting, however expect to see highlighting.
  • Examine ollydbg_connector/plugin.h and observe highlited, however expect to see highlighted.
  • Examine MacOSX/macdll/MacDll.c and observe fuctions, however expect to see functions.
  • Examine console/modules/PAIMEIdiff.py and observe fuction, however expect to see function.
  • Examine pydbg_server.py and observe excplicity, however expect to see explicitly.
  • Examine ollydbg_connector/plugin.h and observe decription, however expect to see description.
  • Examine MacOSX/macdll/Exception.c and observe demostration, however expect to see demonstration.

Notes

Semi-automated issue generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

To avoid wasting CI processing resources a branch with the fix has been prepared but a pull request has not yet been created. A pull request fixing the issue can be prepared from the link below, feel free to create it or request @timgates42 create the PR. Alternatively if the fix is undesired please close the issue with a small comment about the reasoning.

https://github.com/timgates42/paimei/pull/new/bugfix_typos

Thanks.

created time in 21 hours

pull request commentRDFLib/rdflib

Implement Service Clause in Sparql Support

Does this close #484 and #769?

JervenBolleman

comment created time in a day

PR opened RDFLib/rdflib

Add handling for 308 (Permanent Redirect)

Some/all supported versions of python does not handle 308 (Permanent Redirect) in urlopen.

See https://bugs.python.org/issue40321 for more info on this.

This patch adds handling for 308 in rdflib.

I also extracted the HTTP mock from test_sparqlstore.py and reused it in test_conneg.

Any feedback on it will be appreciated.

Fixes #1040

Proposed Changes

  • Move HTTP mocking stuff out of test_sparqlstore.py into testutils.py
  • Add handling of 308 (Permanent Redirect)
+235 -133

0 comment

4 changed files

pr created time in 2 days

issue commentRDFLib/rdflib

Parser errors on permanent redirect

See also this: https://bugs.python.org/issue40321

jimmccusker

comment created time in 2 days

issue commentRDFLib/rdflib

Parser errors on permanent redirect

The problem here is that urllib does not handle 308, but it does handle 302 and 303. Working on adding handling outside of the library.

jimmccusker

comment created time in 2 days

push eventfishstiqz/pycdb

nonetype

commit sha dbd21359e52430c92594000a312d73ae0be892ec

Fix linebreak checking statement

view details

nonetype

commit sha e0548bb1012b91325e97d2093410354b01bf1954

Fix write_mem buffer encoding error in python3

view details

goldstar611

commit sha 41785d53231b2aab4a77522494da46b5bc84deaa

Merge pull request #19 from nonetype/master * PR#19: Fix linebreak checking statement * PR#19: Fix write_mem buffer encoding error in python3

view details

push time in 2 days

PR merged fishstiqz/pycdb

Fix errors in Python3 environment bug

Fixes #18

+6 -3

0 comment

1 changed file

nonetype

pr closed time in 2 days

issue closedfishstiqz/pycdb

Errors in Python3 environment

1. always FALSE(type mismatching)

https://github.com/fishstiqz/pycdb/blob/03191d976c11cb67f9dfe6f8ead823de0e8808cf/pycdb/pycdb.py#L234-L260

  • Var curline and ch's type is bytes (L236, L239)
  • but statement in L255, checks with type str
    • It returns always FALSE!

2. Encoding error

https://github.com/fishstiqz/pycdb/blob/03191d976c11cb67f9dfe6f8ead823de0e8808cf/pycdb/pycdb.py#L741-L743

  • For example, calling write_u8(0x1000, 0x22) prints AttributeError: 'int' object has no attribute 'encode' error

Fixes

Fix in #19

closed time in 2 days

nonetype

PR opened fishstiqz/pycdb

Linebreak checking returns always FALSE

Fixes #18

+1 -1

0 comment

1 changed file

pr created time in 3 days

issue openedfishstiqz/pycdb

Linebreak checking returns always FALSE

https://github.com/fishstiqz/pycdb/blob/03191d976c11cb67f9dfe6f8ead823de0e8808cf/pycdb/pycdb.py#L234-L260

  • Var curline's type is bytes (L236)
  • but statement in L255, checks with type str
    • It returns always FALSE!

created time in 3 days

pull request commentRDFLib/rdflib

Require setuptools, rdflib/plugins/sparql/__init__.py and rdflib/plugin.py import pkg_resources

In Fedora, we package RPM package for rdflib. I am not the maintainer of that package, but the maintainer of Python in Fedora.

We used to automatically generate a runtime dependency on setuptools for all RPM packages with Python projects with console_scripts entrypoints. Reason for this was that it was necessary for the way how was entrypoint script generated. Nowadays the entrypoint script looks differently. Particularly, they do not require setuptools to be installed on runtime in order to execute (at least on Python 3.8+ -- because it has importlib.metadata).

Hence we are about to stop generating the automatic runtime dependency on setuptools for packages with console_scripts entrypoints. We went through all the affected packages in Fedora and identified some packages that will be negatively impacted in Fedora because when we stop adding the requirement automatically, they will have missing dependencies, because they use setuptools (pkg_resources) on runtime, but don't specify a dependency.

As long as you import from pkg_resources in the actual code, the project requires setuptools on runtime and the requirement needs to be specified, otherwise it might be missing.

hrnciar

comment created time in 3 days

pull request commentRDFLib/rdflib

Require setuptools, rdflib/plugins/sparql/__init__.py and rdflib/plugin.py import pkg_resources

Can you clarify what problem this is supposed to fix?

hrnciar

comment created time in 4 days

issue openedRDFLib/rdflib

IRC and Gitter

developers.rst makes some mention of #rdflib on freenode, however with the recent developments I'm not sure what the future of freenode will be. It seems there are some people in #rdflib on libera.chat now.

There is also https://gitter.im/RDFLib/rdflib which has 27 people in, though is mostly idle also.

Should we update the documentation and README.md to mention gitter and libera.chat?

created time in 4 days

issue commentRDFLib/rdflib

A Recursionerror exception is raised if the SPARQL UPDATE query string contains more than 90 triples

@rchateauneu I changed the rule to this:

[52*] TriplesTemplate ::= TriplesSameSubject ( '.' TriplesSameSubject? )*

Just because it reads a bit simpler, but I think it is equivalent to what you wrote and what was there before. Please have a look if you can: #1340

arcangelo7

comment created time in 4 days

issue commentRDFLib/rdflib

A Recursionerror exception is raised if the SPARQL UPDATE query string contains more than 90 triples

@rchateauneu it is equivalent to that, and I have tested with that and it seems to parse successfully but I still need to do some fixes to get the rest to work.

arcangelo7

comment created time in 4 days

issue commentRDFLib/rdflib

A Recursionerror exception is raised if the SPARQL UPDATE query string contains more than 90 triples

I think the problem may be related to this rule:

[52] TriplesTemplate ::= TriplesSameSubject ( '.' TriplesTemplate? )?

Which is expressed here.

I think rewriting the grammer to not have recursive rules may be needed, but I'm not entirely sure about that either.

arcangelo7

comment created time in 4 days

issue commentRDFLib/rdflib

A Recursionerror exception is raised if the SPARQL UPDATE query string contains more than 90 triples

stack trace for reference:

$ poetry run python -m unittest test.test_sparql_parser.SPARQLParserTests -vvv
test_large_insert (test.test_sparql_parser.SPARQLParserTests) ... /home/iwana/d/github.com/iafork/rdflib/rdflib/plugins/serializers/nt.py:28: UserWarning: NTSerializer does not use custom encoding.
  warnings.warn("NTSerializer does not use custom encoding.")
ERROR

======================================================================
ERROR: test_large_insert (test.test_sparql_parser.SPARQLParserTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/iwana/d/github.com/iafork/rdflib/test/test_sparql_parser.py", line 24, in test_large_insert
    parseUpdate(f"INSERT DATA {{ {g0ntriples!s} }}")
  File "/home/iwana/d/github.com/iafork/rdflib/rdflib/plugins/sparql/parser.py", line 1550, in parseUpdate
    return UpdateUnit.parseString(q, parseAll=True)[0]
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1943, in parseString
    loc, tokens = self._parse(instring, 0)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
    return self.expr._parse(instring, loc, doActions, callPreParse=False)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
    return self.expr._parse(instring, loc, doActions, callPreParse=False)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4069, in parseImpl
    loc, exprtokens = e._parse(instring, loc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4849, in parseImpl
    loc, tokens = self.expr._parse(instring, loc, doActions, callPreParse=False)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4052, in parseImpl
    loc, resultlist = self.exprs[0]._parse(instring, loc, doActions, callPreParse=False)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
    return self.expr._parse(instring, loc, doActions, callPreParse=False)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4254, in parseImpl
    ret = e._parse(instring, loc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4462, in parseImpl
    return self.expr._parse(instring, loc, doActions, callPreParse=False)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
    loc, tokens = self.parseImpl(instring, preloc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 4069, in parseImpl
    loc, exprtokens = e._parse(instring, loc, doActions)
  File "/home/iwana/d/github.com/iafork/rdflib/.venv/lib/python3.6/site-packages/pyparsing.py", line 1683, in _parseNoCache
(... omitted)
    raise ParseException(instring, loc, self.errmsg, self)
RecursionError: maximum recursion depth exceeded

----------------------------------------------------------------------
Ran 1 test in 1.109s

FAILED (errors=1)

arcangelo7

comment created time in 4 days

PR opened RDFLib/rdflib

Add failing unit test for #1336

Adds unit test for #1336

Proposed Changes

  • Add failing unit test for #1336 with @unittest.expectedFailure
+28 -0

0 comment

1 changed file

pr created time in 4 days

startedkaganisildak/malwarescarecrow

started time in 5 days

push eventRDFLib/rdflib

Nicholas Car

commit sha 4606cbd67dcf625fd4b0698ef09bbd03ffbf4f9e

fixing some test paths

view details

Nicholas Car

commit sha 1514c95ff0f5ed2490a52740add085cc7a3097b2

fix gYear & gYearMonth conversions

view details

push time in 6 days

push eventRDFLib/rdflib

Iwan Aucamp

commit sha eda67163f8dc60d966d3f802d97c0f293ea9d923

Fix tox config The current tox config does not work as the dependencies are out of sync and doctest has troubles with xunit. This fixes it so that tox works again and makes it easier for other people to contribute.

view details

Nicholas Car

commit sha d8efa9653a8ebdbe10e75c6e1cf1761776ea1871

update supported Python versions

view details

Iwan Aucamp

commit sha 09c73c7c00e6ec4b6943597516782e99fde06b05

Merge pull request #1 from nicholascar/patch-1 update supported Python versions

view details

Iwan Aucamp

commit sha 3d425971719a30b0eed82345cabf634ca4a45d0e

Remove spaces between `-r` and `requirements.{.dev}.txt` As @nicholascar pointed out this causes problems in some cases.

view details

Nicholas Car

commit sha a32f48b5e18b374d1be457e87d6441c19583575c

Merge pull request #1313 from iafork/fix_tox Fix tox config

view details

push time in 6 days

PR merged RDFLib/rdflib

Reviewers
Fix tox config

The current tox config does not work as the dependencies are out of sync and doctest has troubles with xunit.

This fixes it so that tox works again and makes it easier for other people to contribute.

Fixes #1312

Proposed Changes

  • Don't run tests with xunit
  • Use requirements.txt and requirements.dev.txt instead of duplicating requirements.
+7 -17

6 comments

1 changed file

aucampia

pr closed time in 6 days

issue closedRDFLib/rdflib

tox not working

Tox fails with all environments I try:

$ tox -e py38
GLOB sdist-make: /home/iwana/d.x/github.com/RDFLib/rdflib/setup.py
py38 create: /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38
py38 installdeps: nose, isodate, html5lib, pyparsing, bsddb3, six, SPARQLWrapper>=1.6.2
py38 inst: /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/.tmp/package/1/rdflib-6.0.0a0.zip
py38 installed: bsddb3==6.2.9,html5lib==1.1,isodate==0.6.0,nose==1.3.7,pyparsing==2.4.7,rdflib @ file:///home/iwana/d.x/github.com/RDFLib/rdflib/.tox/.tmp/package/1/rdflib-6.0.0a0.zip,six==1.16.0,SPARQLWrapper==1.8.5,webencodings==0.5.1
py38 run-test-pre: PYTHONHASHSEED='782677509'
py38 run-test: commands[0] | /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38/bin/python setup.py clean --all
/home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38/lib/python3.8/site-packages/setuptools/dist.py:463: UserWarning: Normalizing '6.0.0-alpha' to '6.0.0a0'
  warnings.warn(tmpl.format(**locals()))
running clean
'build/lib' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.8' does not exist -- can't clean it
py38 run-test: commands[1] | /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38/bin/python setup.py build
/home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38/lib/python3.8/site-packages/setuptools/dist.py:463: UserWarning: Normalizing '6.0.0-alpha' to '6.0.0a0'
  warnings.warn(tmpl.format(**locals()))
...
py38 run-test: commands[2] | /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38/bin/python run_tests.py --with-xunit
Running nose with: --with-xunit --attr= test rdflib --where=./ --with-doctest --doctest-extension=.doctest --doctest-tests
Usage: run_tests.py [options]

run_tests.py: error: Error reading config file 'setup.cfg': no such option 'with-doctest-ignore-unicode'
ERROR: InvocationError for command /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/py38/bin/python run_tests.py --with-xunit (exited with code 2)
__________________________________________________________________________________ summary __________________________________________________________________________________
ERROR:   py38: commands failed
$ tox -e cover
GLOB sdist-make: /home/iwana/d.x/github.com/RDFLib/rdflib/setup.py
cover create: /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/cover
cover installdeps: coverage, nose, isodate, html5lib, pyparsing, bsddb3, six, SPARQLWrapper>=1.6.2
cover inst: /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/.tmp/package/1/rdflib-6.0.0a0.zip
cover installed: bsddb3==6.2.9,coverage==5.5,html5lib==1.1,isodate==0.6.0,nose==1.3.7,pyparsing==2.4.7,rdflib @ file:///home/iwana/d.x/github.com/RDFLib/rdflib/.tox/.tmp/package/1/rdflib-6.0.0a0.zip,six==1.16.0,SPARQLWrapper==1.8.5,webencodings==0.5.1
cover run-test-pre: PYTHONHASHSEED='4106584086'
cover run-test: commands[0] | /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/cover/bin/python run_tests.py --where=./ --with-coverage --cover-html --cover-html-dir=./coverage --cover-package=rdflib --cover-inclusive
Running nose with: --where=./ --with-coverage --cover-html --cover-html-dir=./coverage --cover-package=rdflib --cover-inclusive --attr= test rdflib --with-doctest --doctest-extension=.doctest --doctest-tests --cover-package=rdflib --cover-inclusive
Usage: run_tests.py [options]

run_tests.py: error: Error reading config file 'setup.cfg': no such option 'with-doctest-ignore-unicode'
ERROR: InvocationError for command /home/iwana/d.x/github.com/RDFLib/rdflib/.tox/cover/bin/python run_tests.py --where=./ --with-coverage --cover-html --cover-html-dir=./coverage --cover-package=rdflib --cover-inclusive (exited with code 2)
__________________________________________________________________________________ summary __________________________________________________________________________________
ERROR:   cover: commands failed

If I use the requirements{,.dev}.txt files things get better:

diff --git a/tox.ini b/tox.ini
index b5b588fb..242d1b5b 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,13 +10,8 @@ commands =
     {envpython} setup.py build
     {envpython} run_tests.py --with-xunit
 deps =
-    nose
-    isodate
-    html5lib
-    pyparsing
-    bsddb3
-    six
-    SPARQLWrapper>=1.6.2
+       -r requirements.txt
+       -r requirements.dev.txt
 
 [testenv:cover]
 basepython =
@@ -25,12 +20,7 @@ commands =
     {envpython} run_tests.py --where=./ \
                  --with-coverage --cover-html --cover-html-dir=./coverage \
                  --cover-package=rdflib --cover-inclusive
+
 deps =
-    coverage
-    nose
-    isodate
-    html5lib
-    pyparsing
-    bsddb3
-    six
-    SPARQLWrapper>=1.6.2
+       -r requirements.txt
+       -r requirements.dev.txt

but still fail:

======================================================================
ERROR: test_coverage_dodge (test.test_util.TestUtilMisc)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/iwana/d/github.com/iafork/rdflib/test/test_util.py", line 76, in test_coverage_dodge
    util.test()
  File "/home/iwana/d/github.com/iafork/rdflib/rdflib/util.py", line 491, in test
    doctest.testmod()
  File "/usr/lib64/python3.8/doctest.py", line 1956, in testmod
    runner.run(test)
  File "/usr/lib64/python3.8/doctest.py", line 1452, in run
    encoding = save_stdout.encoding
AttributeError: 'Tee' object has no attribute 'encoding'

----------------------------------------------------------------------
Ran 3369 tests in 26.166s

FAILED (SKIP=94, errors=1)
ERROR: InvocationError for command /home/iwana/d/github.com/iafork/rdflib/.tox/py38/bin/python run_tests.py --with-xunit (exited with code 1)
__________________________________________________________________________________ summary __________________________________________________________________________________
ERROR:   py38: commands failed

Removing --with-xunit fixes it completely:

diff --git a/tox.ini b/tox.ini
index b5b588fb..b4af542a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,15 +8,10 @@ setenv =
 commands =
     {envpython} setup.py clean --all
     {envpython} setup.py build
-    {envpython} run_tests.py --with-xunit
+    {envpython} run_tests.py
 deps =
-    nose
-    isodate
-    html5lib
-    pyparsing
-    bsddb3
-    six
-    SPARQLWrapper>=1.6.2
+       -r requirements.txt
+       -r requirements.dev.txt
 
 [testenv:cover]
 basepython =
@@ -25,12 +20,7 @@ commands =
     {envpython} run_tests.py --where=./ \
                  --with-coverage --cover-html --cover-html-dir=./coverage \
                  --cover-package=rdflib --cover-inclusive
+
 deps =
-    coverage
-    nose
-    isodate
-    html5lib
-    pyparsing
-    bsddb3
-    six
-    SPARQLWrapper>=1.6.2
+       -r requirements.txt
+       -r requirements.dev.txt
$ poetry run tox -e py38

Am I using it wrong, or has tox fallen into disrepair?

If there is indeed a problem here, I can submit a PR to fix it, having tox.ini that does not work is a bit confusing, and fixing it makes it easier for people to contribute also I think, Ideally it should be kept in line with what is being done by the CI pipelines.

closed time in 6 days

aucampia

push eventRDFLib/rdflib

Iwan Aucamp

commit sha 47bb83c840e59286e41b44a2e1604f3601cde58b

Fix formatting of xsd:decimal xsd:decimal should never be formatted with e-notation.

view details

Nicholas Car

commit sha 0c75f9b2f07e58a999b1d9f0cafe352ad87c21fa

Merge pull request #1335 from iafork/fix_decimal Fix formatting of xsd:decimal

view details

push time in 6 days

PR merged RDFLib/rdflib

Reviewers
Fix formatting of xsd:decimal

Fixes #1314

Proposed Changes

  • Format xsd:decimal using f"{x:f}" to ensure it complies with https://www.w3.org/TR/xmlschema11-2/#decimal

NOTE: This uses the tests added in https://github.com/RDFLib/rdflib/pull/1315 so it might make sense to merge that first before this, only the second commit (https://github.com/RDFLib/rdflib/commit/c018c8fd767da8b6926a28363466610ec912cce5) is relevant here.

+6 -1

3 comments

2 changed files

aucampia

pr closed time in 6 days

issue closedRDFLib/rdflib

Invalid serialization of xsd:decimal to scientific notation

I'm having an issue when doing a construct query using SPARQL is returning a rdflib graph with small numbers casted as a literal in scientific notation.

from SPARQLWrapper import SPARQLWrapper, RDFXML
from rdflib.term import URIRef, Literal
import sys

endpoint_url = "https://query.wikidata.org/sparql"
user_agent = "WDQS-example Python/%s.%s" % (sys.version_info[0], sys.version_info[1])
sparql = SPARQLWrapper(endpoint_url, agent=user_agent)
sparql.setReturnFormat(RDFXML)
query = """CONSTRUCT { ?s ?p ?o } WHERE { VALUES ?s { wd:Q184832 } ?s ?p ?o }"""
sparql.setQuery(query)
results = sparql.query().convert()

triples = set(results.triples((None, URIRef("http://www.wikidata.org/prop/direct/P2201"), None)))

for triple in triples:
    (s, p, o) = triple
    print("triple = %s", triple)
    print("str(o) = %s", str(o))
    print("o.value = %s/%s", type(o.value), o.value)
    print("o.n3() = %s", o.n3())

and it's output

triple = %s (rdflib.term.URIRef('http://www.wikidata.org/entity/Q184832'), rdflib.term.URIRef('http://www.wikidata.org/prop/direct/P2201'), rdflib.term.Literal('1E-31', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#decimal')))
str(o) = %s 1E-31
o.value = %s/%s <class 'decimal.Decimal'> 1E-31
o.n3() = %s "1E-31"^^<http://www.w3.org/2001/XMLSchema#decimal>

I believe o.value should be class 'float'

If you serialize it this

results.serialize(destination="wikidump-000000001.ttl", format="turtle")

with open("wikidump-000000001.ttl","r") as fp:
    for line in fp:
        if "wdt:P2201" in line:
            print(line)

It outputs:

    wdt:P2201 1E-31.0 ;

closed time in 6 days

wagonhelm

push eventRDFLib/rdflib

Nicholas Car

commit sha a4727c1494a4cc93f8d78620db558aa3c23e83e6

ensure all examples work

view details

Nicholas Car

commit sha 2c5c096e4604511964ec337eabd5515db8f349c3

minor docco updates

view details

push time in 6 days