RDFLib / rdflib-jsonld

JSON-LD parser and serializer plugins for RDFLib
Other
280 stars 71 forks source link

Drop use_2to3 and restore rdflib interoperability #105

Closed ajnelson-nist closed 2 years ago

ajnelson-nist commented 2 years ago

This patch series has two goals:

  1. Remove the use_2to3 flag from setup.py, as setuptools#2770 set that flag to trigger an error. (Further discussion might ensue on setuptools#2779.)
  2. Perform minimal upgrades to have unit tests pass equally well to the state archived in July, whether rdflib 5.0.0 or 6.0.0 is present. (NOTE - it appears to me that unit tests do not pass in the July state, and this is noted in the first patch, which establishes the testing baseline. The end effect of this patch series leaves no new known failures.)

Together, these will make rdflib-jsonld continue to be a transparent import, aiding users that did not realize, or cannot accommodate, that the package had been integrated into rdflib.

More pragmatically, downstream builds depending on rdflib-jsonld should no longer halt on reaching this dependency.

How to socialize the package being deprecated is left for a separate patch series.

Tests were run with the following script, commenting out some portions when fail states were expected:

#!/bin/bash

# This software was developed at the National Institute of Standards
# and Technology by employees of the Federal Government in the course
# of their official duties. Pursuant to title 17 Section 105 of the
# United States Code this software is not subject to copyright
# protection and is in the public domain. NIST assumes no
# responsibility whatsoever for its use by other parties, and makes
# no guarantees, expressed or implied, about its quality,
# reliability, or any other characteristic.
#
# We would appreciate acknowledgement if the software is used.

set -x
set -e
set -u

if [ ! -d venv0 ]; then
  python3 -m venv venv0
  source venv0/bin/activate
    pip install nose
    pip install rdflib==5.0.0
    pip install --editable .
  deactivate
fi

if [ ! -d venv1 ]; then
  python3 -m venv venv1
  source venv1/bin/activate
    pip install --upgrade setuptools nose
    pip install rdflib==5.0.0
    pip install --editable .
  deactivate
fi

if [ ! -d venv2 ]; then
  python3 -m venv venv2
  source venv2/bin/activate
    pip install nose
    pip install rdflib==6.0.0
    pip install --editable .
  deactivate
fi

if [ ! -d venv3 ]; then
  python3 -m venv venv3
  source venv3/bin/activate
    pip install --upgrade setuptools nose
    pip install rdflib==6.0.0
    pip install --editable .
  deactivate
fi

for x in 0 1 2 3 ; do
  source venv${x}/bin/activate
    nosetests || true
  deactivate
done

References:

Signed-off-by: Alex Nelson alexander.nelson@nist.gov

Exagone313 commented 2 years ago

This is unexpected but thank you. This helps doing the transition with the setuptools issues.