metpy warning

@rsignell-usgs , any idea what the following warning means? Seen when looking at the great-lakes data
/Users/mdurant/anaconda/envs/py37/lib/python3.7/site-packages/metpy/xarray.py:276: MetpyDeprecationWarning: Multidimensional coordinate lon assigned for axis "x". This behavior has been deprecated and will be removed in v1.0 (only one-dimensional coordinates will be available for the "x" axis).
  f'be available for the "{axis}" axis).', metpyDeprecation)

Is mapping no longer done??

@martindurant,  xrviz is trying to use metpy to figure out if there are lon,lat variables to use for the dashboard coordinates.
@dopplershift, what would be the best way to use metpy to do this?
Currently the code is trying:
parsed_var = ds.metpy.parse_cf(var)
x, y = parsed_var.metpy.coordinates('x', 'y')
[coord.name for coord in (x, y)]

But I'm not sure how this ever worked for this dataset!

Attributes:
    datum1:                          reference to LWD=zeta
    datum2:                          reference to IGLD85=zeta - IGLD85
    file_type:                       Full_Grid
    Conventions:                     COARDS
    grid_type:                       rectilinear
    z_type:                          2-D
    model:                           POMGL
    title:                           ofs4:/comf/operations/ohms
    comment:                         Linux
    source:                          current,zeta,temp,wind
    institution:                     NOAA/NOS/CO-OPS
    history:                         Operation-CO-OPS
    references<EMAIL_ADDRESS>    creation_date:                   2020-03-20  6:51:03  00:00
    DODS.strlen:                     19
    DODS.dimName:                    validtime_len
    DODS_EXTRA.Unlimited_Dimension:  time

but while
parsed_temp.metpy.time.name

returns
'time'

trying the same for x and y does not work:
parsed_temp.metpy.x.name

returns
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-26-b90890c9912d> in <module>
----> 1 parsed_temp.metpy.x.name

/srv/conda/envs/notebook/lib/python3.7/site-packages/metpy/xarray.py in x(self)
    350
    351         """
--> 352         return self._axis('x')
    353
    354     @property

/srv/conda/envs/notebook/lib/python3.7/site-packages/metpy/xarray.py in _axis(self, axis)
    288                 return coord_var
    289             else:
--> 290                 raise AttributeError(axis + ' attribute is not available.')
    291         else:
    292             raise AttributeError("'" + axis + "' is not an interpretable axis.")

AttributeError: x attribute is not available.

For what it's worth, parsed_temp looks like:
<xarray.DataArray 'temp' (time: 60, sigma: 20, ny: 25, nx: 61)>
[1830000 values with dtype=float32]
Coordinates:
  * time     (time) datetime64[ns] 2020-03-20T06:59:45.937500032 ... 2020-03-22T18:00:00
  * sigma    (sigma) float32 0.0 0.0227 0.0454 0.0681 ... 0.8853 0.9534 1.0
Dimensions without coordinates: ny, nx
Attributes:
    long_name:      Temperature
    units:          Celsius
    standard_name:  sea_water_temperature

@rsignell-usgs,  As mentioned in this comment, metpy is able to guess, if the data coords are set or available, so setting the coords by
ds = ds.set_coords(['lon','lat'])

before parsing works fine. However the deprecation and future removal warning is there.

Thanks @hdsingh !   So the code below has this behavior with metpy:

metpy=0.11 returns value "lon"
metpy=0.12 gives deprecation warning, returns value "lon"
metpy=1.0RC1, does not return the value "lon".  (says "AttributeError: x attribute is not available.")

import xarray as xr
import metpy

url = 'http://opendap.co-ops.nos.noaa.gov/thredds/dodsC/NOAA/LOOFS/MODELS/202003/glofs.loofs.fields.forecast.20200320.t06z.nc'
ds = xr.open_dataset(url)
ds = ds.set_coords(['lon', 'lat'])
ds.parsed_temp = ds.metpy.parse_cf('temp')
print(parsed_temp.metpy.x.name)

@dopplershift, what would be a best way to modify this for the new metpy?

Apologies for the inconvenience. The current (1.0) way would be:
parsed_temp.metpy.longitude.name

The relevant issue is Unidata/MetPy#1090, describing the rationale for the changes.

@hdsingh , do you have any plans to change the code to cope with the new version of metpy?

I looked into this. Changing this line to
x, y = parsed_var.metpy.longitude, parsed_var.metpy.latitude

according to current (metpy=1.0.0rc1)  works fine for all the datasets. However this works fine on python=3.8 and I have been unable to install metpy=1.0.0rc1 on python=3.7. I am looking into this. Once I find a way to install it on 3.7 using conda, I will create a PR.

@hdsingh , is this the problem you are having?
with environment.yml of:
name: metpy
channels:
  - conda-forge
dependencies:
  - python=3.7
  - panel
  - hvplot
  - xarray
  - netcdf4
  - datashader
  - geoviews
  - xrviz
  - pip
  - pip:
    - git+https://github.com/Unidata/MetPy.git

I'm getting:
CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/auth.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/gen.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/httpclient.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/httputil.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/ioloop.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/iostream.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/routing.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/template.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/testing.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/web.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/__pycache__/websocket.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/gen_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/httpclient_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/httpserver_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/ioloop_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/iostream_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/simple_httpclient_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/web_test.cpython-37.pyc'
specified in the package manifest cannot be found.

CondaVerificationError: The package for tornado located at c:\condapkgs\tornado-6.0.4-py37hfa6e2cd_0
appears to be corrupted. The path 'Lib/site-packages/tornado/test/__pycache__/websocket_test.cpython-37.pyc'
specified in the package manifest cannot be found.

ClobberError: This transaction has incompatible packages due to a shared path.
  packages: conda-forge/win-64::hdf4-4.2.13-hf8e6fe8_1003, conda-forge/win-64::hdf5-1.10.5-nompi_ha405e13_1104
  path: 'library/copying'

ClobberError: This transaction has incompatible packages due to a shared path.
  packages: conda-forge/win-64::hdf4-4.2.13-hf8e6fe8_1003, conda-forge/win-64::hdf5-1.10.5-nompi_ha405e13_1104
  path: 'library/release.txt'

If so, perhaps @ocefpaf has insight?

I would suggest specifying the tornado version (6.0.1?) if there is a problem.
For the change in code, I would put a version check in: if <=0.11, use previous version, else use new.

@rsignell-usgs Yes, somewhat similar. Since I tried installing in already existing environment, I got
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions

So version checking seems a better option here. However we will still get warning message only in case of metpy 0.12.

However we will still get warning message only in case of metpy 0.12

If it was already warning, then I suspect that the new method must be working by that version.

@hdsingh and @rsignell-usgs  what is the result of conda info and how are you setting your .condarc?
 We probably need to rebuild something there :-/

@ocefpaf  I have been able to install metpy 1.0.0rc1 on python 3.7 according to above specifications, However there are errors due to pint. Any ideas on how to resolve these?

 Code:
import xarray as xr
import metpy

url = 'http://opendap.co-ops.nos.noaa.gov/thredds/dodsC/NOAA/LOOFS/MODELS/202003/glofs.loofs.fields.forecast.20200320.t06z.nc'
ds = xr.open_dataset(url)
ds = ds.set_coords(['lon', 'lat'])
parsed_temp = ds.metpy.parse_cf('temp')

Error Details
UndefinedUnitError                        Traceback (most recent call last)
<ipython-input-3-22ddc53f81fc> in <module>
      5 ds = xr.open_dataset(url)
      6 # ds = ds.set_coords(['lon', 'lat'])
----> 7 parsed_temp = ds.metpy.parse_cf('temp')

~/anaconda3/envs/c2/lib/python3.7/site-packages/metpy/xarray.py in parse_cf(self, varname, coordinates)
    659         if crs is not None:
    660             var = var.assign_coords(coords={'crs': crs})
--> 661         return var.metpy.quantify()
    662
    663     def _rebuild_coords(self, var, crs):

~/anaconda3/envs/c2/lib/python3.7/site-packages/metpy/xarray.py in quantify(self)
    166         ):
    167             # Only quantify if not already quantified and is quantifiable
--> 168             quantified_dataarray = self._data_array.copy(data=self.unit_array)
    169             if 'units' in quantified_dataarray.attrs:
    170                 del quantified_dataarray.attrs['units']

~/anaconda3/envs/c2/lib/python3.7/site-packages/metpy/xarray.py in unit_array(self)
    145             return self._data_array.data
    146         else:
--> 147             return units.Quantity(self._data_array.values, self.units)
    148
    149     def convert_units(self, units):

~/anaconda3/envs/c2/lib/python3.7/site-packages/metpy/xarray.py in units(self)
    129             return self._data_array.data.units
    130         else:
--> 131             return units.parse_units(self._data_array.attrs.get('units', 'dimensionless'))
    132
    133     @property

~/anaconda3/envs/c2/lib/python3.7/site-packages/pint/registry.py in parse_units(self, input_string, as_delta)
   1063         for p in self.preprocessors:
   1064             input_string = p(input_string)
-> 1065         units = self._parse_units(input_string, as_delta)
   1066         return self.Unit(units)
   1067

~/anaconda3/envs/c2/lib/python3.7/site-packages/pint/registry.py in _parse_units(self, input_string, as_delta)
   1262             as_delta = self.default_as_delta
   1263
-> 1264         return super()._parse_units(input_string, as_delta)
   1265
   1266     def _define(self, definition):

~/anaconda3/envs/c2/lib/python3.7/site-packages/pint/registry.py in _parse_units(self, input_string, as_delta)
   1091         many = len(units) > 1
   1092         for name in units:
-> 1093             cname = self.get_name(name)
   1094             value = units[name]
   1095             if not cname:

~/anaconda3/envs/c2/lib/python3.7/site-packages/pint/registry.py in get_name(self, name_or_alias, case_sensitive)
    624         candidates = self.parse_unit_name(name_or_alias, case_sensitive)
    625         if not candidates:
--> 626             raise UndefinedUnitError(name_or_alias)
    627         elif len(candidates) == 1:
    628             prefix, unit_name, _ = candidates[0]

UndefinedUnitError: 'Celsius' is not defined in the unit registry

I'm not a pint user. I only use cf-units b/c it is compatible with udunits2 standards. Maybe @dopplershift can help you there.

The following installation works:
conda create -n test-env python=3.7
conda install -c conda-forge/label/metpy_rc metpy

It looks like for some reason pint will only parse "celsius" and not "Celsius" (I just opened hgrecco/pint#1081).


Long Type integration and Unicode Type Integration to support Python 3.12

Co-authored-by: Richard Wheeler<EMAIL_ADDRESS>
Python 3.12 support

3.12 has this now:
typedef struct _PyLongValue {
    uintptr_t lv_tag; /* Number of digits, sign and flags */
    digit ob_digit[1];
} _PyLongValue;

struct _longobject {
    PyObject_HEAD
    _PyLongValue long_value;
};

Used to be defined as::
struct _longobject {
    PyObject_VAR_HEAD
    digit ob_digit[1];
};

Generic object type for a variable size container
     PyObject_VAR_HEAD vs PyObject_HEAD

So, if PyObject *a is actually a PyLongObject *a then you know that you can use Py_SIZE to get the amount of digits.
For 3.12, they gave up on that, and now lv_tag encodes not only amount of digits, and sign, but also some "flags".
And we got e.g. Jinja2 template code like this, an excerpt
    if (Py_REFCNT({{operand1}}) == 1) {
        digit const *b_digits = {{ right.getLongValueDigitsPointerExpression("operand2") }};
        Py_ssize_t b_digit_count = {{ right.getLongValueDigitCountExpression("operand2") }};

        bool a_negative = {{ left.getLongValueIsNegativeTestExpression("operand1") }};
        bool b_negative = {{ right.getLongValueIsNegativeTestExpression("operand2") }};

        if (a_negative) {
            if (b_negative) {
                {# Reversed operands order means sign inversion. #}
                {{ operand1 }} = _Nuitka_LongSubInplaceDigits({{ operand1 }}, b_digits, b_digit_count, -1);
            } else {
                {{ operand1 }} = _Nuitka_LongAddInplaceDigits({{ operand1 }}, b_digits, b_digit_count);
                Py_SET_SIZE({{ operand1 }}, -Py_ABS(Py_SIZE({{ operand1 }})));
            }
        } else {
            if (b_negative) {
                {{ operand1 }} = _Nuitka_LongAddInplaceDigits({{ operand1 }}, b_digits, b_digit_count);
            } else {
                {{ operand1 }} = _Nuitka_LongSubInplaceDigits({{ operand1 }}, b_digits, b_digit_count, 1);
            }
        }

        {{ goto_exit(props, "exit_result_ok") }}
    }

There is already Jinja2 context that has getLongValueIsNegativeTestExpression and that needs to be now code now different from 3.11 and 3.12
The call to Py_SET_SIZE({{ operand1 }}, -Py_ABS(Py_SIZE({{ operand1 }}))); is assuming, that Py_SIZE is in charge, and that now would need that sort of modification.
Like adding a method.
They got implementations for Python long, for C long, and so on
    @staticmethod
    def getLongValueIsNegativeTestExpression(operand):
        return "Py_SIZE(%s_long_object) < 0" % operand

This is for know PyLongObject *  used in code generation. For 3.12, we need to produce something that is either Py_SIZE or whatever is new there.
For C longs, there is this:
    @staticmethod
    def getLongValueIsNegativeTestExpression(operand):
        return "%s_is_negative" % operand

And for single digit numbers, i.e. longs small enough to not be forced into 2 digits
    @staticmethod
    def getLongValueIsNegativeTestExpression(operand):
        return "%s < 0" % operand

These kinds of methods now need to be touched, to not use Py_SIZE directly, maybe add one for Py_SET_SIZE and getting the digit count, with Py_ABS(Py_SIZE()).
That's a bunch of refactoring of code, where if you do it properly, you start to use 3.11 correct code still, but there is a #ifdef PYTHON_VERSION < 0x3c0 or so that guards it to be different to the C compiler.
Code like this is generated:
static PyObject *COMPARE_EQ_OBJECT_LONG_LONG(PyObject *operand1, PyObject *operand2) {
    CHECK_OBJECT(operand1);
    assert(PyLong_CheckExact(operand1));
    CHECK_OBJECT(operand2);
    assert(PyLong_CheckExact(operand2));

    PyLongObject *operand1_long_object = (PyLongObject *)operand1;

    PyLongObject *operand2_long_object = (PyLongObject *)operand2;

    bool r;

    if (operand1_long_object == operand2_long_object) {
        r = true;
    } else if (Py_SIZE(operand1_long_object) != Py_SIZE(operand2_long_object)) {
        r = false;
    } else {
        Py_ssize_t i = Py_ABS(Py_SIZE(operand1_long_object));
        r = true;

        while (--i >= 0) {
            if (operand1_long_object->ob_digit[i] != operand2_long_object->ob_digit[i]) {
                r = false;
                break;
            }
        }
    }

    // Convert to target type.
    PyObject *result = BOOL_FROM(r);
    Py_INCREF(result);
    return result;
}

Modify those helpers, add maybe some, the Jinja will produce code that won't use Py_ABS anymore, but maybe a newly added _Nuitka_GetDigitCount instead, that for 3.11 is one thing, and for 3.12 something else.
This sort of code also comes from it
/* Code referring to "LONG" corresponds to Python2 'long', Python3 'int' and "LONG" to Python2 'long', Python3 'int'. */
static PyObject *_BINARY_OPERATION_ADD_OBJECT_LONG_LONG(PyObject *operand1, PyObject *operand2) {
    CHECK_OBJECT(operand1);
    assert(PyLong_CheckExact(operand1));
    CHECK_OBJECT(operand2);
    assert(PyLong_CheckExact(operand2));

    PyObject *result;

    // Not every code path will make use of all possible results.
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4101)
#endif
    NUITKA_MAY_BE_UNUSED PyObject *obj_result;
    NUITKA_MAY_BE_UNUSED long clong_result;
#ifdef _MSC_VER
#pragma warning(pop)
#endif

    PyLongObject *operand1_long_object = (PyLongObject *)operand1;

    PyLongObject *operand2_long_object = (PyLongObject *)operand2;

    if (Py_ABS(Py_SIZE(operand1_long_object)) <= 1 && Py_ABS(Py_SIZE(operand2_long_object)) <= 1) {
        long r = MEDIUM_VALUE(operand1_long_object) + MEDIUM_VALUE(operand2_long_object);

        clong_result = r;
        goto exit_result_ok_clong;
    }

    {
        PyLongObject *z;

        digit const *a_digits = operand1_long_object->ob_digit;
        Py_ssize_t a_digit_count = Py_ABS(Py_SIZE(operand1_long_object));
        bool a_negative = Py_SIZE(operand1_long_object) < 0;
        digit const *b_digits = operand2_long_object->ob_digit;
        Py_ssize_t b_digit_count = Py_ABS(Py_SIZE(operand2_long_object));
        bool b_negative = Py_SIZE(operand2_long_object) < 0;

        if (a_negative) {
            if (b_negative) {
                z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
                Py_SET_SIZE(z, -(Py_SIZE(z)));
            } else {
                z = _Nuitka_LongSubDigits(b_digits, b_digit_count, a_digits, a_digit_count);
            }
        } else {
            if (b_negative) {
                z = _Nuitka_LongSubDigits(a_digits, a_digit_count, b_digits, b_digit_count);
            } else {
                z = _Nuitka_LongAddDigits(a_digits, a_digit_count, b_digits, b_digit_count);
            }
        }

        obj_result = (PyObject *)z;
        goto exit_result_object;
    }

exit_result_object:
    if (unlikely(obj_result == NULL)) {
        goto exit_result_exception;
    }
    result = obj_result;
    goto exit_result_ok;

exit_result_ok_clong:
    result = Nuitka_LongFromCLong(clong_result);
    goto exit_result_ok;

exit_result_ok:
    return result;

exit_result_exception:
    return NULL;
}

You don't have to run it with 3.12 to do that, and it won't work well until e.g. strings are also solved.

Nuitka version, full Python version, flavor, OS, etc. as output by this exact command.

python -m nuitka --version

(py3.11)PS S:\repo\Nuitka> python -m nuitka --version
2.2rc1
Commercial: None
Python: 3.11.8 | packaged by Anaconda, Inc. | (main, Feb 26 2024, 21:34:05) [MSC v.1916 64 bit (AMD64)]
Flavor: Anaconda Python
Executable: S:\Tools\Anaconda\envs\py3.11\python.exe
OS: Windows
Arch: x86_64
WindowsRelease: 10
Version C compiler: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe (cl 14.3).

How did you install Nuitka and Python

Anaconda

I think "negation" of longs needs to be its own helper function, surely it works differently. This is 3.11 code
static PyObject *
long_neg(PyLongObject *v)
{
    PyLongObject *z;
    if (IS_MEDIUM_VALUE(v))
        return _PyLong_FromSTwoDigits(-medium_value(v));
    z = (PyLongObject *)_PyLong_Copy(v);
    if (z != NULL)
        Py_SET_SIZE(z, -(Py_SIZE(v)));
    return (PyObject *)z;
}

As you can see, they used to the negation (of an object, they are shortcutting for small numbers) with Py_SIZE negation, playing a dirty trick anymore. If you check out the same in 3.12, you can get a good idea of how it's now.
static PyObject *
long_neg(PyLongObject *v)
{
    PyLongObject *z;
    if (_PyLong_IsCompact(v))
        return _PyLong_FromSTwoDigits(-medium_value(v));
    z = (PyLongObject *)_PyLong_Copy(v);
    if (z != NULL)
        _PyLong_FlipSign(z);
    return (PyObject *)z;
}

So, I guess, you would have to add a _NuitkaLong_FlipSign with the code of 3.11 and 3.12 behind #if

#if PYTHON_VERSION < 0x3c
#define _NuitkaLong_FlipSign(x) Py_SET_SIZE(x, -(Py_SIZE(x)));
#else
#define _NuitkaLong_FlipSign _PyLong_FlipSign
#endif

This should be it. Find all the places that do this, and call the new "function" from there. If done correctly, you see no change for Python3.11, and for Python3.12 one C compile error will be gone. The proper spot could be nuitka/build/include/nuitka/helper/ints.h although maybe I forgot and there is a better one.
Then rinse and repeat. For everything done there, we have a Python longobject code that we need to make portable across versions essentially.

The 0x3c0 is 3.12

I did this and it's currently on factory branch.

Bummer, sorry didn't know you were going to move this fast on this issue.  Thanks anyway


'dateDisabled' validation error is pushed to the form and not the element

The issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read https://github.com/angular-ui/bootstrap/blob/master/CONTRIBUTING.md and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.
Bug description:
When a disabled date is chosen by typing in, the 'dateDisabled' validation error is triggered. However the validation error object is pushed to '$error' in the form and not the element.  This makes it difficult to differentiate the errors if there are more than one datepickers.
Link to minimally-working plunker that reproduces the issue:
https://plnkr.co/edit/0XWmsZEo1BF3fU7NJgnA?p=preview
Version of Angular, UIBS, and Bootstrap
Angular: 1.5.8
UIBS: 2.2.0
Bootstrap: 3.3.7

+1

file: datepicker.js
line: 214
      ngModelCtrl.$setValidity('dateDisabled', !date ||
        this.element && !this.isDisabled(date));

Any progress at this issue ?

Any progress at this issue ?

Hey all,
I got super frustrated by how bad the validation was on this thing, so I rolled my own directive which seems to do the job, at least for my purposes. Just add valid-date to your input. See this gist for the code. Note, I use moment to compare the dates correctly.
Hope that helps some peeps.


Match string in string

Adds ability to match if "foo" in "foobar"

But we have matches.  It does same think:
"foo" matches "foobar"

Is it?

These examples don't work in the same way as they would with in as they do with a regular expression match. To me they seem different enough.
"foobar" matches "foo"  (should be false)
"foo" matches "foobar"  (should be true)
"foobar" matches ""     (should be false)
"$1" matches "$1.50"    (should be true)
"foo" matches "foo.bar" (should be true)

I see, not in operator supports both maps and arrays. Do you think it will be okay to override strings too?

I don't see why not. It works for me, would you like me to add tests for that?

Ok, just please add type checks for strict mode. (See type.go)

After discussion with my team we decided not to add this functionality as it can be error prone.
For example "" in bar if user expects bar to be an array he may check for empty string properly, but if bar ended up being string this check will always be try.
(In fact we see this errors in python)
As alternative is to define helper method:
Contains("foobar", "bar")

What do you think?

I'm working on next expr version and it will have contains operator.

Will be solved in #21


box.putAll(Map) triggering watch event Map.entries.length amount of time

Question
Is it possible for Hive to trigger BoxEvent only once when using putAll method? Now when adding map of entries to a box it gets triggered as many times as there are entries.
Code sample
using this code:
 box.watch().map(
      (BoxEvent _) {
        print("watchAll: " + T.toString() + " " + _.toString());
        return box.values.toList();
      },
    )

I'm getting this output:
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'
I/flutter (14849): watchAll: Reward Instance of 'BoxEvent'

Version

Platform: iOS, Android, Web
Flutter version: Flutter 3.0.3 • channel stable
Hive version: 2.2.1
Hive_flutter version: 1.1.0
Hive_generator version: 1.1.3

+1
Any updates?

very terrible
put and putAll both cann't use
looking forward to updates


[System Upgrade Controller (SUC)] Check for PSP compatibility in target cluster

Parent ticket: https://github.com/rancher/rancher/issues/39366
Kubernetes 1.25 drops support for PSP, so additional checks need to be added.
Every chart that ships with a PSP must be changed to add a new condition checking for the PSP capability in the target cluster:
Capabilities check for Helm
{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
This change allows the charts to still work with PSPs in Kubernetes versions prior to v1.25, and work in Kubernetes v1.25 or higher by skipping the installation of PSPs.
Charts that need updating as part of this issue:

system-upgrade-controller

(PSP and related objects are referenced at least in https://github.com/rancher/charts/blob/dev-v2.7/charts/system-upgrade-controller/101.0.0%2Bup0.3.3/templates/psp.yaml)
Since PSPs seems to be the only 1.25-removed feature/API used by SUC, as part of this issue it's expected that catalog.cattle.io/kube-version will be updated to '>= 1.18.0-0 < 1.26.0-0' to declare support for 1.25.
If a cluster role in a chart contains PSP's along with other permissions extra work may be needed to achieve the intended behavior of that role.
Note: Making SUC work with restrictive PSAs is out of the scope of this issue. Policy shipping with Rancher out of the box will be updated to exclude the namespace SUC runs in per https://github.com/rancher/rancher/issues/39996.

As this is part of the broader K8s 1.25 internal test plan, this will be tested alongside other test cases. Once tested, I will close this issue.

Validated the test cases associated with this issue in the internal test plan, so I will close this issue.


ICE connection state goes from completed to failed in TURN server

I am using stream-webrtc-android version 1.2.2 in my android project and trying to connect an audio call using my turn server. The connection is initially successful, I get COMPLETED state and audio is being transferred but after 40 seconds, the connection state changes to DISCONNECTED->FAILED. A packet capture of my TURN server showed that after 40 seconds the client sends a binding request and server responds with a binding success response, which I assume is the consent request involved in the Ice connection process. In this case the connection should stay alive because server replied with binding success response but it goes to FAILED state.
I have a separate web application as well, which uses the official webRTC library, and I can see that after every 40 second it goes to COMPLETED state after the successful consent requests so this doesn't seem to be a server specific issue.
I request you to kindly help me with this problem.

Hi @sourish115, the new release, version 1.3.0, is now available and includes the m125 patches. Could you check if this issue still occurs with the updated release?

Hello @skydoves , thanks for the reply. I will migrate to the new version soon and post an update here.


2024-11-01_01-35-44_master-next_aws-c-io

Automatically created.

this seems to need a s2n update first


Enhancement: make table column data follow column header alignment

Currently, one may set the alignment of table header columns, for example:
    tableview_header_align(collections, id, ekRIGHT);
It is not possible right now to set the same for column data. I suggest it would be natural to allow the data to follow the column header.
This is easily accomplished by changing tableview.c: i_draw_cell, line
draw_text_halign(ctx, cell->align);
to read instead
draw_text_halign(ctx, col->align);
I propose that this be done, or a separate function tableview_column_align(...) be written.

In TableView, the text alignment is cell-based and not column-based. You have to return the desired alignment in EvTbCell result in ekGUI_EVENT_TBL_CELL event.
    case ekGUI_EVENT_TBL_CELL:
    {
        const EvTbPos *pos = event_params(e, EvTbPos);
        EvTbCell *cell = event_result(e, EvTbCell);

        switch(pos->col) {
        case 0:
            cell->align = ekLEFT;
            bstd_sprintf(data->temp_string, sizeof(data->temp_string), "Name %d", pos->row);
            break;
       ...

I see - and this works beautifully.


Added ng add @angular/pwa to Service Workers

Added the ng add @angular/pwa command to easily integrate service workers into an angular app.
Also added a reference to the Getting Started with Service Workers from the Angular docs

Thanks!


Uncaught Livewire Sortable.js Plugin: window.Livewire is undefined. Make sure @livewireScripts is placed above this script include

v3 doesn't use @livewireScripts anymore.

Same issue...

Also same issue with updated version

With the new way to use Livewire (that is without explicit declaration of @livewireScripts and @livewireStyles in your layout file), Livewire is actually only initialized if there are Livewire components on render. The result is that there should be no errors (with v0.3.0) on pages which contain Livewire components. The current check to see if Livewire is instantiated should, however, no longer throw an error, and probably silently stop further execution of the sortablejs script.
@gdebrauwer Could you take a look at this?

ping @gdebrauwer . Any plans to fix it?

Fixed in v0.3.1


feat: unassign command

Resolves #207

This needs to "unassign" by removing all assignees, and then assigning @ubiquity-bounties for now. Please make sure to pull the name from the shared "reserved user names" array or whatever it is, instead of hardcoding in the function.
Also we will be deprecating that username soon, so however you implement this should be easy to catch to update as well ideally.

This needs to "unassign" by removing all assignees, and then assigning @ubiquity-bounties for now. Please make sure to pull the name from the shared "reserved user names" array or whatever it is, instead of hardcoding in the function.
Also we will be deprecating that username soon, so however you implement this should be easy to catch to update as well ideally.

This is what it does,

remove previous assignees
Add reserved assignees GLOBAL_STRING.assignees

@pavlovcik


Build BurstableAtomicIDProviderSystem

See: https://github.com/decline-cookies/anvil-unity-dots/pull/258/files#r1220141780
Have a system that creates the IDProviders for you and stores a reference to them. Every so often (configurable, could be frame or X seconds) it will check them all against their SupplyWarningThreshold and emit an event for the main thread application to listen to and respond to similar to IDProvider

Ah yea, I was thinking the BurstableAtomicIDProvider would register itself with the system but this makes more sense because you need a World reference anyway and this better matches the pattern you follow for ECBs.
The system can probably just check every frame. It's not going to be expensive and there aren't going to be tens of thousands of ID providers.


⚠ Bofrost.de has degraded performance

In f9fede8, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1735 ms

Resolved: Bofrost.de performance has improved in be409ff.


ECONNRESET error (out of the blue)

Versions
Here are our packages:
"dependencies": {
        "adaptive-expressions": "^4.20.0",
        "adaptivecards": "^3.0.1",
        "adaptivecards-templating": "^2.3.1",
        "botbuilder": "^4.20.0",
        "crypto-js": "^4.2.0",
        "restify": "^11.1.0"
}

Describe the bug
Our bot runs in Microsoft Teams. When the user interacts with the bot (e.g. via Action.Execute), our out bot is called (via invokeAction). We then try to get the context of the user:
const account: TeamsChannelAccount = await TeamsInfo.getMember(context, context.activity.from.id);
Since yesterday night, the ECONNRESET error from TeamsInfo spiked. Every 20 mins we receive an error from TeamsInfo like this one:
{
	"error": {
		"message": "request to https://smba.trafficmanager.net/kr/v3/conversations/xxxxxxxxxxxxxxxxxx4060909e5857e4973dde%40thread.v2/members/xxxxxxxxxxxxxxxxxxxxx-oKuTvKFv8xSnaTmXxPwiAk716rKqwBCCeopkrZWVX6AR9A failed, reason: read ECONNRESET",
		"type": "system",
		"errno": "ECONNRESET",
		"code": "ECONNRESET"
	}
}

The bot was running fine with no problems for weeks. The error suddenly popped up yesterday night.
To Reproduce
Happens randomly.
Expected behavior
No error.
Are there any known outages? Thanks for checking!

Yep, getting the same here too as of this morning. Noticed it with a couple DEV/TEST bots and is now affecting our PROD bots.

I've had a look at our application insights instance relating to one of the affected bots and it appears to be related to the https://smba.trafficmanager.net endpoint and the sporadic nature of execution timings (longest time has been 1 minute). Everything else appears to be working fine in the application layer other than this endpoint.

The above endpoint is managed entirely by Teams and not BotFramework. For this reason, I will be closing this issue.
I would suggest either opening an Azure help ticket within the Azure portal or posting this on Microsoft Q&A and tagging it with 'Microsoft Teams'. The Q&A forum is an active community that is often monitored by Teams support staff.

I have created a new ticket for this:
https://github.com/MicrosoftDocs/msteams-docs/issues/11559


test error

Hi,
I having trouble with a test method testAddPassword which is in sqlcipher.py.
Are you able to run the tests without any exceptions and failures?

I haven't tried running any tests lately, but considering nothing has changed in this repo for a while, any failures would have to be caused by external dependency changes like the sqlcipher lib or version of python you are using.

I built it under win7 with mingw32 compiler. Have you ever tested it under any windows? os.rename function raises exception in testAddPassword as far as I remember. Other tests are OK.

I built in once on Windows, but I think I used the Visual Studio compiler. What's the exact exception you are seeing. If it's with os.rename, that sounds like a Python issue (maybe with permissions of files/folders on your system)

Hi,

You can see the exception above.
Actually, the problem is due to os.rename behaves differently under windows and Linux.
In windows, os.rename(old, new) raises exception if new file name is already in the system but Linux just replaces the new file if it exists. It works like mv command in linux.
Moreover, rename function in C Programming  in Linux works as same as python's os.rename in Linux as far as I have tested.
Using a nonexistent new file name would solve the problem.

Based on your screenshot, are you running python2 rather than python3? I wonder if the behavior changed between releases. So it sounds like a rename in Windows would to do a file copy and then delete the old file. I primarily run Linux, so if you find a fix on Windows, I'm more than open to accepting PRs.

I have created a pull request. I run the tests with Python 2.7 and 3.4 on windows OS with success. I have also created wheels using mingw32 compiler, they all work good if libeay32.dll is accessible. Thanks.


added utf-8 bypass with length check and added username to envelope keys

Added utf-8 check bypass, normalize email addresses, let guerrilla validate with rfc 5321, then revert the de-normalised address


shortcut key - Move Focus order

I am not sure if this is a bug or a feature. Can I move focus based on the visual order of the panels - to be able to navigate clockwise/coutner based on what I see not the order I create the panels?
I already configured my to use shortcut key to switch focus and create horizontal and vertical panels.
I usually create panels based on different (development) environments and/or purpose of the server.
Example:

Top panels might be the servers that host website or API, bottom might be database
Top left development API,  bottom left development (mysql) database. Top right QA API, bottom right QA (mysql)  database

When I create the panel I usually first create another vertical panel. Intial is panel 1 and I created panel 2.  Shortcut key focus works

I create panel 3 when I am focus in Panel 2.. I need to be focus in panel 2 to focus on panel3. To my this make sense - clockwise and counter clockwise navigation.

I now create panel 4 when I am focus in panel 1.

The focus only allows me to go in the order as I created. If I am in panel 3 I can only go to panel 3 or panel 1. I would like the ability to go to panel 4. If I am in panel 4 I can only go to panel 1 and 2. I can not go directly to panel 3.

Are you guys able to see my screen shot attachments?

Thanks for the suggestion! This is actually already being tracked by another issue on our repo - please refer to #2871 for more discussion.
/dup #2871


Converters for BigDecimal and BigInteger number types

must handle values like 42,000,000,000,000,000.123456 (internationalised)

I've got an implementation:
https://github.com/slu-it/livingdoc2/tree/big-numbers
but there is a problem with converting Double.MAX_VALUE to a correct BigDecimal


Support "forced" auto-escaping policy.

When the "forced auto-escaping" policy is in effect, only output formats that support auto-escaping may be used; also, the ?no_esc built-in and the <#noautoesc> directive are disabled.

Looks good at quick glance. (Will review again before it's actually merged.) One thing comes to my mind is that the error messages should probably refer to the "auto_escaping_policy setting", or else users won't know what to do.

I have also done a few follow up commits to refine this.


RSS feed component

Let's see if we can get an exsiting react component that takes an RSS feed to get a wordpress blog popualting the what is health equity page

Created a proof of concept here: https://github.com/SatcherInstitute/health-equity-tracker/pull/987
But current decision is not to spend efforts here


TypeScript messages language

As of version 1+, TypeScript messages appear in my native language (pl), which is quite confusing as I have all the editor and all other tools in English. How can I change the language of these messages?

Duplicate of #1959


Documentation is outdated

The official Website refers to Template components that do no longer exists
e.g. https://ratatui.rs/templates/component/utils-rs/

Also the internal documentation refers to a counter example that was removed months ago
https://github.com/ratatui/templates/blob/main/component/README.md#counter--text-input-demo

This is really annoying for people trying to get familiar with ratatui (me).
Please, at least mark the doc as incomplete / outdated in case there are no resources to maintain it.

Would you consider submitting a PR to fix this? The variant of markdown on the website supports annotations like:
:::warning

Some text that will end up in a yellow warning block

:::


No files in the record folder

I have things set up, but I think there's something wrong with my NFS config. I get folders and files created, but the record folder gets created with 644 permission, and nothing is written inside it. If I manually change it to 744, then I get folders inside, but those folders also have 644 permission. If I keep chmod'ing the folders, it eventually starts writing video files, until it goes to the next hour, at which time the new hour folder gets 644 permissions and the Wyze cam can't write to it any more.
Here is my nfs export file:
/mnt/security_video *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1003,anongid=1003)
1003 is the UID and GID of the wyzecam user I have created on the linux box.
I'm using Wyze Cam v2 with <IP_ADDRESS> firmware.

Just for a test, can you get rid of the "anonuid=1003,anongid=1003", restart NFS and see what happens as root user?

If I change it to no_root_squash, and remove the anonuid/anongid then it works. But I'm not sure how comfortable I am doing that. It seems weird that all the directories except the Record ones get the proper permissions. Maybe those are getting created by a different process on the Wyzecam.

Your Linux may be running NFS V4 and with that it may require that that user ID matches the client user ID in order for permissions to work correctly. On the cam we only have user ID 0 which is root.  I would say if your /mnt/security_video is isolated it may not be a huge security risk.  It would be more of a security issue if you allowed passwordless SSH to a server from the cam.   I don’t run the NFS deal anymore simply because of network congestion but when I did I really didn’t have any issue with just allowing it to be root as my Linux runs NFS V4.  Good luck in whatever you decide.

When you say “push everything to the cloud” do you mean using Wyze’s cloud service and alerts or do you mean using another cloud service?  You actually already have what I was going to do If I continue the NFS deal, which was put the cams on their own WLAN so that they didn’t interfere with all my other network activities.  I had four cams and understand that they are all set to the exact same time so every minute, on the minute, all the cams were writing their 10MB mp4 files to my NFS server at exactly the same time.  This would interfere with Xbox, video streaming, etc. because I only had one WLAN for everything.  It was more a matter of bad logistics on my part.  My solution was going to be to create more WLANs just for smart devices.   You already figured that out, so you are probably good to go.
I chose to go with a much more complicated solution so that I don’t store so much unnecessary video nor clog my existing network  😬


Remove licence file placeholder in development mode

add-asset-webpack-plugin will probably not be updated for webpack 5 in the near future, so drop the plugin to not block that update and I guess that absent placeholder in dev mode is a non-issue.
Ref: https://github.com/sindresorhus/add-asset-webpack-plugin/issues/5

Actually I think I may try to fix the plugin, closing for now.


Fix "Service Registry Actuator Endpoint URL" in doc is wrong(#1240)

Fix #1240

@Pengfei-Lu Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

@Pengfei-Lu Thank you for signing the Contributor License Agreement!

Any update about this?

Any update about this? @spencergibb

I've fix the conflicts with the main branch. Please check. @spencergibb


KAFKA-5820 Remove unneeded synchronized keyword in StreamThread

I removed synchronized keyword from 3 methods.
I ran the change thru streams module where test suite passed.

SaslPlainSslEndToEndAuthorizationTest passes locally with change.

retest this please

Not a committer, but went through your changes and it seems fair to remove those syncs.

@mjsax @guozhangwang :
Can you take a look ?

Merged to trunk.


Running migrate for the second time fails.

Here is what I followed:
> mkdir cookiecutter-django-test
> cd cookiecutter-django-test
> virtualenv env
> . env/bin/activate.fish
> pip install cookiecutter
> cookiecutter https://github.com/pydanny/cookiecutter-django.git

and here is what I answered for the questions
project_name [project_name]: cookiecutter-django-test
repo_name [cookiecutter-django-test]:
author_name [Your Name]: My Name
email [Your email]<EMAIL_ADDRESS>description [A short description of the project.]:
domain_name [example.com]:
version [0.1.0]:
timezone [UTC]:
now [2016/01/07]: 2016/01/08
year [2016]:
use_whitenoise [y]:
use_celery [n]: y
use_mailhog [n]: y
use_sentry [n]: y
use_newrelic [n]: y
use_opbeat [n]:
windows [n]:
use_python2 [n]: y

and then
> cd cookiecutter-django-test
> pip install -r requirements/local.txt
> cp ~/mailhog ./
> createdb cookiecutter-django-test
> python manage.py migrate

Everything works fine so far. But as I migrate again, following error is generated:
> python manage.py migrate
Operations to perform:
  Apply all migrations: account, users, sessions, admin, sites, kombu_transport_django, contenttypes, auth, socialaccount
Running migrations:
  No migrations to apply.
  Your models have changes that are not yet reflected in a migration, and so won't be applied.
  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.

This is quite strange as I have not modified a single bit. I tried debugging it a little, and following is what I got:
> python manage.py makemigrations
Migrations for 'sites':
  0003_auto_20160108_1401.py:
    - Alter field domain on site
Full migrations file '0003_auto_20160108_1401.py':

# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-08 14:01
from __future__ import unicode_literals

import django.contrib.sites.models
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('sites', '0002_set_site_domain_and_name'),
    ]

    operations = [
        migrations.AlterField(
            model_name='site',
            name='domain',
            field=models.CharField(max_length=100, unique=True, validators=[django.contrib.sites.models._simple_domain_name_validator], verbose_name='domain name'),
        ),
    ]

Migrations for 'users':
  0002_auto_20160108_1401.py:
    - Alter field username on user
Full migrations file '0002_auto_20160108_1401.py':

# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-08 14:01
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.AlterField(
            model_name='user',
            name='username',
            field=models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username'),
        ),
    ]

Although if I make the above migrations and execute them, the problem resolves. But I am unable to understand, why it happens at the first place? It seems that the site domain and user username are being modified somehow after running the migrations.

Very curious. Can you provide us with:

Operating system
Python version

MacOS El Capitan
2.7

Is your time correct on the device?

Yes, also tried it multiple times.

Weird. Still having this problem?

I still can't reproduce this issue. Closing it, but if @erfaan still can't resolve this case we'll reopen it.

I run into the same issue on Ubuntu 14.04 / Python3.4. Cloned my version of cookiecutter-django.git last Friday. Running 'python manage.py migrate' twice in a row results in the same message as @efraan got.
Similarily running makemigrations generates two files, one for 'sites' the other one for 'users', with same content as @efraan had.

I have the some problem. Does anyone solve it?

Ditto. OSX El Cap, python3.5


nixos/zapret: improvements

Improving NixOS Zapret module.
Now that https://github.com/NixOS/nixpkgs/pull/347805 got merged, which contained basic implementation, it's time to discuss possible QoL and functionality improvements. I'll draw some ideas bellow, yet I'm open to suggestions.
Again, those are just ideas to discuss. Or just leave the module as is to keep it simple?
Better http processing.
Current implementation bypasses DPI that only tracks first packet within keep-alive session. It is fast, as it only requires processing of a single packet. But there are scenarios when DPI tracks all the packets. This needs a different approach of processing every packet. Should be slower in theory, tho I haven't tested it yet.
Straightforward solution is just to create an option for that. But I'm unsure as that'd either be dull "enable this if http doesn't work" or a description that is a bit too technical for the end user.
UDP support.
Discord was blocked in Russia recently and it uses UDP for RTC. Zapret (nfqws) supports UDP even tho configuration is much more complicated. Only issue with that now is the fact that Discord works fine for me. Which means that I need to do a field operation of testing on a public WiFi or someone else testing that for me. I prepared a draft of possible configuration. I am also not aware of any other blocked services that use UDP.
Pre-configured targets.
This is purely QoL, but it might be nice to have options for specific services, like Youtube, which could be enabled like that:
services.zapret = {
  enable = true;
  target = {
    youtube.enable = true;
    discord.enable = true;
  };
};

It really should be called whitelist.<target> but I take the shame for missing that opportunity. Still it'd work as a whitelist by adding known domains to the whitelist - this does not include setting up params option (but might require enabling not yet available udpSupport option, which would likely append stuff to params). This solves the problem of finding all required domains for the service, i.e. Youtube requires 4 domains that are listed in whitelist example. But it introduces the problem of maintaining such lists.
The only issue I see is that it might not be universal for everyone, but still should cover most cases.
An alternative would be creating a Wiki page.

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Pre-configured targets.
I don't think that's good. Every user should have it's own zapret configuration, depending on provider. It's specially bad, considering RKN (russian "ministry" of censorship) may see this specific configuration.

Pre-configured targets.

I don't think that's good idea. Every user should have it's own zapret configuration, depending on provider. It's specially bad, considering RKN (russian "ministry" of censorship) may see this specific configuration.

Thanks for the input! I agree with you. But even when it's just a list of domains for that service? I honestly also don't really want to support that list and new services. I guess you're right, I'll cross that one out.


operator [O] kong (0.9.0)

Updates to existing Operators
This PR only adds a deprecation notice to kong operator (to be succeeded by https://github.com/k8s-operatorhub/community-operators/tree/main/operators/kong-gateway-operator)

The image pull test has to be a flake somehow, the image is available there for a while: https://hub.docker.com/layers/kong/kong-operator/v0.9.0/images/sha256-46000bf2f551dfdd83386b8db08155b7bd289a71993dbd1d5a63a57709e09952?context=explore
TASK [check_image_availability : Pull external operator image 'kong/kong-operator:v0.9.0' on Kubernetes] ***
fatal: [localhost]: FAILED! => changed=true
  cmd: podman pull kong/kong-operator:v0.9.0
  delta: '0:00:00.057427'
  end: '2022-10-11 15:15:28.654207'
  msg: non-zero return code
  rc: 125
  start: '2022-10-11 15:15:28.596780'
  stderr: 'Error: short-name resolution enforced but cannot prompt without a TTY'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>
...ignoring

TASK [check_image_availability : Print err message on Kubernetes] **************
fatal: [localhost]: FAILED! => changed=false
  msg: Unable to pull kong/kong-operator:v0.9.0, please check permissions or path.

@pmalek can you append registry host like docker.io?

@pmalek can you append registry host like docker.io?

Sure. Where would you like me to append it? You mean to change the containerImage value to docker.io/kong/kong-operator:v0.9.0 🤔 ?

@pmalek
* https://github.com/k8s-operatorhub/community-operators/blob/cb7879fa7146321f4ad2ff3f15b73925656915b9/operators/kong/0.9.0/kong.v0.9.0.clusterserviceversion.yaml#L167

* https://github.com/k8s-operatorhub/community-operators/blob/cb7879fa7146321f4ad2ff3f15b73925656915b9/operators/kong/0.9.0/kong.v0.9.0.clusterserviceversion.yaml#L9

@mvalarh Done. Let me know if that works.

/merge possible

/merge possible

/merge possible

Merging


 For example, foo.jsbin.com/name?

Actually, I just tried this workaround and when I do it the way that was suggested on 10/21, the JS console keeps giving the error "Warning: Something went wrong while saving. Your most recent work is not saved."


Backport 3.0 to 2019 platform

May I ask you for a favor?
CLion 2020 is unusable for me because of a performance bug, IDEA-232215.
Can 3.0 plugin be backported to 2019.3 version? Hope I'm not asking for too much.

Jjetbrains have found a workaround, in JBR-2289.


Added relations from existential restrictions and object property ass…

…ertions to flattened ontology.
ref https://github.com/EBISPOT/OLS/issues/13

Some problems here:

Duplicate Class are generated from anonymous type axioms.  The translation looks OK "(:Individual)-[:Related]->(:Class)" but new class is generated rather than wired up to existing Class. e.g.:

Many Individuals are mis-typed as classes, e.g.
MATCH (x { iri: 'http://virtualflybrain.org/reports/VFB_00015626'})-[y]-(z) return x,y,z

x should be an Individual, as should Cluster3.195.  Note INSTANCEOF edges from class->class.

Looks like that's fixed it!
Checked numbers of Individuals and Classes with VFB label (indicates loaded from vfb.owl) and they match the source file.  Also checked numbers for axioms of each type added. They all match too.
Did some spot checking of patterns too (just to be paranoid). All good.

@dosumis Try again now. It seems to be working. If you spot any other oddities, ping me again.


[kmac] Switch PRNG stream cipher primitive from Trivium to Bivium

To reduce area, this PR switches the stream cipher primitive inside the PRNG of KMAC from Trivium to Bivium. It was found that the security posture of Bivium is sufficient in this application scenario. This should give us back around 10 kGE.
Please don't merge this yet. The SCA evaluation is currently running and I will update the PR with the results.

The current results I have look okay. To be on the safe side, I'll have to repeat some more experiments, too. But this can happen later. I am confident that this is okay. Merging!

Update: I've now also finished the FPGA TVLA experiments for SHA3 and KMAC. The results do not significantly change between using Trivium or Bivium. So, it's all good :-)


⚠ ClamAV has degraded performance

In 862de73, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 80 ms

Resolved: ClamAV performance has improved in 3f00c4d.


Unable to fetch bucket contents

Requirement : Want to figure out bucket contents older than a specific date
Tried the following code (authenticated with a service-accounts.json file)
projectId := os.Getenv(constants.ENV_GCP_PROJECT_ID)
resp, err := computeService.BackendBuckets.Get(projectId, containerName).Context(ctx).Do()
if err != nil {
    fmt.Println("Error ", err)
}

It throws an error which says:
Error  googleapi: Error 404: The resource 'projects/<project_name>/global/backendBuckets/<bucket_name>' was not found, notFound

I can see the bucket listed on Google Cloud Console
Doubts:
a) Am I using the correct API for fetching all information stored inside a container/bucket ? (computeService.BackendBuckets.Get....)
b) Only difference I see in browser console, is that buckets location shows as regional and the error I am getting the client-library mentions ..../global/....
Can this be a reason for this error ? If yes, can you please suggest how to pass the regional flag in the API ?

For new code I suggest you check out the GCP clients: https://github.com/GoogleCloudPlatform/google-cloud-go#cloud-storage-
If you are sticking with this library I think you are looking for the storage package not compute.

I'm not really familiar with this feature, but from reading this doc page it appears that the backend bucket name is not the same as the name of the bucket in cloud storage.
You're using the right API, but check the name of the backend bucket in your load balancer configuration.
Also, these are definitely Google Cloud Storage buckets, and not related to "containers" as that word is usually used these days.


docker您有配置xavier agx的版本(aarch64)吗？

Sorry, we did not provide Xavier AGX version docker. You are quite welcome to provide that dev-env.


Add a dual generation mode with Write Defaults ON

Add a mode where Write Defaults is ON, but animations are generated anyways

Related: https://twitter.com/Hibihira_Mii/status/1298790205034397697


Failed to load sounds in IOS

:beetle: Description
sounds play fine in android but in ios I'm getting this error
 failed to load the sound {"code": "ENSOSSTATUSERRORDOMAIN2003334207", "domain": "NSOSStatusErrorDomain", "message": "The operation couldn’t be completed. (OSStatus error<PHONE_NUMBER>.)", "nativeStackIOS": ["0   deenee                              0x000000010e2f8ea7 RCTJSErrorFromCodeMessageAndNSError + 135", "1   deenee                              0x000000010e2f8dd3 RCTJSErrorFromNSError + 275", "2   deenee                              0x000000010e1d9ded -[RNSound prepare:withKey:withOptions:withCallback:] + 1949", "3   CoreFoundation                      0x00007fff204282fc __invoking___ + 140", "4   CoreFoundation                      0x00007fff204257b6 -[NSInvocation invoke] + 303", "5   CoreFoundation                      0x00007fff20425a47 -[NSInvocation invokeWithTarget:] + 70", "6   deenee                              0x000000010e282714 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2660", "7   deenee                              0x000000010e2868be _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 814", "8   deenee                              0x000000010e286386 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 134", "9   deenee                              0x000000010e2862ec ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 28", "10  libdispatch.dylib                   0x00000001110747ec _dispatch_call_block_and_release + 12", "11  libdispatch.dylib                   0x00000001110759c8 _dispatch_client_callout + 8", "12  libdispatch.dylib                   0x000000011107c296 _dispatch_lane_serial_drain + 796", "13  libdispatch.dylib                   0x000000011107cf67 _dispatch_lane_invoke + 439", "14  libdispatch.dylib                   0x0000000111088de2 _dispatch_workloop_worker_thread + 882", "15  libsystem_pthread.dylib             0x00007fff611684c0 _pthread_wqthread + 314", "16  libsystem_pthread.dylib             0x00007fff61167493 start_wqthread + 15"], "userInfo": {}}

:beetle: Please post your code:

function PlaySound(name) {
  const voice = new Sound(name, Sound.MAIN_BUNDLE, (error) => {
    if (error) {
      console.warn('failed to load the sound', error);
    }
    if (voice) {
        voice.play((success) => {
          if (success) voice.release();
          else console.warn('faild to play the sound');
        });
      }
    });
}

Is your issue with...
IOS
Are you using...
React Native CLI
Which versions are you using?

React Native Sound: 0.11.0
React Native: 0.63.4

Does the problem occur on...
Simulator

same here  anyone found solution ?

Check your audio format, iOS does not support ogg  files 😞

+++

Same issue here, I use an mp3 file. Any suggestions? thanks a lot

If the audio file you are using isn't added to the bundle, i.e., it isn't a local file that has been configured in Xcode resources, you'll get this error. Use null instead of Sound.MAIN_BUNDLE if the audio file is loaded over the wire.

This worked for me!


Fix URL formatting; spaces were not being escaped which caused several problems.

Fixes https://github.com/brave/browser-laptop/issues/10342
Auditor: @bridiver
I updated FormatForDisplay to allow for an override (if needed). However, the JavaScript binding is still only using the default implementation (hence the static cast). If we ever needed a version which kept space, we could create a new binding like FormatEscapingSpaces (which then calls FormatForDisplay(args, net::UnescapeRule::SPACES)

I tested the args manually and it works 😄 👍  You have to pass it as an integer.
Here are the possible values (should we use NONE or NORMAL?):
// Don't unescape anything at all.
 NONE = 0,

// Don't unescape anything special, but all normal unescaping will happen.
// This is a placeholder and can't be combined with other flags (since it's
// just the absence of them). All other unescape rules imply "normal" in
// addition to their special meaning. Things like escaped letters, digits,
// and most symbols will get unescaped with this mode.
NORMAL = 1 << 0,

// Convert %20 to spaces. In some places where we're showing URLs, we may
// want this. In places where the URL may be copied and pasted out, then
// you wouldn't want this since it might not be interpreted in one piece
// by other applications.
SPACES = 1 << 1,

// Unescapes '/' and '\\'. If these characters were unescaped, the resulting
// URL won't be the same as the source one. Moreover, they are dangerous to
// unescape in strings that will be used as file paths or names. This value
// should only be used when slashes don't have special meaning, like data
// URLs.
PATH_SEPARATORS = 1 << 2,

// Unescapes various characters that will change the meaning of URLs,
// including '%', '+', '&', '#'. Does not unescape path separators.
// If these characters were unescaped, the resulting URL won't be the same
// as the source one. This flag is used when generating final output like
// filenames for URLs where we won't be interpreting as a URL and want to do
// as much unescaping as possible.
URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 << 3,

// Unescapes characters that can be used in spoofing attempts (such as LOCK)
// and control characters (such as BiDi control characters and %01).  This
// INCLUDES NULLs.  This is used for rare cases such as data: URL decoding
// where the result is binary data.
//
// DO NOT use SPOOFING_AND_CONTROL_CHARS if the URL is going to be displayed
// in the UI for security reasons.
SPOOFING_AND_CONTROL_CHARS = 1 << 4,

// URL queries use "+" for space. This flag controls that replacement.
REPLACE_PLUS_WITH_SPACE = 1 << 5,

All of the above values are now exposed. You can use them from browser-laptop like so:
muon.url.formatForDisplay(navigationEntry.virtualURL, muon.url.unescapeRules.NONE)
muon.url.formatForDisplay(navigationEntry.virtualURL, muon.url.unescapeRules.SPACES)
// etc


Faster/shorter code for computation of discordances

This patch simplifies and makes faster the Cython code used by scipy.stats.kendalltau(). Moreover, some of the fixes from #5754 have been included.

The code now computes discordances only. It used to compute concordances, too, but this is redundant and causes an additional inner loop. The code is shorter and a few percents faster.

The documentation has been fixed. References to the Kendall 1938 and 1945 papers have been added, as well as a clear explanation that this code computes tau-b, but tau-b reduces to tau-a if there are no ties. This "tau-a vs. tau-b" thing is a constant problem even in the scientific literature. I hope that this clarifies that they are the same thing. People can also check the papers.

The result is min/max'd with 1/-1 so that it never happens that because of computational errors you get a value like -1.0000000001. In my experience this leads to all sorts of bizarre behaviour: for example, if you scale the result so that it is between 0 and 1 you can get a negative value anyway.

It is now documented that using 'omit' for NaNs will result in delegation to another implementation.

The p-values are still broken in the presence of ties (see #6314 and #5755). I'm planning to create another pull request that fixes that issue, too, but I'd prefer to keep the modifications above separate.

@pv / @ev-br / @josef-pkt does it look OK?

So... assuming I'd be willing to work on p-values, what is the suggested path? That I create another branch starting from better_kendalltau and then after (hopefully) better_kendalltau is merged I create a pull request from the other branch?

Well, I just noticed that fixing the p-values takes maybe ten lines, and moreover doing so I introduced further performance improvements. So probably I could just put everything together...

I'd suggest a separate PR, branched off this one. When the first one is merged, you rebase the second one.

OK. I created the new branch. Should I already create the PR, or should I wait for this one to be merged? Sorry to be so ignorant, but I don't want to make a mess.

Looking at a PR without tests makes me nervous :-). On a more serious note, I think it'd be worth to add a number-to-number comparison to some other established software package.
R or Mathematica or SAS or Java's LAW or something else, as long as it's established. To be useful, such a test needs to list in comments the code in that other language which produces the numbers for comparison. See, e.g., https://github.com/scipy/scipy/blob/master/scipy/stats/tests/test_morestats.py#L1272
The purpose of the test is then two-fold: to make sure the implementation is compatible with other implementations, and to make sure that results are consistent across scipy versions.

But the tests are already there, in test_stats. The test for Kendall's 𝛕 currently in Scipy are of course in general wrong, as all computed p-values are incorrect, but the values are correct and identical to this implementation. In the PR for p-values I'm fixing all p-values in the tests, too (as well as in the example of the documentation).

OK, let's merge this to keep the ball rolling. Thanks Sebastiano, and looking forward for the next one!

Nitpick: For future ones, it'd be great to keep the commit content/messages a bit more informative. Have you seen http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html, esp the recommendation on the commit mesages.
The basic idea is that a year from now a commit message "Implemented fixes" does not say much. (Who cares about individual commits a year from now? A poor soul doing git bisect.)


restart homu when configuring

I just had to do this manually after a salt servo-master1 state.apply homu to see changes in the Homu configs show up in the web interface, so it should probably be in the state.
r? @aneeshusa

This change is

Hmm, that's strange. I've never used state.apply - can you tell me why you didn't run a state.highstate? A quick glance at the docs doesn't reveal any information about why the service didn't pick up on the watch and restart.
In any case, reload: True isn't what we want here. reload: True changes the behavior of the service.running state to reload a service instead of restart it when it's triggered by another state that it's watching.
What was the config change/which states were changed? Do you still have the output from the state.apply command?

@aneeshusa If I'm guessing correctly, it's because if you do a highstate and there is a buildbot modification that needs to happen, that can only safely be done with the current configuration when there isn't a currently-executing job. Otherwise, buildbot gets restarted and all of the jobs have to be manually retried (homu will also be stuck waiting for results that will never come).
Homu, on the other hand, has its state separate and can be started and stopped at will while everything is up. The only real risk there is of missing a GH event, but the downtime is pretty minimal and that can always be fixed with a synchronize on the repo in question.
Maybe if there were a way to deploy buildbot changes and just do the "request a reload the next time buildbot is idle" thing, that would let us do a highstate?

@edunham I'm assuming you were applying the changes in #297 (Homu only)?
@larsbergstrom If you update the Buildbot config (and restart Buildbot), does Homu need to be restarted as well? If not, let's open another issue for handling Buildbot restarting - it sounds like that's separate from this one about Homu not restarting.
Also, just yesterday I read a post about fronting a webhook accepting service with a durable queue :) But I think that's overkill for us.

@aneeshusa Correct; I'd made changes to Homu only and didn't want to kick Buildbot as part of applying them.
I think a more robust solution long-term would be for a highstate to tell Buildbot to reload its configs after the current test run finishes. It might be possible to simply trigger a build which runs a MasterShellCommand to kill buildbot, then have buildbot configured as a service that systemd automatically restarts when it goes away.
For now, though, I'd like applying the Homu state to reload the Homu configs. If the Homu service gets restarted on highstate but not on when we apply the homu state independently, it's probably a bug in our state factoring.

Let's move the Buildbot discussion to #304.
I added watch statements in #148  explicitly to restart the Homu service if there have been Homu configuration changes in the same run, so our states should be OK. I'm more inclined to think something about using state.apply instead of state.highstate is causing this. I'll see if I can repro this in Vagrant.

Aah, it looks like state.apply fails because of missing requisites. The homu/init.sls file requires the pip: virtualenv state, which is in another file. state.apply homu only runs the homu/init.sls file, so it's able to complete the config change since those don't have external dependencies, but dies when it gets to restarting the service since it can't find the pip: virtualenv state. The wonky outputter that state.apply uses makes it a bit hard to read.
For now, the solution is to not use state.apply and instead always use state.highstate, so that all the appropriate requisites are found. Long-term, we could add a bunch of include statements to make state.apply work, but I feel this might add tighter cross-sls coupling than it's worth and am not sure about doing.

With #307 merged, I think this can be closed as I'm not aware of any other reasons we need to use state.apply at the moment. We can open a separate issue about doing the work to make state.apply work.

ok, I'll edit the wiki to stop saying state.apply works, and close this :)


Erro

Mesmo SpamWarnAdmins estando em falso, continua avisando administradores.
Mesmo AdWarnAdmins estando em falso, continua avisando administradores.
Mesmo Caps-Detection entando em falso, continua detectando Caps-Lock.

Even SpamWarnAdmins being false, it continues to warn administrators.
I can't recreate this in my small test, can you share your config - either here or as i private message on discord
Even if AdWarnAdmins is false, it continues to warn administrators.
Even Caps-Detection false, continues to detect Caps-Lock.

I am going to close this issue, if this is still a problem please respond to it.


Login when the request is blocked behind a corporate proxy / message when offline

When i have tried today to login with a token (on this example is xxx but with a valid token) and i have received an error message "Invalid token".
After changed from the corporate network to my phone network, the login is successfull.

Is it possible technically to detect a blocked request for some reason (and not password incorrect automatically ?)
I have tested without connection (in offline) and i have the same message invalid token, and a http-client javascript error :

Thank you for reporting that! I will fix this in #13. However, I was not able to test the scenario with the corporate firewall. If you would like, you are welcome to test this at your site and create a PR.

Tested the #13 and it seems fixed 👍


[ci] release

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
<EMAIL_ADDRESS>Patch Changes

#1378 0f4a31d Thanks @delucis! - Updates dependencies: @astrojs/mdx, @astrojs/sitemap, and astro-expressive-code

size-limit report 📦

Path
Size

/index.html
5.21 KB (0%)

/_astro/*.js
21.42 KB (0%)

/_astro/*.css
13.16 KB (0%)


Change webdefault.xml to use org.eclipse.jetty.jsp.JettyJspServlet

The webdefault.xml currently uses the standard JspServlet, but should be updated to use the JettyJspServlet. See this jetty bug:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=452261
The JettyJspServlet supports correct handling of  element, particularly in the presence of  elements in web.xml.
AppEngine usually precompiles *.jsp files (which means this issue does not come into play), however, it is possible to turn off pre-compilation in the appengine-web.xml so this change should be made.

As described in issue #34 , although I will change the webdefault.xml in docker/etc, this is NOT the webdefault.xml that will be used when running with the gcloud maven plugin because of the quickstart mechanism.

@ludoch I've assigned this issue to you to analyse what to do in the case of the multiple copies of webdefault.xml that can be in play when using the gcloud maven plugin.


Allow BUTTON elements to use "data-remote"

Hello there, wonderful adapter. Is it possible to add : ", button[data-remote]" to the "rails.js" file ?
// Select elements bound by jquery-ujs
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote], button[data-remote]',

Thanks

Unless you want to write a test case, this will have to wait until I get a chance to write one. My concern is that this will conflict in some way with the form button:not(button[type]) part of formInputClickSelector, firing off multiple overlapping handlers.
Is the intention to use this for buttons that are not part of forms?


Rewrite /federations/{{id}}/users/{{userID}} to Go

I'm submitting an ...
improvement request (usability, performance, tech debt, etc.)
Traffic Control components affected ...

Documentation (possibly)
Traffic Ops

Current behavior:
/federations/{{id}}/users/{{userID}} is handled by Perl
Expected / new behavior:
/federations/{{id}}/users/{{userID}} should be handled by Go.
Minimum API Version
1.1
Request Methods

[ ] DELETE

Minimal reproduction of the problem with instructions:
N/A

This is done via https://github.com/apache/trafficcontrol/pull/4014 can someone please close


Inject macro implementation into analyzer and CFE, test it.

The "macros" are just hardcoded for now.

Hi Jake,
Now that the SDK PRs are merged, this actually works!
There is a bit of a hack, the CFE wants the platform dill file at the right version, but it's pulled from the SDK ... I updated the SDK version to the latest dev version otherwise there is breakage due to the new concurrent package being missing. I expect this will break again, although not too often ... very happy to hear suggestions for a better way of running this :)
Thanks.


import all task fails on rails 6

Hello! I just created a small rails 6.0+ app and when I try to run the import:all task, it fails because it's not initializing the classes, apparently. Any ideas on how to solve it ?
$ bundle exec rails elasticsearch:import:all
[IMPORT] Loading models from: /home/ubuntu/rails/app/models
rails aborted!
NameError: uninitialized constant ApplicationRecord
/home/ubuntu/rails/app/models/project.rb:2:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/zeitwerk-2.4.1/lib/zeitwerk/kernel.rb:33:in `require'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/zeitwerk-2.4.1/lib/zeitwerk/kernel.rb:33:in `require'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:112:in `rescue in block (4 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:109:in `block (4 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:104:in `each'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:104:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/command.rb:48:in `invoke'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'

Caused by:
NameError: uninitialized constant Project
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/activesupport-<IP_ADDRESS>/lib/active_support/inflector/methods.rb:282:in `const_get'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/activesupport-<IP_ADDRESS>/lib/active_support/inflector/methods.rb:282:in `block in constantize'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/activesupport-<IP_ADDRESS>/lib/active_support/inflector/methods.rb:280:in `each'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/activesupport-<IP_ADDRESS>/lib/active_support/inflector/methods.rb:280:in `inject'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/activesupport-<IP_ADDRESS>/lib/active_support/inflector/methods.rb:280:in `constantize'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/activesupport-<IP_ADDRESS>/lib/active_support/core_ext/string/inflections.rb:68:in `constantize'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:110:in `block (4 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:104:in `each'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:104:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/command.rb:48:in `invoke'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => elasticsearch:import:all
(See full trace by running task with --trace)

The model structure is this:
app/models/project.rb
class Project < ApplicationRecord
  import ElasticConfig
end

app/models/concerns/elastic_config.rb
# frozen_string_literal: true

module ElasticConfig
  extend ActiveSupport::Concern

  included do
    # No elasticsearch integration in test environments.
    if not Rails.env.test?
      include Elasticsearch::Model
      include Elasticsearch::Model::Callbacks

      index_name "ark-#{Rails.env}-#{self.name.downcase}"
    end
  end
end

well, it's the import task that is failing:
$ bundle exec rails elasticsearch:import:model CLASS="Project"
rails aborted!
NameError: uninitialized constant Project
(eval):1:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:66:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:66:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/command.rb:48:in `invoke'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => elasticsearch:import:model
(See full trace by running task with --trace)

well, it's the import task that is failing:
$ bundle exec rails elasticsearch:import:model CLASS="Project"
rails aborted!
NameError: uninitialized constant Project
(eval):1:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:66:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/elasticsearch-rails-7.1.1/lib/elasticsearch/rails/tasks/import.rb:66:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/command.rb:48:in `invoke'
/home/ubuntu/.rvm/gems/ruby-2.7.2@ark/gems/railties-<IP_ADDRESS>/lib/rails/commands.rb:18:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => elasticsearch:import:model
(See full trace by running task with --trace)

Have you guys tried bundle exec environment rails elasticsearch:import:model? I think environment must be present for the rake task to load the models properly

@dbarrionuevo you mean RAILS_ENV=production bundle exec ... ? yeah, we tried that. Same result.

 Normally what :environment means is that you can specify the rails env when needed via ENV var, instead of relying on the existing one @dbarrionuevo. Check this https://stackoverflow.com/questions/7044714/whats-the-environment-task-in-rake


Using a non default config path

In config.py, it looks like it should be possible to specify a non default config file path by using cli arg --conf:
https://github.com/SatSale/SatSale/blob/f7ff56332f504fd7fe6195ebb671fccb8c71aa8f/config.py#L5-L9
But when running with gunicorn -w 1 -b <IP_ADDRESS>:8000 satsale:app --conf /path/to/config.toml, this argument is used by gunicorn which throws an error about an invalid config file.
Maybe I'm not using it correct? How is the --conf arg suppose to be used?

Hey!
Does adding two hyphens -- escape the gunicorn arguments? Like
gunicorn -w 1 -b <IP_ADDRESS>:8000 satsale:app -- --conf config2.toml

Let me know if that works, I think that is what ive been doing in rust. I might have to update some docs somewhere?

It's working, thanks! I don't think it's documented anywhere, I just found that piece of code in config.py. Might be nice to include in the run section: https://github.com/SatSale/SatSale#run-satsale


Wrong currency for Portuguese

It's not taking €, it takes the Brazilian currency:

You can see on the left that I send pt

Sorry for the late reply.
I'm a little confused when you say we have the wrong currency as Portuguese isn't in the list of common currencies.
Do you mean that you would like the currency added to the list of common currencies?
If so the raise a PR and I will be happy to accept it.

Portuguese is a language, Portugal is a country. The currency depends on the country, lang just determines the language.
Apart from this, it is not clear to me what's wrong from your screenshot. Please describe a sequence of steps, stating what you see and what you were expecting to see instead.

Portuguese is a language, Portugal is a country

Is it? No way!
Anyway... investigating this a bit further, there is nothing wrong related to this package, the problem comes more from Flutter itself. But TBH I don't really know if I should call it error.
For example if I do:
String lang = Provider.of<MyRents>(context).language;
I'd get Portuguese language as "pt". My understanding is that the main country should be Portugal, not Brazil, so this translates to Brazilian currency at the end.
I guess more than talking about an "error" here we should discuss what makes a country the main one for that language but that's a different topic.
I fixed it by having a currency selector in my app.


Most evolution-chains are missing

on higher numbers (id 374 +), most evolution-chains say {"detail":"not found"}. Have these not been implemented yet? Example: http://pokeapi.co/api/v2/evolution-chain/567 If so, how soon will they be added? Also, some id's are not working, http://pokeapi.co/api/v2/pokemon/129/.

Ah, you must be expecting evolution-chain/567 to be archeops.  What I think is going on is the id references the chain's primary key in the table and has nothing to do with the pokemon's id.  That's why evolution-chain/1 give bulbasaur and evolution-chain/2 give charmander.
But I think you're on to something.  This should be a change request to have the evolution-chains request be based on pokemon id.
And pokemon/129 does exist, it's just ridiculously huge.  It's magikarp.  Can you imagine how many records exist for its encounter location?  Doesn't every version have an old-rod lol
Now that's one I'd like to optimize.  Good catch!  Keep'em coming.

@retep-mathwizard @mjhayes412 Hey, thanks for looking into this. Some Pokémon (Zubat is the best example of this) have so many encounter locations it fails to load. We're hoping to optimise this soon.
And you're right @mjhayes412 - Primary Keys are not Pokémon National Pokédex numbers.

I just realized that about each one being grouped by 3's or 2's! Thanks. Is
there a way to find the link to the evolution-chain from the pokemon? I
couldn't find the link directly, at http://pokeapi.co/api/v2/pokemon/1/,is
there a way to get to it?
On Mon, Apr 11, 2016 at 4:22 AM, Paul Hallett<EMAIL_ADDRESS>wrote:

@retep-mathwizard https://github.com/retep-mathwizard @mjhayes412
https://github.com/mjhayes412 Hey, thanks for looking into this. Some
Pokémon (Zubat is the best example of this) have so many encounter
locations it fails to load. We're hoping to optimise this soon.
And you're right @mjhayes412 https://github.com/mjhayes412 - Primary
Keys are not Pokémon National Pokédex numbers.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/phalt/pokeapi/issues/159#issuecomment-208223316

@retep-mathiwizard    Check out the pokemon-species resource. These have evolution chain references. You should really point to Pokemon resources from Pokemon-species resources.


Added overhead of using wstringstream when wstring would work

Throughout the codebase, wstringstream is often used for building a result string.  This is useful if you're trying to do special formatting/localization, but most of the use cases are simply building strings by appending characters or other strings so no special formatting/localization is happening.  Unlike Platform::String, wstring is mutable and will grow its internal array as needed.  This would be optimal in many cases over using wstringstream.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.


chore: test against go-ipfs 0.4.13

A ton of tests is failing when testing js-ipfs-api against<EMAIL_ADDRESS>@keks do you happen the know why? Could this be related to cmds changes?

We only merged the cmds stuff right after 0.4.13, so that can't really be the reason.

@keks any other HTTP-API changes that came in 0.4.12 or 0.4.13?

Not sure - 0.4.13 was a hotfix release right after 0.4.12, I think there were very few changes. Do the tests pass for 0.4.12?

@diasdavid installed 0.4.13 and used my net-http-api client against it.  All tests passed.

@richardschneider do you make any use of the HTTP Headers in your library? Especially the x-stream and x-chunked?

@diasdavid I don't use any special headers, except asking for GZIP response.


Fix: Importing in admin within a transaction gives TransactionManagem…

Fix: Importing in admin within a transaction gives TransactionManagementError.
If we are using MySQL as database, the django.contrib.admin app, and
some other configurations that run the admin views inside an atomic
block (a transaction), when importing data we now test if we are inside
an atomic block to know if the DB supports transactions, in addition to
previous check to see if the DB features supports transactions.
This is to solve issue #609.

Coverage decreased (-0.2%) to 91.683% when pulling ca5dab0e732e46cdbe1b7c75818b91e06fa2ef2f on camilotorresf:master into 7645954f241aa7f042e9ed7871482f352927097c on django-import-export:master.

Coverage decreased (-0.2%) to 91.683% when pulling ca5dab0e732e46cdbe1b7c75818b91e06fa2ef2f on camilotorresf:master into 7645954f241aa7f042e9ed7871482f352927097c on django-import-export:master.

Coverage decreased (-0.2%) to 91.683% when pulling ca5dab0e732e46cdbe1b7c75818b91e06fa2ef2f on camilotorresf:master into 7645954f241aa7f042e9ed7871482f352927097c on django-import-export:master.

Coverage decreased (-0.2%) to 91.683% when pulling ca5dab0e732e46cdbe1b7c75818b91e06fa2ef2f on camilotorresf:master into 7645954f241aa7f042e9ed7871482f352927097c on django-import-export:master.

We have the same issue and this code fixes it.

According to https://github.com/django-import-export/django-import-export/issues/1100 that issue still exists. We are using our own Fork with this PR. Could you please reopen that PR and merge it? THanks

@bmihelac, @andrewgy8 Couldn't you remove that stale bot? It's a pain.

I think so too. import-export is a great library but has several issues to solve. I saw the stale bot closes several important issues/PRs before addressed.


Small modification of comment in the run_glue.py example

Add RoBERTa to the comment as it was not explicit that RoBERTa don't use token_type_ids.

Indeed, missed that one, thank you.


Remove VPC peering note

Closes #1809.

[x] Tests pass (no build errors)
[x] Rebased/mergeable

do not merge.


fix: add babel-plugin-add-module-exports for default export

upgrading to Babel 6 silently broke everyone using redux-devtools-dock-monitor with CommonJS require and module.exports due to Kill CommonJS default export behaviour - babel/babel#2212. this fixes that unintended breaking change.
repeat of https://github.com/gaearon/redux-thunk/pull/41

I think here I would rather keep ES6 semantics. It's a breaking change, but these packages just hit 1.0 after a beta so it's fine.

@gaearon ah interesting, what's your rationale?

or are you saying that you prefer ES6 module semantics in general, but in redux-thunk it made sense to use add-module-exports because otherwise it is a breaking change? curious about your thoughts on this, as someone who is decidedly against ES6 module syntax and thus is impacted by these changes. thanks for your time if you get the chance. :)

I think we should start to use less interop hacks. A few years ago CommonJS was the standard but now most of us use Babel, and it makes sense to align with ES6 module semantics.

You can be against the module syntax but it's already in the language :-). I'd say Redux Thunk is a lower level module and is more likely to be used in a pure CommonJS environment. And yeah, it's also a breaking change I didn't want to make.

cool beans, i appreciate you sharing.
for now i'm more happy with functions (require) and variable assignments (module.exports) that have always been in the language. one reason is i find it easier to learn and teach programming when there are fewer concepts and syntax rules to grok, especially when there are subtle and confusing differences between similar looking syntaxes (for example, why can't i do const { module as myModule } = require('module')...?). another reason is ES6 modules break many awesome browserify transforms, when again i'm not sure what we gain from moving away from ES5 modules. if ES6 modules were coming from folx who wrote the majority of ES5 modules on npm, maybe i'd feel differently, but i'm very wary of standards handed down by committees.
but i'd rather not start an argument with you over silly opinions, thanks for all your great work @gaearon. :cat:

The point of ES6 modules is to be statically analysable for tree shaking (dead code elimination). This is a guarantee assignments and function calls don't give you.

And ES6 is as far from being "pushed down" as the language gets. :-) This is clear if you follow what's happening on esdisduss and TC39 notes. People made a lot of effort learning from existing solutions, and they had carefully chosen constraints in mind. Please don't be so quick to dismiss their work.


Style properties not processed

I have this component. I can see the styles applied in the debugger but they are not applied on screen. When I change the value from red to blue in React devtools, it works. For some reason, styles don't seem to be processed, on first pass the modal content background remains transparent, despite the contentContainer.
import React, { useState } from 'react';
import { StyleSheet, Dimensions } from 'react-native';
import Modal from 'modal-enhanced-react-native-web';
import useEventListener from 'common-lib/src/hooks/useEventListener';

// presentationStyle is not yet supported :-(

const MyModal = ({ visible, style, children, ...rest }) => {
	const [width, setWidth] = useState(Dimensions.get('window').width);
	useEventListener(
		'change',
		({ window }) => {
			setWidth(window.width);
		},
		Dimensions
	);

	return (
		<Modal
			isVisible={visible}
			style={[
				width > 375 && styles.maxWidth,
				styles.contentContainer,
				style,
			]}
			{...rest}
		>
			{children}
		</Modal>
	);
};

const styles = StyleSheet.create({
	contentContainer: {
		backgroundColor: 'red',
	},
	maxWidth: {
		width: 375,
	},
});

export default MyModal;

Could this be because the library is supplied in compiled es5 format?

I will see whether I can solve the issue, got really tight schedule. Will update it if I have chance

modal is now supported in react native web.
https://github.com/necolas/react-native-web/releases/tag/0.14.0
Thank you for using this library!