text:
Installation of dependency 'gradunwarp' is error-prone

Background
Currently, this project asks users to install gradunwarp for gradient correction. However, because gradunwarp was first developed 9 years ago, its installation methods are outdated:

Oddly, it uses numpy.distuils, rather than setuptools from the standard Python library. As a result, pip install can't be used.
Also, by default it tries to install itself using the system Python, which requires sudo privileges, or else this happens:

error: could not create '/usr/local/lib/python3.8/dist-packages/gradunwarp': Permission denied

Issues with this

Security risks related to running this installation as root.
In general, installing packages globally to the system Python is discouraged. ([1], [2], [3])
As an alternative to sudo, gradunwarp suggests using the --prefix switch to install gradunwarp somewhere else.

Users have to pick a location, then manually edit PATH and PYTHONPATH, which isn't very user-friendly.
The flexibility here is error-prone. Troubleshooting issues requires us to understand where the user has chosen to install gradunwarp (which could be anywhere).

Regardless of where gradunwarp is installed, its dependencies (numpy, scipy, nibabel, etc.) are hard to keep track of.

Ideally, the user could pip install gradunwarp and its dependencies inside a virtualenv, but this isn't possible.
Instead, gradunwarp recommends using sudo apt-get install python-numpy and sudo apt-get install python-scipy. This installs the dependencies system-wide, which SciPy itself lightly discourages.
In addition, the dependencies could be installed to a number of other locations and it would still work OK. Again, this flexibility is error-prone.

 Full list of locations where dependencies could potentially be installed
joshua@XPS-15-9560$ python3 -m site
sys.path = [
    '/usr/lib/python38.zip',
    '/usr/lib/python3.8',
    '/usr/lib/python3.8/lib-dynload',
    '/home/joshua/.local/lib/python3.8/site-packages',
    '/usr/local/lib/python3.8/dist-packages',
    '/usr/lib/python3/dist-packages',
]
USER_BASE: '/home/joshua/.local' (exists)
USER_SITE: '/home/joshua/.local/lib/python3.8/site-packages' (exists)
ENABLE_USER_SITE: True

If gradunwarp's dependencies happen to be installed to the user's site-packages/ directory, then calling gradient_unwarp.py will fail inside sct_run_batch, because SCT has explicitly disabled user site-packages.

See https://github.com/neuropoly/spinalcordtoolbox/issues/3200#issuecomment-769958632 for more context.
Until SCT itself becomes pip installable, gradunwarp's dependencies should either be installed somewhere else, or the workaround from https://github.com/neuropoly/spinalcordtoolbox/issues/3200#issuecomment-770067241 should be used.

Recommendations
If possible, I think it would be good to come up with a better, more reliable way to install gradunwarp, then recommend that method in this project's README.
(I almost want to say fork (or copy) gradunwarp ourselves, then modify it so that pip and virtualenv be used.)

thank you for documenting it so well @joshuacwnewton 🙏 !

thank you for documenting it so well @joshuacwnewton 🙏 !

As I understand, gradunwrap isn't compatible with venvs.
I think the way to trick gradunwrap into behaving like a modern install is
python setup.py install --prefix=~/.local

On my system, this is on PYTHONPATH by default:
$ python3
Python 3.9.1 (default, Dec 13 2020, 11:55:53)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/home/kousu/.local/lib/python3.9/site-packages', '/usr/lib/python3.9/site-packages']
>>>  # ^ /home/kousu/.local/lib/python3.9/site-packages

Now, it's not on python2's path:
$ python2
Python 2.7.18 (default, Sep  5 2020, 11:17:26)
[GCC 10.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages']

which maybe explains why they had to give the advice about manual installation back then.
experiment
I tried
$ python setup.py install --prefix=~/.local

compiling
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "gradunwarp.core.interp3_ext" sources
building extension "gradunwarp.core.legendre_ext" sources
building extension "gradunwarp.core.transform_coordinates_ext" sources
building data_files sources
build_src: building npy-pkg config files
running build_py
package init file 'gradunwarp/core/tests/__init__.py' not found (or not a regular file)
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/gradunwarp
creating build/lib.linux-x86_64-3.9/gradunwarp/core
copying gradunwarp/core/__init__.py -> build/lib.linux-x86_64-3.9/gradunwarp/core
copying gradunwarp/core/coeffs.py -> build/lib.linux-x86_64-3.9/gradunwarp/core
copying gradunwarp/core/globals.py -> build/lib.linux-x86_64-3.9/gradunwarp/core
copying gradunwarp/__init__.py -> build/lib.linux-x86_64-3.9/gradunwarp
copying gradunwarp/core/utils.py -> build/lib.linux-x86_64-3.9/gradunwarp/core
copying gradunwarp/core/unwarp_resample.py -> build/lib.linux-x86_64-3.9/gradunwarp/core
copying gradunwarp/core/gradient_unwarp.py -> build/lib.linux-x86_64-3.9/gradunwarp/core
creating build/lib.linux-x86_64-3.9/gradunwarp/core/tests
copying gradunwarp/core/tests/test_utils.py -> build/lib.linux-x86_64-3.9/gradunwarp/core/tests
package init file 'gradunwarp/core/tests/__init__.py' not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
CCompilerOpt.cc_test_flags[999] : testing flags (-march=native)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

creating /tmp/tmppdoxc9zn/usr
creating /tmp/tmppdoxc9zn/usr/lib
creating /tmp/tmppdoxc9zn/usr/lib/python3.9
creating /tmp/tmppdoxc9zn/usr/lib/python3.9/site-packages
creating /tmp/tmppdoxc9zn/usr/lib/python3.9/site-packages/numpy
creating /tmp/tmppdoxc9zn/usr/lib/python3.9/site-packages/numpy/distutils
creating /tmp/tmppdoxc9zn/usr/lib/python3.9/site-packages/numpy/distutils/checks
compile options: '-I/usr/include/python3.9 -c'
extra options: '-march=native'
CCompilerOpt.cc_test_flags[999] : testing flags (-O3)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-O3'
CCompilerOpt.cc_test_flags[999] : testing flags (-Werror)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-Werror'
CCompilerOpt.__init__[1674] : check requested baseline
CCompilerOpt.cc_test_flags[999] : testing flags (-msse)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse'
CCompilerOpt.cc_test_flags[999] : testing flags (-msse2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse2'
CCompilerOpt.feature_test[1444] : testing feature 'SSE' with flags (-msse -msse2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'SSE2' with flags (-msse -msse2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-msse3)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse3'
CCompilerOpt.feature_test[1444] : testing feature 'SSE3' with flags (-msse -msse2 -msse3)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -Werror'
CCompilerOpt.__init__[1683] : check requested dispatch-able features
CCompilerOpt.cc_test_flags[999] : testing flags (-mssse3)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mssse3'
CCompilerOpt.cc_test_flags[999] : testing flags (-msse4.1)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse4.1'
CCompilerOpt.feature_test[1444] : testing feature 'SSE41' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'SSSE3' with flags (-msse -msse2 -msse3 -mssse3)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mpopcnt)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mpopcnt'
CCompilerOpt.cc_test_flags[999] : testing flags (-msse4.2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse4.2'
CCompilerOpt.feature_test[1444] : testing feature 'SSE42' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'POPCNT' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx'
CCompilerOpt.feature_test[1444] : testing feature 'AVX' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mf16c)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mf16c'
CCompilerOpt.cc_test_flags[999] : testing flags (-mfma)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mfma'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx2'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512f)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512f'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512F' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'F16C' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512cd)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512cd'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512er -mavx512pf)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512er -mavx512pf'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512_KNL' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512er -mavx512pf)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512er -mavx512pf -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'AVX2' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mavx2)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mavx2 -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'FMA3' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -Werror'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512CD' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512_KNM' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512er -mavx512pf -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512er -mavx512pf -mavx5124fmaps -mavx5124vnniw -mavx512vpopcntdq -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512vl -mavx512bw -mavx512dq)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512vl -mavx512bw -mavx512dq'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512_SKX' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512vnni)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512vnni'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512_CLX' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512vnni)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512vnni -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512ifma -mavx512vbmi)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512ifma -mavx512vbmi'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512_CNL' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512ifma -mavx512vbmi -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-mavx512vbmi2 -mavx512bitalg -mavx512vpopcntdq)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-mavx512vbmi2 -mavx512bitalg -mavx512vpopcntdq'
CCompilerOpt.feature_test[1444] : testing feature 'AVX512_ICL' with flags (-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512vnni -mavx512ifma -mavx512vbmi -mavx512vbmi2 -mavx512bitalg -mavx512vpopcntdq)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -mavx512vnni -mavx512ifma -mavx512vbmi -mavx512vbmi2 -mavx512bitalg -mavx512vpopcntdq -Werror'
CCompilerOpt.__init__[1695] : skip features (SSE3 SSE SSE2) since its part of baseline
CCompilerOpt.__init__[1699] : initialize targets groups
CCompilerOpt.__init__[1701] : parse target group simd_test
CCompilerOpt._parse_target_tokens[1910] : skip targets (FMA4 VSX2 VSX3 NEON VSX ASIMD XOP) not part of baseline or dispatch-able features
CCompilerOpt._parse_policy_not_keepbase[2022] : skip baseline features (SSE2)
CCompilerOpt.generate_dispatch_header[2236] : generate CPU dispatch header: (build/src.linux-x86_64-3.9/numpy/distutils/include/npy_cpu_dispatch_config.h)
CCompilerOpt.generate_dispatch_header[2245] : dispatch header dir build/src.linux-x86_64-3.9/numpy/distutils/include does not exist, creating it
CCompilerOpt.feature_extra_checks[1519] : Testing extra checks for feature 'AVX512F' (AVX512F_REDUCE)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -Werror'
CCompilerOpt.feature_extra_checks[1519] : Testing extra checks for feature 'AVX512_SKX' (AVX512BW_MASK AVX512DQ_MASK)
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -Werror'
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/include/python3.9 -c'
extra options: '-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma -mavx2 -mavx512f -mavx512cd -mavx512vl -mavx512bw -mavx512dq -Werror'
Detected changes on compiler optimizations, force rebuilding
building 'gradunwarp.core.interp3_ext' extension
compiling C sources
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

creating build/temp.linux-x86_64-3.9/gradunwarp
creating build/temp.linux-x86_64-3.9/gradunwarp/core
compile options: '-I/usr/lib/python3.9/site-packages/numpy/core/include -I/usr/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/usr/include/python3.9 -c'
extra options: '-O3 -msse -msse2 -msse3'
gcc: gradunwarp/core/interp3_ext.c
 In file included from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from gradunwarp/core/interp3_ext.c:10:
/usr/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
gradunwarp/core/interp3_ext.c: In function ‘interp3’:
gradunwarp/core/interp3_ext.c:97:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
   97 |     itr_v = (PyArrayIterObject *) PyArray_IterNew(result);
      |                                                   ^~~~~~
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/interp3_ext.c:97:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/interp3_ext.c:98:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
   98 |     itr_r = (PyArrayIterObject *) PyArray_IterNew(R);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/interp3_ext.c:98:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/interp3_ext.c:99:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
   99 |     itr_c = (PyArrayIterObject *) PyArray_IterNew(C);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/interp3_ext.c:99:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/interp3_ext.c:100:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  100 |     itr_s = (PyArrayIterObject *) PyArray_IterNew(S);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/interp3_ext.c:100:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/interp3_ext.c:123:9: warning: returning ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’} from a function with incompatible return type ‘PyObject *’ {aka ‘struct _object *’} [-Wincompatible-pointer-types]
  123 |  return result;
      |         ^~~~~~
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-3.9/gradunwarp/core/interp3_ext.o -L/usr/lib -o build/lib.linux-x86_64-3.9/gradunwarp/core/interp3_ext.cpython-39-x86_64-linux-gnu.so
building 'gradunwarp.core.legendre_ext' extension
compiling C sources
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/lib/python3.9/site-packages/numpy/core/include -I/usr/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/usr/include/python3.9 -c'
extra options: '-O3 -msse -msse2 -msse3'
gcc: gradunwarp/core/legendre_ext.c
In file included from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from gradunwarp/core/legendre_ext.c:10:
/usr/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
gradunwarp/core/legendre_ext.c: In function ‘legendre’:
gradunwarp/core/legendre_ext.c:86:25: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   86 |         printf("but mu=%d and nu=%d\n", mu, nu);
      |                        ~^               ~~
      |                         |               |
      |                         int             long int
      |                        %ld
gradunwarp/core/legendre_ext.c:86:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
   86 |         printf("but mu=%d and nu=%d\n", mu, nu);
      |                                  ~^         ~~
      |                                   |         |
      |                                   int       long int
      |                                  %ld
gradunwarp/core/legendre_ext.c:99:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
   99 |     itr_x = (PyArrayIterObject *) PyArray_IterNew(x);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/legendre_ext.c:99:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/legendre_ext.c:100:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  100 |     itr_r = (PyArrayIterObject *) PyArray_IterNew(result);
      |                                                   ^~~~~~
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/legendre_ext.c:100:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/legendre_ext.c:108:32: warning: format ‘%f’ expects argument of type ‘double’, but argument 2 has type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’} [-Wformat=]
  108 |             printf("but got x=%f\n", x);
      |                               ~^     ~
      |                                |     |
      |                                |     PyArrayObject * {aka struct tagPyArrayObject_fields *}
      |                                double
gradunwarp/core/legendre_ext.c:117:12: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  117 |            if ( mu & 1)
      |            ^~
gradunwarp/core/legendre_ext.c:119:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  119 |               p_nu = s * odd_factorial(2 * mu - 1) * pow(sqrt( 1.0 - *px * *px), mu);
      |               ^~~~
gradunwarp/core/legendre_ext.c:157:12: warning: returning ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’} from a function with incompatible return type ‘PyObject *’ {aka ‘struct _object *’} [-Wincompatible-pointer-types]
  157 |     return result;
      |            ^~~~~~
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-3.9/gradunwarp/core/legendre_ext.o -L/usr/lib -o build/lib.linux-x86_64-3.9/gradunwarp/core/legendre_ext.cpython-39-x86_64-linux-gnu.so
building 'gradunwarp.core.transform_coordinates_ext' extension
compiling C sources
C compiler: gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC

compile options: '-I/usr/lib/python3.9/site-packages/numpy/core/include -I/usr/lib/python3.9/site-packages/numpy/core/include -Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -I/usr/include/python3.9 -c'
extra options: '-O3 -msse -msse2 -msse3'
gcc: gradunwarp/core/transform_coordinates_ext.c
In file included from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                 from /usr/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                 from gradunwarp/core/transform_coordinates_ext.c:10:
/usr/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   17 | #warning "Using deprecated NumPy API, disable it with " \
      |  ^~~~~~~
gradunwarp/core/transform_coordinates_ext.c: In function ‘transform_coordinates’:
gradunwarp/core/transform_coordinates_ext.c:102:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  102 |     itr_x = (PyArrayIterObject *) PyArray_IterNew(X);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/transform_coordinates_ext.c:102:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/transform_coordinates_ext.c:103:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  103 |     itr_y = (PyArrayIterObject *) PyArray_IterNew(Y);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/transform_coordinates_ext.c:103:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/transform_coordinates_ext.c:104:51: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  104 |     itr_z = (PyArrayIterObject *) PyArray_IterNew(Z);
      |                                                   ^
      |                                                   |
      |                                                   PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/transform_coordinates_ext.c:104:51: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/transform_coordinates_ext.c:105:52: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  105 |     itr_xm = (PyArrayIterObject *) PyArray_IterNew(Xm);
      |                                                    ^~
      |                                                    |
      |                                                    PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/transform_coordinates_ext.c:105:52: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/transform_coordinates_ext.c:106:52: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  106 |     itr_ym = (PyArrayIterObject *) PyArray_IterNew(Ym);
      |                                                    ^~
      |                                                    |
      |                                                    PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/transform_coordinates_ext.c:106:52: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/transform_coordinates_ext.c:107:52: warning: passing argument 1 of ‘(PyObject * (*)(PyObject *))*(PyArray_API + 784)’ from incompatible pointer type [-Wincompatible-pointer-types]
  107 |     itr_zm = (PyArrayIterObject *) PyArray_IterNew(Zm);
      |                                                    ^~
      |                                                    |
      |                                                    PyArrayObject * {aka struct tagPyArrayObject_fields *}
gradunwarp/core/transform_coordinates_ext.c:107:52: note: expected ‘PyObject *’ {aka ‘struct _object *’} but argument is of type ‘PyArrayObject *’ {aka ‘struct tagPyArrayObject_fields *’}
gradunwarp/core/transform_coordinates_ext.c:73:12: warning: unused variable ‘m’ [-Wunused-variable]
   73 |     float *m;
      |            ^
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-3.9/gradunwarp/core/transform_coordinates_ext.o -L/usr/lib -o build/lib.linux-x86_64-3.9/gradunwarp/core/transform_coordinates_ext.cpython-39-x86_64-linux-gnu.so
running build_scripts
creating build/scripts.linux-x86_64-3.9
copying and adjusting gradunwarp/core/gradient_unwarp.py -> build/scripts.linux-x86_64-3.9
changing mode of build/scripts.linux-x86_64-3.9/gradient_unwarp.py from 644 to 755
running install_lib
creating /home/kousu/.local/lib/python3.9/site-packages/gradunwarp
copying build/lib.linux-x86_64-3.9/gradunwarp/__init__.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp
creating /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/__init__.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/legendre_ext.cpython-39-x86_64-linux-gnu.so -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/globals.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/interp3_ext.cpython-39-x86_64-linux-gnu.so -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
creating /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/tests
copying build/lib.linux-x86_64-3.9/gradunwarp/core/tests/test_utils.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/tests
copying build/lib.linux-x86_64-3.9/gradunwarp/core/unwarp_resample.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/utils.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/transform_coordinates_ext.cpython-39-x86_64-linux-gnu.so -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/gradient_unwarp.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
copying build/lib.linux-x86_64-3.9/gradunwarp/core/coeffs.py -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core
warning: install_lib: byte-compiling is disabled, skipping.

running install_scripts
copying build/scripts.linux-x86_64-3.9/gradient_unwarp.py -> /home/kousu/.local/bin
changing mode of /home/kousu/.local/bin/gradient_unwarp.py to 755
running install_data
copying gradunwarp/core/transform_coordinates_ext.c -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/
copying gradunwarp/core/legendre_ext.c -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/
copying gradunwarp/core/interp3_ext.c -> /home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/
running install_egg_info
Writing /home/kousu/.local/lib/python3.9/site-packages/gradunwarp-HCP_1.2.0-py3.9.egg-info
running install_clib
customize UnixCCompiler

########### EXT COMPILER OPTIMIZATION ###########
Platform      :
  Architecture: x64
  Compiler    : gcc

CPU baseline  :
  Requested   : 'min'
  Enabled     : SSE SSE2 SSE3
  Flags       : -msse -msse2 -msse3
  Extra checks: none

CPU dispatch  :
  Requested   : 'max -xop -fma4'
  Enabled     : SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL
  Generated   : none
CCompilerOpt._cache_write[796] : write cache to path -> /home/kousu/src/neuropoly/gradunwarp/build/temp.linux-x86_64-3.9/ccompiler_opt_cache_ext.py

$ gradient_unwarp.py
Traceback (most recent call last):
  File "/home/kousu/.local/bin/gradient_unwarp.py", line 11, in <module>
    from gradunwarp.core import (globals, coeffs, utils)
  File "/home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/__init__.py", line 8, in <module>
    from .unwarp_resample import Unwarper
  File "/home/kousu/.local/lib/python3.9/site-packages/gradunwarp/core/unwarp_resample.py", line 20, in <module>
    import nibabel as nib
ModuleNotFoundError: No module named 'nibabel'
$ command -v gradient_unwarp.py
/home/kousu/.local/bin/gradient_unwarp.py

So it almost works, it's just that it doesn't install its own dependencies; and I tried
diff --git a/setup.py b/setup.py
index 3631111..6f76b5e 100644
--- a/setup.py
+++ b/setup.py
@@ -46,6 +46,7 @@ setup(name='gradunwarp',
       author = 'Human Connectome Project',
       py_modules  = mods,
       ext_modules = [ext1, ext2, ext3],
+      install_requires=['nibabel'],
       scripts = scripts_cmd,
       configuration=configuration,
      )

but this just got
$ python setup.py install --prefix=~/.local
/usr/lib/python3.9/distutils/dist.py:274: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)

because it's numpy.distutils, not the one that understand wheels.

I think setting PYTHONUSERSITE=True and other things like it is not a good solution. Too many apps, with total reasonability IMO, assume that they are running on a standard-ish system, and breaking those assumptions makes SCT an incompatible thing like Matlab that people have to containerize to keep running. If we're going to force people to containerize we should at least provide the docker image ourselves.
We could try to isolate PYTHONUSERSITE to just SCT itself, maybe? Like, make sure every: subprocess.run([...], env={k: os.environ[k] for k in set(os.environ.keys()) - {'PYTHONUSERSITE'}}). That would be a hacky workaround but at least it wouldn't leak out beyond SCT anymore.
I'm sure we could fix gradunwarp to be a modern pip package with wheels available. We just have to go look at what sklearn or scikit-image have in their build scripts.

On our side, I think setting PYTHONUSERSITE=True and other global variables like it is not a good solution.

Hrmm... I think it might be best to reopen https://github.com/neuropoly/spinalcordtoolbox/issues/3200 to talk further about this.
Ideally, I think this issue (#31) focuses on installation of gradunwarp and its dependencies, while https://github.com/neuropoly/spinalcordtoolbox/issues/3200 is more about PYTHONNOUSERSITE leaking into a shell script run by sct_run_batch.

There should be no reason that
python setup.py install --prefix=./python/envs/venv_sct

Wouldn't work.

One caveat here is, when you run python setup.py for gradunwarp, there's a CLI entry point called gradient_unwarp.py... the corresponding file in bin/ has the following shebang:
joshua@XPS-15-9560:~$ head -1 /home/joshua/.local/bin/gradient_unwarp.py
#!/usr/bin/python3

If we go along with your idea to install it to the SCT's conda environment, we could instruct users to activate venv_sct first (so that python setup.py --prefix uses the Python from conda).  So, hypothetically, the full steps would be:

joshua@XPS-15-9560:~$ ./install_sct -y  # Install SCT first (prerequisite step)
[...]
joshua@XPS-15-9560:~$ source "$SCT_DIR/python/etc/profile.d/conda.sh"
joshua@XPS-15-9560:~$ conda activate venv_sct
(venv_sct) joshua@XPS-15-9560:~$ which python  # Verify that activating conda switches to correct python
/home/joshua/repos/spinalcordtoolbox/python/envs/venv_sct/bin/python
(venv_sct) joshua@XPS-15-9560:~$ cd ~/Downloads/gradunwarp-1.2.0/
(venv_sct) joshua@XPS-15-9560:~/Downloads/gradunwarp-1.2.0$ python setup.py install --prefix="$SCT_DIR/python/envs/venv_sct"

When I try this, however, I run headfirst into permission issues again:

 Console output hidden, click to show.
(venv_sct) joshua@XPS-15-9560:~/Downloads/gradunwarp-1.2.0$ python setup.py install --prefix="$SCT_DIR/python/envs/venv_sct"
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
running build_src
build_src
building py_modules sources
building extension "gradunwarp.core.interp3_ext" sources
building extension "gradunwarp.core.legendre_ext" sources
building extension "gradunwarp.core.transform_coordinates_ext" sources
building data_files sources
build_src: building npy-pkg config files
running build_py
package init file 'gradunwarp/core/tests/__init__.py' not found (or not a regular file)
creating build/lib.linux-x86_64-3.6
error: could not create 'build/lib.linux-x86_64-3.6': Permission denied

gradunwarp depends on Numpy being present to install itself (because of numpy.distutils). In your compile log, it looks like it's tapping into Numpy from your local Python3.6 site-packages/ directory:

compile options: '-I/home/kousu/.local/lib/python3.6/site-packages/numpy/...

I was curious would happen if you didn't have Numpy already present, but luckily:
compile options: '-I/home/joshua/repos/spinalcordtoolbox/python/envs/venv_sct/lib/python3.6/site-packages/numpy/

It just uses the Numpy from venv_sct, so not a problem.

In your compile log, the gradient_unwarp.py binary is installed to this directory:

copying build/scripts.linux-x86_64-3.6/gradient_unwarp.py -> ../python/envs/venv_sct//bin

$SCT_DIR/python/envs/venv_sct/bin isn't on the PATH by default, right? So, I'm having some trouble figuring out how you were able to call gradient_unwarp.py from the command line right off the bat.

I think I like the idea of using SCT's venv for installing gradunwarp!
One caveat: gradunwarp depends on Numpy being present to install itself (because of numpy.distutils). In your compile log, it looks like it's tapping into Numpy from your local Python3.6 site-packages/ directory

That's...a very subtle catch. Good job. I didn't look that closely at what I'd done, but I'm glad I shared my log so you could.
Why don't the venv's paths take precedence? They should be on top of the preexisting environment. But they're not?

$SCT_DIR/python/envs/venv_sct/bin isn't on the PATH by default, right? So, I'm having some trouble figuring out how you were able to call gradient_unwarp.py from the command line right off the bat.
Yes it is. When you conda activate it edits PATH:
[kousu@requiem spinalcordtoolbox]$ set | grep PATH > /tmp/a
[kousu@requiem spinalcordtoolbox]$ source python/bin/activate
(base) [kousu@requiem spinalcordtoolbox]$ conda activate venv_sct
(venv_sct) [kousu@requiem spinalcordtoolbox]$ set | grep PATH > /tmp/b
(venv_sct) [kousu@requiem spinalcordtoolbox]$ diff /tmp/{a,b}
1c1,2
< PATH=/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/go/bin:/home/kousu/.local/bin:/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/kousu/.local/MATLAB/bin/:/usr/local/stata/:/home/kousu/.rvm/bin
---
> CONDA_INTERNAL_OLDPATH=/home/kousu/src/neuropoly/spinalcordtoolbox/python/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/go/bin:/home/kousu/.local/bin:/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/kousu/.local/MATLAB/bin:/usr/local/stata:/home/kousu/.rvm/bin
> PATH=/home/kousu/src/neuropoly/spinalcordtoolbox/python/envs/venv_sct/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/src/neuropoly/spinalcordtoolbox/bin:/home/kousu/go/bin:/home/kousu/.local/bin:/opt/miniconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/kousu/.local/MATLAB/bin:/usr/local/stata:/home/kousu/.rvm/bin
3a5,21
>         PATH="${SYSP}/bin:${PATH}";
>         PATH="${SYSP}/Scripts:${PATH}";
>         PATH="${SYSP}/Library/bin:${PATH}";
>         PATH="${SYSP}/Library/usr/bin:${PATH}";
>         PATH="${SYSP}/Library/mingw-w64/bin:${PATH}";
>         PATH="${SYSP}:${PATH}";
>         PATH="${SYSP}/bin:${PATH}";
>     \export PATH
>     CONDA_INTERNAL_OLDPATH="${PATH}";
>     PATH="${CONDA_INTERNAL_OLDPATH}";
>         \export PATH;
>     CONDA_INTERNAL_OLDPATH="${PATH}";
>     PATH="${CONDA_INTERNAL_OLDPATH}";
>                 CONDA_INTERNAL_OLDPATH="${PATH}";
>                 PATH="${CONDA_INTERNAL_OLDPATH}";
>                 CONDA_INTERNAL_OLDPATH="${PATH}";
>                 PATH="${CONDA_INTERNAL_OLDPATH}";

My intuition about this is that it has to be this way for https://packaging.python.org/guides/distributing-packages-using-setuptools/#console-scripts to make any sense.

The reason we mess with the user's PATH over in https://github.com/neuropoly/spinalcordtoolbox/blob/master/install_sct is because we are letting them use scripts inside the venv without them technically entering that venv. And that only works because venvs hardcode the full path to the python interpreter in the shebang lines in all scripts inside of them :(. I'm sure the more we try to mix and match multiple envs in projects the more this is going to wash back over us. venvs don't stack very well.
https://github.com/neuropoly/spinalcordtoolbox/issues/1526 would replace that with a package that can be reliably installed into ~/.local/lib/python*/site-packages (aka PYTHONUSERSITE) and do away with venvs (unless the user wanted to user venvs, for their own reasons).

$SCT_DIR/python/envs/venv_sct/bin isn't on the PATH by default, right? So, I'm having some trouble figuring out how you were able to call gradient_unwarp.py from the command line right off the bat.

Yes it is. When you conda activate it edits PATH:

Ah, but don't we want gradient_unwarp.py to be available at all times? Otherwise, we would have to conda activate every time we wanted to use gradient_unwarp.py inside a shell script for sct_run_batch.

$SCT_DIR/python/envs/venv_sct/bin isn't on the PATH by default, right? So, I'm having some trouble figuring out how you were able to call gradient_unwarp.py from the command line right off the bat.

Yes it is. When you conda activate it edits PATH:

Ah, but don't we want gradient_unwarp.py to be available at all times? Otherwise, we would have to conda activate every time we wanted to use gradient_unwarp.py inside a shell script for sct_run_batch.

Update: https://github.com/neuropoly/spinalcordtoolbox/pull/3313 will remove the need for the PYTHONNOUSERSITE= workaround.
Once that is merged, we can safely recommend installing gradunwarp to the user's site-packages using --prefix, as was originally suggested here: https://github.com/neuropoly/spinalcordtoolbox/issues/3200#issuecomment-769278416

authors: jcohenadad joshuacwnewton kousu

repo: sct-pipeline/ukbiobank-spinalcord-csa


text:
Minor refactoring

This PR removes instances of (let |x,y| ...) on Lua.
Performance seems identical.
The advantage is that environment correctly tracks all variables. It was unable to do this for variables declared by literal syntax.

Probably a good idea, but on the other hand the existing codebase shows off lumen’s flexibility.

source: gharchive/pull-request

repo: sctb/lumen

license_type: permissive

license_source: bigquery


text:
make it (much) more reliable

We want the debugee to get it's own memory space, so that check() will
see the global vDSO changes, not ones from debugee's local cow'ed pages.
Separate VM means madviseThread has to move too.

Thanks for the PR! Commit d154896ff7d2f808c1c3bbea686c2ee1b393a35c was developed at the same time... It moves check() to a forked process. Does it sound good to you?

Yeah, although I think my solution is simpler.
Anyway, it doesn't matter in the end.

authors: notaz scumjr

repo: scumjr/dirtycow-vdso

license: MIT

license_source: github-api


text:
The prometheus container doesn't start due to "permission denied" on /etc/prometheus/prometheus.yml

time="2016-08-30T12:06:28Z" level=info msg="Starting prometheus (version=1.0.0, branch=master, revision=e2bb136)" source="main.go:73"
time="2016-08-30T12:06:28Z" level=info msg="Build context (go=go1.6.2, user=root@98d6f366491c, date=20160718-15:12:02)" source="main.go:74"
time="2016-08-30T12:06:28Z" level=info msg="Loading configuration file /etc/prometheus/prometheus.yml" source="main.go:206"
time="2016-08-30T12:06:28Z" level=error msg="Couldn't load configuration (-config.file=/etc/prometheus/prometheus.yml): open /etc/prometheus/prometheus.yml: permission denied" source="main.go:218"

The fix is to modify the docker command line by appending :Z to the paths which are argument to -v.

@tgrabiec I fail to reproduce the problem
Maybe because I run the start_all.sh script as sudo?
(I also do not understand the fix)

@tzach I doubt it's because of sudo, the script runs docker under sudo anyway.
I didn't dig too much into details, but the problem seems to be similar to that described here:  http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/
Appending ':Z' affects permissions for the mount.

The fix is to modify the docker command line by appending :Z to the paths which are argument to -v.

@tgrabiec can you please send a PR?

source: gharchive/issue

authors: tgrabiec tzach

repo: scylladb/scylla-grafana-monitoring


text:
Load balancing (Issue #121, #122, #123, #124)

This pull request adds configurable load balancing.
There are 3 composable policies:

Round robin (RoundRobinPolicy) Fixes #122
DC aware round robin (DCAwareRoundRobinPolicy) Fixes #123
Token aware (TokenAwarePolicy, wraps another policy) Fixes #124

All policies implement trait LoadBalancingPolicy. Session constructor accepts optional specification of load balancing policy (by passing Option<Box<dyn LoadBalancingPolicy>>). Session's default policy is token aware round robin. Fixes #121
Each policy has a method plan(statement_info, &cluster), which inspects statement info, and returns an iterator designating the order of nodes in a query plan.
In order to support being a child policy, RoundRobinPolicy &  DCAwareRoundRobinPolicy also implement trait ChildLoadBalancingPolicy. Thus, it is possible to have token aware round robin: Box::new(TokenAwarePolicy::new(Box::new(RoundRobinPolicy::new()))).

Depends on  #140

Depends on  #140

One comment before the proper review - please add short commit descriptions to your commit messages, explaining what's changed and why. E.g. the message of 4f366623b87a72ad47bc8a350f6051c91dedf6ef could include a short description of whatDCAwareLoadBalancing policy is, or a link to an existing description somewhere in Scylla docs.

One comment before the proper review - please add short commit descriptions to your commit messages, explaining what's changed and why. E.g. the message of 4f366623b87a72ad47bc8a350f6051c91dedf6ef could include a short description of whatDCAwareLoadBalancing policy is, or a link to an existing description somewhere in Scylla docs.

One comment before the proper review - please add short commit descriptions to your commit messages, explaining what's changed and why. E.g. the message of 4f36662 could include a short description of what DCAwareLoadBalancing policy is, or a link to an existing description somewhere in Scylla docs.

Done

One comment before the proper review - please add short commit descriptions to your commit messages, explaining what's changed and why. E.g. the message of 4f36662 could include a short description of what DCAwareLoadBalancing policy is, or a link to an existing description somewhere in Scylla docs.

Done

@psarna @piodul please review

@psarna @piodul please review

Looks good. It looks like it needs a rebase, but it will probably need another rebase after the session builder is merged, so maybe we'll wait for that first.

authors: havaker psarna

repo: scylladb/scylla-rust-driver


text:
Support Specifications

This is the list with specs we should support:

[ ] Activation
[ ] Annotations
[ ] Authentication
[ ] Authorization
[ ] Batch
[ ] Bean Validation
[ ] Concurrency
[ ] Connectors
[ ] CDI
[ ] Enterprise Beans
[ ] Expression Language
[ ] Interceptors
[ ] JSON Binding
[ ] JSON Processing
[ ] Mail
[ ] Messaging
[ ] NoSQL
[ ] Persistence
[ ] Restful Web Services
[ ] Security
[ ] JSF
[ ] JSP
[ ] Servlet
[ ] JSTL
[ ] Transactions
[ ] WebSocket
[ ] XML Binding
[ ] XML Web Services

We can create a ticket for each one as we start to work on them.  Not sure if we plan to support all of them.
If you're starting to work in one of them, please create an issue and let us know.  What do you folks think?

Moved to https://github.com/eclipse-ee4j/starter/issues/2

repo: sdaschner/enterprise-java-starter


text:
Poetry Converts !=1.2.3 into <1.2.3,>1.2.3 Which Never Resolves

[X] I am on the latest Poetry version.
[X] I have searched the issues of this repo and believe that this is not a duplicate.
[X] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).

OS version and name: macOS Catalina 10.15.1
Poetry version: Poetry 0.12.17
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/kevinastone/8ac5b2d8d0106ac33a0cb3799338a5bd

Issue
Poetry generates a setup.py that transforms an exclusion version specifier (!=1.2.3) into a less than AND greater than (<1.2.3,>1.2.3) which can never be satisfied since those comma separated versions are AND'd together.
This works fine when poetry is installing dependencies, but fails when it generates a temporary setup.py and runs pip install -e on the root package.
I'm attempting to exclude a version of pillow that doesn't work on my platform by specifying the version as !=6.2.1, but poetry translated that into pillow<6.2.1,>6.2.1.
Here's the full command output:
kstone ~> poetry install
Installing dependencies from lock file

Nothing to install or update

  - Installing example (0.1.0)

[EnvCommandError]
Command ['${PROJECT_DIR}/.venv/bin/python', '-m', 'pip', 'install', '-e', '${PROJECT_DIR}'] errored with the following return code 1, and output:
Obtaining file://${PROJECT_DIR}
Collecting pillow<6.2.1,>6.2.1 (from example==0.1.0)
  ERROR: Could not find a version that satisfies the requirement pillow<6.2.1,>6.2.1 (from example==0.1.0) (from versions: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7.0, 1.7.1, 1.7.2
, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 2.0.0, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.3.2, 2.4.0, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0, 2.6.1, 2.6.2, 2.7.0, 2.8.0, 2.8.1,
2.8.2, 2.9.0, 3.0.0, 3.1.0rc1, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.3.0, 3.3.1, 3.3.2, 3.3.3, 3.4.0, 3.4.1, 3.4.2, 4.0.0, 4.1.0, 4.1.1, 4.2.0, 4.2.1, 4.3.0, 5.0.0, 5.1.0, 5.2.0, 5.3.0,
 5.4.0, 5.4.1, 6.0.0, 6.1.0, 6.2.0, 6.2.1)
ERROR: No matching distribution found for pillow<6.2.1,>6.2.1 (from example==0.1.0)
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

install [--no-dev] [--dry-run] [-E|--extras EXTRAS] [--develop DEVELOP]

Poetry automatically generates the following setup.py file with the incorrect version specifier:
# -*- coding: utf-8 -*-
from distutils.core import setup

packages = \
['example']

package_data = \
{'': ['*']}

install_requires = \
['pillow<6.2.1,>6.2.1']

entry_points = \
{'console_scripts': ['example = example.main:main']}

setup_kwargs = {
    'name': 'example',
    'version': '0.1.0',
    'description': '',
    'long_description': '# Example for Poetry Issue\n',
    'author': 'Kevin Stone',
    'author_email': 'kevinastone@gmail.com',
    'url': None,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.7',
}

setup(**setup_kwargs)

I've created a Gist with a minimal example to test and verify: https://gist.github.com/kevinastone/8ac5b2d8d0106ac33a0cb3799338a5bd
git clone https://gist.github.com/kevinastone/8ac5b2d8d0106ac33a0cb3799338a5bd
cd 8ac5b2d8d0106ac33a0cb3799338a5bd
poetry install

Hello @kevinastone ,
can you please test if the issue still exists in the latest preview version of poetry? I cannot reproduce it with 1.0.0b5.
Thanks!

You're right, it doesn't reproduce on 1.0.0b5.   Closing....

Thanks for coming back to report :+1:

authors: finswimmer kevinastone

repo: sdispater/poetry


text:
PEP8, flake8, autopep8

For Python code there is the comprehensive style guide PEP8:
https://www.python.org/dev/peps/pep-0008/
flake8 can be used to check the code,
autopep8 can be used to fix most of the issues.
Both are installable from PyPI:
python -m pip install -U flake8 autopep8

Then, cd to the directory and run the following commands to get some harmless whitespace changes:
cd modest-py
flake8 --count --max-line-length=200 --statistics -qq
autopep8 --in-place --recursive --max-line-length=200 --select="E101,W1,W2" .

After that, check the git diff (with and without ignoring whitespace changes) and commit.
If more cleaning is desired, run
flake8 --count --max-line-length=200 --statistics -qq
autopep8 --in-place --recursive --max-line-length=200 .
autopep8 --in-place --recursive --max-line-length=200 --aggressive --aggressive --aggressive .

Or select single rules and check the git diff after each rule to see what changed.

Thanks, I will revise the code using this procedure.

Drop a comment in case you start working on this. Otherwise I hope to find some time before Christmas.

There is no hurry, it is just style, it does not change the functionality. But it might increase readability.
I am not planning any further Pull Requests for this.

Done: https://github.com/sdu-cfei/modest-py/commit/5fb95f05901b529dbbcfb1346733d5732c5d9ff1

authors: krzysztofarendt thorade

repo: sdu-cfei/modest-py


text:
Make ReadOnlyAddressBook truly read-only #190

Fixes #190
ReadOnlyAddressBook currently exposes its underlying UniqueTagList and UniquePersonList objects via getUniqueTagList() and getUniquePersonList() respectively. Problem is, UniqueTagList and UniquePersonList both contain mutating methods, so ReadOnlyAddressBook is not actually read-only.
Furthermore, these methods seem to be redundant as we already have getPersonList() and getTagList().
To add on, AddressBook has a getPersons method which does almost the same thing as getPersonList().
So, let's clean up the ReadOnlyAddressBook interface a little.

v1 Ready for review

[1/5] Remove redundant "get empty address book" methods
[2/5] ModelManager: merge two similar constructors
[3/5] Fully encapsulate UniquePersonList and UniqueTagList within AddressBook
[4/5] AddressBook: replace getPersons() with getPersonList()
[5/5] ReadOnlyAddressBook: make getTagList() return an ObservableList


text:
Fix code scanning alert - Information exposure through an exception

Tracking issue for:

[ ] https://github.com/se2024-jpg/Slash/security/code-scanning/10

Copilot autofix will be applied


text:
This application requires Java Runtime Environment when open the java software jd-gui

This application requires Java Runtime Environment when open the java software jd-gui

According to this issue you need Oracle Java 8 or any of the OpenJDK 8 binaries to run jd-gui.

license: Unlicense


text:
When I try the demo it says user forms does not exist

I tried your demo,
it is not working

Sorry, I removed the app from my AWS account because I had so many users signing up and didn't want to risk racking up a bill.
Set up an AWS free tier account and try it out. Let me know if you have any other issues.
I'll leave this open temporarily.

authors: arhoy seabeams


text:
Usage behind proxy

Hi!
I try to use hermitcrab alongside with burrito for provider caching.
Our cluster is behind a proxy for all internet trafic.
I tried to set HTTPS_PROXY or https_proxy but don't see any difference in hermitcrab logs:
D    retry requesting GET https://registry.terraform.io/v1/providers/hashicorp/vault/versions after 2s
D    retry requesting GET https://registry.terraform.io/v1/providers/hashicorp/vault/versions after 4s
D    retry requesting GET https://registry.terraform.io/v1/providers/hashicorp/vault/versions after 8s
D    retry requesting GET https://registry.terraform.io/v1/providers/hashicorp/vault/versions after 15s
D    retry requesting GET https://registry.terraform.io/v1/providers/hashicorp/vault/versions after 15s
W    reached limitation of retry requesting GET https://registry.terraform.io/v1/providers/hashicorp/vault/versions

Inside the hermitcrab pod, with curl the URL is well resolved using the proxy:
curl -vI https://registry.terraform.io/v1/providers/hashicorp/vault/versions
* Uses proxy env variable https_proxy == 'http://proxy.mycompany.private:3128/'
* Host proxy.service.mycompany.private:3128 was resolved.
* IPv6: (none)
* IPv4: 10.32.2.2, 10.32.2.1
*   Trying 10.32.2.2:3128...
[...]
HTTP/2 200

How to configure hermitcrab to use a proxy?

Hello. Try setting HTTP_PROXY too, along with HTTPS_PROXY env var - with the same url.

Thanks for insight, it indeed working by setting both!

repo: seal-io/hermitcrab


text:
Customize kubernetes manifests

Is there any plan to support defining the /etc/kubernetes/manifests/ file under the master node? There are unreasonable configurations in the default output files. For example, kube-controller-manager and kube-scheduler will lead to monitoring indicators collection errors or tls-related security issues. We solve these configurations by manually modifying them.

@clcc2019 ,  files under /etc/kubernetes/manifests/ is all static pod that is automatically generated by kubeadm. so i thought , could we do it through  kubeadm config ?

repo: sealerio/sealer


text:
move search to alpha

Describe what this PR does / why we need it
Support search to view the current list of supported images

move search to alpha
modify default defaultDomain and defaultRepo

Does this pull request fix one issue?

Describe how you did it
Describe how to verify it
Special notes for reviews

Codecov Report
Base: 21.44% // Head: 21.44% // No change to project coverage :thumbsup:

Coverage data is based on head (fb39482) compared to base (48baeed).
Patch has no changes to coverable lines.

:exclamation: Current head fb39482 differs from pull request most recent head 6256d27. Consider uploading reports for the commit 6256d27 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1902   +/-   ##
=======================================
  Coverage   21.44%   21.44%
=======================================
  Files          74       74
  Lines        6891     6891
=======================================
  Hits         1478     1478
  Misses       5216     5216
  Partials      197      197

Impacted Files
Coverage Δ

pkg/image/reference/util.go
83.78% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: Stevent-fei codecov-commenter


text:
integrate with cube-scramble-cli

should parse the history files generated by cube-scramble-cli
see https://github.com/seanbreckenridge/cube-scramble-cli/issues/12

not relevant anymore now that this parses twistytimer exports

repo: seanbreckenridge/scramble-history


text:
How to find remaining IP space in a CIDR

Hi Sean
I just wanted to present another idea I was looking into which was to find out all the remaining IP space available, if IP allocation was randomly done. This code uses breadth first search and is able to provide the information required. If this is also possible with ipaddress-go then it would be a really good addition.
#!/usr/bin/env python3.4

import ipaddress
import argparse
import queue

def get_available_subnets(main, taken):
    # we assume no subnets are available intially
    available = []
    q = queue.Queue()
    # add first node for expansion in the BFS process
    q.put(main)

    while q.qsize() > 0:
        subnet = q.get()
        for taken_subnet in taken:
            if taken_subnet.compare_networks(subnet) == 0:
                # found matching subnet in taken, stop expanding
                print("similar: %s and %s" % (subnet, taken_subnet))
                break
            if taken_subnet.overlaps(subnet):
                # still has overlaps somewhere in children, keep expanding
                print("overlaps: %s and %s" % (subnet, taken_subnet))
                for sub_subnet in subnet.subnets():
                    q.put(sub_subnet)
                break
        else:
            # no overlaps with taken - this subnet is entirely available
            available.append(subnet)

    return available

if "__main__" == __name__:
    parser = argparse.ArgumentParser()
    parser.add_argument('-m', '--m', help='main subnet to check', required=True)
    parser.add_argument('-t', '--taken', nargs='+', help='taken subnets', required=True)
    args = parser.parse_args()

    taken = [ipaddress.IPv4Network(subnet) for subnet in args.taken]
    main = ipaddress.IPv4Network(args.m)
    available = get_available_subnets(main, taken)

    print("Available IP space:")
    for avl in available:
        print(ipaddress.ip_network(avl))

Output:

python script.py -m 10.255.255.0/24 -t 10.255.255.192/26 10.255.255.128/30

overlaps: 10.255.255.0/24 and 10.255.255.192/26
overlaps: 10.255.255.128/25 and 10.255.255.192/26
overlaps: 10.255.255.128/26 and 10.255.255.128/30
similar: 10.255.255.192/26 and 10.255.255.192/26
overlaps: 10.255.255.128/27 and 10.255.255.128/30
overlaps: 10.255.255.128/28 and 10.255.255.128/30
overlaps: 10.255.255.128/29 and 10.255.255.128/30
similar: 10.255.255.128/30 and 10.255.255.128/30

Available IP space:
10.255.255.0/25
10.255.255.160/27
10.255.255.144/28
10.255.255.136/29
10.255.255.132/30

Any help on how to work out a similar code would be much appreciated.

addressed by this

Addressed by https://github.com/seancfoley/ipaddress-go/issues/1#issuecomment-1243046683

The following code works identically and produces identical output to your python code, except for the fact I am hard-coding the command-line args rather than using  go's "flags" package:
package main

import (
	"fmt"
	"github.com/seancfoley/ipaddress-go/ipaddr"
)

func main() {
	taken := []*ipaddr.IPAddress{addr("10.255.255.192/26"), addr("10.255.255.128/30")}
	main := addr("10.255.255.0/24")
	available := get_available_subnets(main, taken)
	fmt.Println("\nAvailable IP space:")
	for _, avl := range available {
		fmt.Println(avl)
	}
}

func get_available_subnets(mainSubnet *ipaddr.IPAddress, taken []*ipaddr.IPAddress) []*ipaddr.IPAddress {
	var available, q []*ipaddr.IPAddress
	q = append(q, mainSubnet)
	matched := false
	for len(q) > 0 {
		subnet := q[0]
		q = q[1:]
		for _, taken_subnet := range taken {
			if matched = subnet.Equal(taken_subnet); matched {
				// found matching subnet in taken, stop expanding
				fmt.Printf("similar: %s and %s\n", subnet, taken_subnet)
				break
			}
			if matched = subnet.Contains(taken_subnet)
				|| taken_subnet.Contains(subnet); matched {
				// still has overlaps somewhere in children, keep expanding
				fmt.Printf("overlaps: %s and %s\n", subnet, taken_subnet)
				iter := subnet.AdjustPrefixLen(1).PrefixBlockIterator()
				for iter.HasNext() {
					sub_subnet := iter.Next()
					q = append(q, sub_subnet)
				}
				break
			}
		}
		if !matched {
			// no overlaps with taken - this subnet is entirely available
			available = append(available, subnet)
		}
	}
	return available
}

func addr(addrStr string) *ipaddr.IPAddress {
	return ipaddr.NewIPAddressString(addrStr).GetAddress()
}

repo: seancfoley/ipaddress-go


text:
seata1.2接入oracle时使用update xxx set x=1 where id in (select id from tb2 where type=1)报错

[ ] I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description
seata1.2接入oracle时使用update xxx set x=1 where id in (select id from tb2 where type=1)报错
Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
### Cause: java.sql.SQLException: java.lang.IllegalArgumentException: unexpected WHERE expr: SQLInSubQueryExpr
; uncategorized SQLException; SQL state [null]; error code [0]; java.lang.IllegalArgumentException: unexpected WHERE expr: SQLInSubQueryExpr; nested exception is java.sql.SQLException: java.lang.IllegalArgumentException: unexpected WHERE expr: SQLInSubQueryExpr
org.springframework.jdbc.UncategorizedSQLException:
### Error updating database.  Cause: java.sql.SQLException: java.lang.IllegalArgumentException: unexpected WHERE expr: SQLInSubQueryExpr
### The error may involve defaultParameterMap
### The error occurred while setting parameters

Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅴ. Anything else we need to know?
Ⅵ. Environment:

JDK version :1.8.0_171
OS :centos 7.5
Others: seata 1.2

mysql也一样

Sub query not support temporarily.

Sub query not support temporarily.

也遇到了同样的问题。
删、改操作目前都不支持复杂sql，比如更新时有子查询、更新时join了其它表。
可以这样理解吗？

Sub query not support temporarily.

也遇到了同样的问题。
删、改操作目前都不支持复杂sql，比如更新时有子查询、更新时join了其它表。
可以这样理解吗？

Yes.

Sub query not support temporarily.

也遇到了同样的问题。
删、改操作目前都不支持复杂sql，比如更新时有子查询、更新时join了其它表。
可以这样理解吗？

Yes.

thanks.

mysql也遇到这个问题

Sub query not support temporarily.

As for now, the newest version of seata has reached to 2.x,  does it support sub query now?

repo: seata/seata


text:
bugfix: nacos script initialization the configuration value contains ’=‘ failed

Ⅰ. Describe what this PR did
bugfix: nacos script initialization the configuration value contains ’=‘ failed
Ⅱ. Does this pull request fix one issue?
fix #1331
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #1332 into develop will increase coverage by 0.01%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop    #1332      +/-   ##
=============================================
+ Coverage      48.64%   48.65%   +0.01%
  Complexity      1643     1643
=============================================
  Files            332      332
  Lines          11521    11521
  Branches        1424     1424
=============================================
+ Hits            5604     5606       +2
+ Misses          5297     5295       -2
  Partials         620      620

Impacted Files
Coverage Δ
Complexity Δ

...server/store/file/FileTransactionStoreManager.java
47.03% <0%> (+0.69%)
19% <0%> (ø)
:arrow_down:

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 c4c5faf...7fb78cf. Read the comment docs.

authors: codecov-io slievrly


text:
Duplicate Entries in S3 Listings with Redis Filer Enabled

Bug description
When using the Redis filer (and potentially other filers lacking ListDirectoryPrefixedEntries implementation), executing s3cmd put followed by s3cmd ls on this file results in duplicate entries for the uploaded file. Specifically, after uploading a file using s3cmd put test1 s3://test-bucket, running s3cmd ls s3://test-bucket/test1 outputs the same file entry 10,000 times.
System Setup
Commands used to start services:
./weed/weed -config_dir=<path_to>/config -v 8 -logtostderr server -dir=<path_to>/data -s3 -filer -volume.max=0 -master.volumeSizeLimitMB=100
OS version:
the bug is reproduced regardless of the operating system
Output of weed version:
master branch last commit  36fec34c472266fe2a8f087af7de3945dc198726
./weed version: version 30GB 3.64  darwin arm64
Contents of filer.toml:
recursive_delete = true
[redis2]
enabled = true
address = "localhost:6379"
password = ""
database = 0
superLargeDirectories = []

Expected behavior:
After uploading a file with s3cmd put, running s3cmd ls on the bucket or directory where the file was uploaded should list each file exactly once, without duplicates.
Additional context
The issue appears to be related to the (fsw *FilerStoreWrapper) prefixFilterEntries function in filerstore_wrapper.go.

Hi, please check on the dev version there was recently a listing fix for nosql

All tests passed ================================================================================================ 125 passed in 52.32s ================================================================================================ ______________________________________________________________________________________________________ summary _______________________________________________________________________________________________________   py: commands succeeded   congratulations :)

Another option is to try rolling back the PR locally:
https://github.com/seaweedfs/seaweedfs/pull/5350 and https://github.com/seaweedfs/seaweedfs/pull/5411

i tried this code:
index cc3e58363..f8a8831d3 100644
--- a/weed/filer/filerstore_wrapper.go
+++ b/weed/filer/filerstore_wrapper.go
@@ -304,6 +304,9 @@ func (fsw *FilerStoreWrapper) prefixFilterEntries(ctx context.Context, dirPath u
                        }
                }
                if count < limit && lastFileName <= prefix {
+                       if lastFileName == prefix {
+                               break
+                       }
                        notPrefixed = notPrefixed[:0]
                        lastFileName, err = actualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit, func(entry *Entry) bool {
                                notPrefixed = append(notPrefixed, entry)```

this fixes the problem, the tests pass as well. But I don't understand if it can still cause any problems

this fixes the problem, the tests pass as well. But I don't understand if it can still cause any problems

Cool, yes, it seems that only s3 test is not enough. There was also an idea to set up testing of s3 via rclone.
1. make server
2. git clone rclone
3. configure rclone on seawedfs
4. cd rclone/backend/s3
5. go test -v -remote seaweedfs:rclonetest

go test -v -remote seaweedfs:rclonetest generates a large number of errors, are there any specific tests that need to be run?

go test -v -remote seaweedfs:rclonetest generates a large number of errors, are there any specific tests that need to be run?

This is the point, I haven’t figured out how to run a specific set of tests that I previously passed :(

are there any steps I could take to solve this?

are there any steps I could take to solve this?

I'm waiting for @chrislusf  to merge https://github.com/seaweedfs/seaweedfs/pull/5427 into the master
Then you can make a PR with your fix.

@sample Hello, let's go PR let's see how the s3 tests go.

fixed in #5440

authors: kmlebedev sample

repo: seaweedfs/seaweedfs


text:
automating shell commands and ec encode/decode

My goal is to be able to periodically check ec volumes and decode the ones that have had a certain threshold of files deleted in order to compact them and then re-encode when they fill back up again.
It looks like volume file deletion data is available within some of the shell commands, but I'm not sure how to automate any of those since they are in an interactive shell. Is there a way to run them from an external script or can what I want to do be done in the http api? Or am I thinking about this the wrong way?

Does this work for you?
echo "lock; ec.decode .... ; unlock" | weed shell

yeah that works, I can totally work with that, thank you!

I'm actually wondering now, is it even possible to get the amount of deleted files/bytes for an ec volume without converting back to a normal volume first? seems like the http api only gives info about normal volumes

authors: chrislusf valan


text:
Windows build failing due to bin/ in start and prod section

Fix windows build by using cross-env to support cross environment path separators

little change :)

authors: fastner swernerx

repo: sebastian-software/edgestack

license: mit


text:
Allow to change WiFi configuration

It'd be helpful to change the WiFi configuration even if an SSID is already set. However, I don't know what the best option for enabling this is.
What's the behavior if you transfer the ESP to a different WiFi and boot it? In this case it does have a configuration but it can't connect to the selected SSID.

Marcel,
I changed the code so it does exactly that, see bold code below:
===========code start ================
iWifiTries = 0	-- Counter of tries to connect to wifi
iMaxTries = 10	-- Maximum number of tries while waiting for connection
if pcall(function ()
dofile("config.lc")
end) then
print("Connecting to SSID("..ssid..")")
wifi.setmode(wifi.STATION)
wifi.sta.config(ssid,password)
wifi.sta.connect()
tmr.alarm(1, 1000, 1, function()
if wifi.sta.getip() == nil then
print("SSID("..ssid..")["..iWifiTries.."]")
iWifiTries = iWifiTries + 1
if ( iWifiTries > iMaxTries ) then
print("Not able to connect to predefined WIFI so deleting config.lc file")
file.remove("config.lc")
node.restart()
end
else
tmr.stop(1)
print("Connected, IP is "..wifi.sta.getip())
dofile("run_program.lua")
end
end)
else
print("Enter configuration mode")
dofile("run_config.lua")
end
========== code end ============
Tried to indent the code using the Mastering Markdown 3 minute read, but think I missed something...
Anyway hope you get the point,
Erwin

may I suggest you do a pull requestl at https://github.com/huelvayork/ESPbootloader
as for now...it lookslike this repo isn't updated anymore....

Of course. I'm just short in time at the moment :-(

Solved via setting GIO0 to low within the first seconds after booting.

@sebastianhodapp could you make a commit for this change?

repo: sebastianhodapp/ESPbootloader


text:
🔧 Update template

This pull request merges the current state of the template used here into this project so that it is up to date.

:tada: This PR is included in version 1.1.0 :tada:
The release is available on:

v1.1.0
GitHub release
Docker container (sebbo2002/fhem-log2db:1.1.0)
v1.1.0

Your semantic-release bot :package::rocket:


text:
Update Podspec

Hello,
can you please update your podspec file? I just downloaded the source code using cocoapods, and it has a different version from the one on GitHub.
Thanks

I updated the Podspec. Thanks for pointing it out! :)

repo: sebyddd/SDiPhoneVersion


text:
隐语提供隐匿查询功能吗？ 就是PIR技术

    隐语提供隐匿查询功能吗？ 就是PIR技术

Originally posted by @zhujinfang0819 in https://github.com/secretflow/secretflow/issues/154#issuecomment-1283901049

index/key不能重复；payload可以有重复，但有长度限制，一般在1024B以内

有SealPIR的例子吗，学习一下，谢谢

目前secretflow还不支持pir，可以直接调用spu 的c++接口，示例可以参考seal_pir的单测代码
https://github.com/secretflow/spu/blob/main/spu/pir/seal_pir_test.cc

请问针对sealPIR的上层封装在下个版本能提供出来么？谢谢！

请问针对sealPIR的上层封装在下个版本能提供出来么？谢谢！

由于人力紧张，目前还没规划在下个版本中提供

对于一个简单的查询语句比如age>=18, 没有index，也没有keyword。 这种情况 PIR能支持吗？

对于一个简单的查询语句比如age>=18, 没有index，也没有keyword。 这种情况 PIR能支持吗？

PIR不支持，可以关注我们后续开源的SCQL产品，可以支持这种比较查询条件

请问下关于PIR上层封装的版本有计划在啥时提供么

请问下关于PIR上层封装的版本有计划在啥时提供么

暂时还没有，后续的研发规划还在讨论中，有具体结果后会对外发布的，请多关注，谢谢

我看到隐语平台上有SCQL这个项目了，还没开源吗？

我看到隐语平台上有SCQL这个项目了，还没开源吗？

暂时还没有开源，敬请期待

repo: secretflow/secretflow


text:
Developing simple Blockchain app In flutter

NOTE: All 1st-time contributors should know Topic approval and PR submission does NOT guarantee your Topic/Article will be published. Our team of Peer Reviewers and Content Moderators will review all PRs that come in to make sure they adhere to the standard of quality we expect from the EngEd community.
We expect all community memebers to go through provided examples, resources, and previously published material before submitting content. As a rule of thumb, please only submit articles (pull requests) that are complete, formatted correctly, and include a fully polished article (ready to be published and error free).
All revisions and edits should be completed on your own forked repo (as to not take up room in the queue). Any PR that is submitted incomplete (meaning not ready to be published as is) will be closed. A PR being closed does NOT mean the article can not be published (or fixed) it simply means that the edits, revisions, and fixes will happen outside of the queue.
Developing simple Blockchain app In flutter
Pre-submission advice
By following all our pre-submission advice and reviewing our Resources folder, you will maximise your chances of your topic being approved.
We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner.
Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for an articles to be reviewed and/or published (subject to vary depending on volume and/or backlog of articles).
Be sure to visit our Resources Page for tools, resources, and example articles that will help you propose and write a successful article.
Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.
Writing sample(s):
Include any links or writing samples - to help our team better gauge your writing quality.
Proposal Submission
Developing simple Blockchain app In flutter
Developing simple Blockchain app In flutter
Use keyword research to improve your article's SEO.
Proposed article introduction
A blockchain is a decentralized database that everyone can access. They have an intriguing property where once data is stored in a blockchain, changing it becomes incredibly difficult.
Smart contracts (also known as decentralized applications or DApps) are similar to conventional contracts; the only distinction being they are electronic. A smart contract is a small computer program that is stored in a blockchain. They can eliminate existing third-party entities from many trustless ecosystems.
In this article we will see how one can implement the blockchain technology in our flutter applications.We are going to design a simple application that will run ion blockchain technology and will be used to keep track of transactions.
For example, if the article is based on machine learning, use the following: [Machine learning] Introduction to Machine Learning.
If the article is based on developing an Android application, use the following: [Android] Developing Apps using Android.
ONLY viable topics to pick from:

API
Artificial Intelligence
Blockchain
Containers
Edge Computing
Languages
Machine Learning
Networking
Node.js
Security

Key takeaways

Whats is blockchain
what are smart contracts?
How to build a customized blockchain for a flutter application
Build a simple application that allow transactions  running on a blockchain technology

Article quality
I have created an app called "Transactions". It shows different types of transaction happening at present time on blockchain . The transactions includes purchase, donation and sell.
I have used Material design in the app along with RecyclerView for showing information to the user . This article will be updated when new feature is added in this application.
Is yours more in-depth? Does it cover additional topics? Do you provide handy tips or anecdotal advice?
References
-https://hackernoon.com/learn-blockchains-by-building-one-117428612f46
Conclusion
Finally, remove the Pre-Submission advice section and all our blockquoted notes as you fill in the form before you submit.
We look forwarding to reviewing your topic suggestion.
Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

Please fill in the article quality section. @johnniembugua

@ahmadmardeni1 I have added the article quality section.I am looking forward to your response on the same.

What did you use to build your Blockchain?  @johnniembugua

dart programming language

@ahmadmardeni1 I used Dart

Sounds like a helpful topic - let's please be sure it adds value beyond what is in any official docs and/or what is covered in other blog sites. (the articles should go beyond a basic explanation - and it is always best to reference any EngEd article and build upon it). @johnniembugua
Please be attentive to grammar/readability and make sure that you put your article through a thorough editing review prior to submitting it for final approval. (There are some great free tools that we reference in EngEd resources.)
ANY ARTICLE SUBMITTED WITH GLARING ERRORS WILL BE IMMEDIATELY CLOSED.
Please be sure to double-check that it does not overlap with any existing EngEd articles, articles on other blog sites, or any incoming EngEd topic suggestions (if you haven't already) to avoid any potential article closure, please reference any relevant EngEd articles in yours. - Approved

Thank you @ahmadmardeni1

@hectorkambow  kindly reopen this one

@hectorkambow kindly open this issue

authors: ahmadmardeni1 johnniembugua samkanoi