[Kosmos-2] Fine-tune your checkpoint model on my downstream task

Hello everyone, thank you very much for your contribution. I appreciate the effort and consistency in uploading the code for such many models and maintaining this repository.
I saw Kosmos-2 and I quickly thought I could fine-tune it on my downstream task. But I couldn't find any example of how to do it. I see there is here a little "guide" for Training the model, but I don't know if you're referring to the Pre-training or further fine-tuning, I'm interested in the second one.
So I tried to implement it myself using the transformers library, but I'm getting errors about the data.

Here is my environment:
accelerate==0.25.0
ai2thor==5.0.0
aiofiles==23.2.1
aiohttp==3.9.1
aiosignal==1.3.1
altair==5.2.0
annotated-types==0.6.0
antlr4-python3-runtime==4.8
anyio==4.2.0
apex @ file:///home/user/unilm/kosmos-2/apex
async-timeout==4.0.3
attrs==23.2.0
aws-requests-auth==0.4.3
bitarray==2.9.2
blinker==1.7.0
blis==0.7.11
botocore==1.34.12
canonicaljson==2.0.0
catalogue==2.0.10
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
confection==0.1.4
contourpy==1.2.0
cryptography==41.0.7
cycler==0.12.1
cymem==2.0.8
Cython==3.0.7
datasets==2.16.1
decorator==4.4.2
deepspeed @ git+https://github.com/microsoft/DeepSpeed.git@165739a508431c9d05a456ca68535edf599cc51f
Deprecated==1.2.14
dill==0.3.7
exceptiongroup==1.2.0
fairscale==0.4.0
fairseq @ file:///home/user/unilm/kosmos-2/fairseq
fastapi==0.108.0
ffmpy==0.3.1
filelock==3.13.1
Flask==3.0.0
fonttools==4.47.0
frozenlist==1.4.1
fsspec==2023.10.0
ftfy==6.1.3
gradio==3.37.0
gradio_client==0.8.0
h11==0.14.0
httpcore==0.17.3
httpx==0.25.1
huggingface-hub==0.20.2
hydra-core==1.0.7
idna==3.6
imageio==2.33.1
imageio-ffmpeg==0.4.9
infinibatch @ file:///home/user/unilm/kosmos-2/infinibatch
itsdangerous==2.1.2
Jinja2==3.1.2
jmespath==1.0.1
jsonschema==4.20.0
jsonschema-specifications==2023.12.1
kiwisolver==1.4.5
langcodes==3.3.0
linkify-it-py==2.0.2
lxml==5.1.0
markdown-it-py==2.2.0
MarkupSafe==2.1.3
matplotlib==3.8.2
mdit-py-plugins==0.3.3
mdurl==0.1.2
moviepy==1.0.3
msgpack==1.0.7
multidict==6.0.4
multiprocess==0.70.15
murmurhash==1.0.10
natsort==8.4.0
networkx==3.2.1
ninja==<IP_ADDRESS>
numpy==1.23.0
nvidia-cublas-cu11==<IP_ADDRESS>
nvidia-cuda-nvrtc-cu11==11.7.99
nvidia-cuda-runtime-cu11==11.7.99
nvidia-cudnn-cu11==<IP_ADDRESS>
omegaconf==2.0.6
open-clip-torch @ file:///home/user/unilm/kosmos-2/open_clip
opencv-python==<IP_ADDRESS>
opencv-python-headless==<IP_ADDRESS>
orjson==3.9.10
packaging==23.2
pandas==2.1.4
pathy==0.10.3
pillow==10.2.0
portalocker==2.8.2
preshed==3.0.9
prior==1.0.3
proglog==0.1.10
progressbar2==4.3.2
protobuf==3.20.3
psutil==5.9.7
pyarrow==14.0.2
pyarrow-hotfix==0.6
pycparser==2.21
pydantic==1.10.11
pydantic_core==2.14.6
pydub==0.25.1
PyGithub==2.1.1
PyJWT==2.8.0
PyNaCl==1.5.0
pyparsing==3.1.1
python-dateutil==2.8.2
python-dotenv==1.0.0
python-fcl==<IP_ADDRESS>
python-multipart==0.0.6
python-sat==0.1.8.dev12
python-utils==3.8.1
python-xlib==0.33
pytz==2023.3.post1
PyYAML==6.0.1
referencing==0.32.1
regex==2023.12.25
requests==2.31.0
rpds-py==0.16.2
sacrebleu==2.4.0
safetensors==0.4.1
scipy==1.8.0
semantic-version==2.10.0
sentencepiece==0.1.99
shapely==2.0.2
six==1.16.0
smart-open==6.4.0
sniffio==1.3.0
spacy==3.6.0
spacy-legacy==3.0.12
spacy-loggers==1.0.5
srsly==2.4.8
starlette==0.32.0.post1
tabulate==0.9.0
tensorboardX==1.8
thinc==8.1.10
tiktoken==0.5.2
timm==0.4.12
tokenizers==0.15.0
toolz==0.12.0
torch==1.13.0
torchscale @ file:///home/user/unilm/kosmos-2/torchscale
torchvision==0.14.0
tqdm==4.66.1
transformers==4.36.2
trimesh==4.0.8
triton==2.1.0
typer==0.9.0
typing_extensions==4.9.0
tzdata==2023.4
uc-micro-py==1.0.2
urllib3==2.0.7
uvicorn==0.25.0
wasabi==1.1.2
wcwidth==0.2.13
websockets==11.0.3
Werkzeug==3.0.1
wrapt==1.16.0
xxhash==3.4.1
yarl==1.9.4

I paste here my code:
model = AutoModelForVision2Seq.from_pretrained("microsoft/kosmos-2-patch14-224", device_map="auto")
processor = AutoProcessor.from_pretrained("microsoft/kosmos-2-patch14-224", device_map="auto")

# load dummy dataset from json file
train_data = load_dataset("json", data_files=tmp_train_file_name)
val_data = load_dataset("json", data_files=tmp_val_file_name)

# process the inputs, i.e. images and texts
def kosmos2_collate_fn(examples):
    images, texts = [], []
    for example in examples:
        image = Image.open(example['image_path'])
        images.append(image)
        texts.append(example['input_text'])

    inputs = processor(text=texts, images=images, return_tensors="pt").to(model.device)
    return Dataset.from_dict(inputs)

new_train_data = kosmos2_collate_fn(train_data)
new_val_data = kosmos2_collate_fn(val_data)

training_arguments = TrainingArguments(
    remove_unused_columns=False,
    per_device_train_batch_size=MICRO_BATCH_SIZE,
    gradient_accumulation_steps=GRADIENT_ACCUMULATION_STEPS,
    warmup_ratio=0,
    num_train_epochs=EPOCHS,
    learning_rate=LEARNING_RATE,
    logging_strategy="steps",
    logging_steps=1,
    optim="adamw_torch",
    evaluation_strategy="epoch",
    save_strategy="epoch",
    output_dir=OUTPUT_DIR,
    save_total_limit=1,
    load_best_model_at_end=True,
    label_names=["labels"]
)

trainer = Trainer(
    model=model,
    train_dataset=new_train_data,
    eval_dataset=new_val_data,
    args=training_arguments,
)

trainer.train()

and the resulting errors:
Generating train split: 40 examples [00:00, 8627.15 examples/s]
Generating train split: 6 examples [00:00, 2428.20 examples/s]
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
  0%|          | 0/10 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/home/user/kosmos2/train.py", line 193, in <module>
    trainer.train()
  File "/home/user/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1537, in train
    return inner_training_loop(
  File "/home/user/.local/lib/python3.10/site-packages/transformers/trainer.py", line 1854, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "/home/user/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2735, in training_step
    loss = self.compute_loss(model, inputs)
  File "/home/user/.local/lib/python3.10/site-packages/transformers/trainer.py", line 2776, in compute_loss
    raise ValueError(
ValueError: The model did not return a loss from the inputs, only the following keys: logits,past_key_values,image_embeds,projection_attentions,vision_model_output. For reference, the inputs it received are pixel_values,input_ids,attention_mask,image_embeds_position_mask.
  0%|          | 0/10 [00:03<?, ?it/s]

I can't figure out the issue. It says that the model did not return a loss, which means it didn't compute it.
Can anyone help me? I tried to look for solutions online, but I found nothing useful. @ydshieh @donglixp @pengzhiliang @pineking
Thank you in advance.

No news, still waiting for someone to answer. It looks like the processor did not return any labels and the Trainer could not compute the loss...

Hi! The model can compute and return the loss if labels is sent to the model, but in your own training script, you need to prepare the labels. It's not the Kosmos2Processor to create labels field, but you can use it to prepare input_ids and pass it as labels (in your own training script). You will have to change some places to -100 (ignore_index ins torch's CrossEntropyLoss): the padded places + the first tokens that are used as prompts).
I hope this gives you some direction.

Thank you for the tip. I think I already figured that out and I'm trying to prepare the labels before Training, but I didn't think about masking the input prompt. I will update you in case that works!
Do you have any other information about the input? In this repository I cannot find anything useful.
How should I format the sentences in input before passing them to the Processor? My concern is: should I add the <grounding>, <object>, <patch_> and other tags before processing the sentence? Both the prompt and the labels..

Hi again.
Kosmos2Processor will behavior differently depending on the inputs you pass to it.

should I add the , , <patch_> and other tags

If you don't pass bboxes to Kosmos2Processor, yes, you need to pass <object>, <patch_>, delimiter_of_multi_objects. Otherwise Kosmos2Processor can create them by looking at bboxes argument.
You can choose either way to go. But in both case, you need to have bboxes available: the difference is on if you pass it as argument or adding them directly into the text (and don't pass it to the processor). If you decide to add them into text manually, see an example:
https://github.com/huggingface/transformers/blob/b2748a6efd045dd771f8fd48e8b309cbc061c618/src/transformers/models/kosmos2/modeling_kosmos2.py#L1795-L1801
tags like <grounding>,  are </phrase> should be always specified by the users.
images argument is used to prepare the image inputs (as tensor) but also adding the leading tokens (ids) (to input_ids) that are used as placeholders to say those are reserved for images. It's best to pass this argument and let Kosmos2Processor do this part for you.
IMPORTANT: pay attention to add_eos_token: it defaults to False (this is necessary for inference), but for training, you need to set it to True (so you get the eos token id in the input)

Thank you @ydshieh for your invaluable help!
As an example, what I want to do is Image Grounded Command Interpretation, i.e. I have an image and a command from a human to a robot. The Robot needs to interpret the command and ground any relevant objects in the image, by producing the bounding box and the reference through the image patch.
The input would be '<grounding> Go to <phrase>the red car</phrase>' coupled with an image where there's a red car. The output should be the interpretation with the patches that refer to the bounding boxes of the car, something like this 'Motion(Goal(<object><patch_indexes_here></object>))'.
Now, given your directions, I should format:

the prompt as '<grounding> Go to <phrase>the red car</phrase>'
the labels as 'Motion(Goal(<object><patch_indexes_here></object>))'

I have stored the bounding boxes of the car in the image, but the patches should refer to both the prompt (as I am specifying the <phrase>) and the labels (for the <patches>)! Is there any way to make this with the Processor of Kosmos?

The Kosmos2Processor processing logic requires the <object><patch_indexes_here></object> stuff immediately after <phrase> xxx </phrase>, so if you want to have extra stuff like Motion(Goal(, you will have to make some modification (I know, it's not an easy stuff).
In terms of prompt and labels , you don't really need to separate them. Just use the whole text (well, make a copy of the the input_ids fields), and change the places where corresponding to non-labels to -100.

Hi @ydshieh
I figured out how to change the Kosmos Processor in order to add those extra tokens and I started fine-tuning the model on my downstream task. But there are some problems with the bounding boxes that the model generates, they are totally off!
So I was wondering: is the Visual Model fine-tuned as well during this procedure? Or just the Language Model? It seems that the text the model generates is consistent with what I expect, i.e. the ground truth, but the Visual Encoder seems not aligned.
Do you have any considerations? Answers? Tips?
Thank you again.

Hi @basteran
The whole model is finetuned unless you do something particular to freeze the vision encoder part of it.
(although, I would say, in your case, it might make more sense to freeze the vision encoder part)
You can use a small subset of (your) dataset, say 100 or 1000 examples, finetune the model (on the data prepared by your modified Kosmos2 processor), try to fit as much as possible, and see if the model can give the expected results during inference on the trained examples. If the model can't even give the desired results, then there is something wrong.
This question is best to be discussed on the HF forum. From my side, I don't have clear answer other than the above suggestion.

The whole model is finetuned unless you do something particular to freeze the vision encoder part of it. (although, I would say, in your case, it might make more sense to freeze the vision encoder part)

That's what I thought, but it doesn't make sense: the bounding boxes are totally off or on blank spaces..

You can use a small subset of (your) dataset, say 100 or 1000 examples, finetune the model (on the data prepared by your modified Kosmos2 processor), try to fit as much as possible, and see if the model can give the expected results during inference on the trained examples. If the model can't even give the desired results, then there is something wrong.

Thanks for the suggestion, I already tried that and the model didn't give the desired results. This made me think that maybe the Visual Encoder wasn't doing any fine-tuning

This question is best to be discussed on the HF forum. From my side, I don't have clear answer other than the above suggestion.

Well, thank you for your support until now. Do you have any plans on releasing a working example for fine-tuning the Kosmos-2 model on downstream tasks?

the Visual Encoder wasn't doing any fine-tuning

If you would like: you can actually compare the original checkpoint weights v.s the finetuned checkpoint. This way, you will know for sure.

Do you have any plans on releasing a working example for fine-tuning the Kosmos-2 model on downstream tasks?

Not in the plan. Being said that, if you can provide a google colab show your training (of course, with a very small dataset you prepared, even 10 examples is enough), I would be happy to take a look.

@ydshieh I added you to a private repository containing my notebook and a sample of data to run the code. Let me know what you think and how we can communicate!

Kosmos2Processor

Hi basteran, I am also working on fine-tune KOSMOS-2, and meeting issues as you.
I think one of the reason is KOSMOS-2 is a causal model, so you don't need to specify the 'labels' for the model, the trainer will make the mask automatically.
And me, I am also looking forward a tutorial for fine-tune KOSMOS-2, @ydshieh if there will be convenience.
Thanks a lot!

Kosmos2Processor

Hi basteran, I am also working on fine-tune KOSMOS-2, and meeting issues as you. I think one of the reason is KOSMOS-2 is a causal model, so you don't need to specify the 'labels' for the model, the trainer will make the mask automatically. And me, I am also looking forward a tutorial for fine-tune KOSMOS-2, @ydshieh if there will be convenience. Thanks a lot!

Hi, that's true but the causal masking is used during the unsupervised (pre) training of the model. If you want to perform classical supervised fine-tuning (i.e. input-output pairs) you need to specify the labels and set the masking, otherwise, the model will generate part of the input as well.

Hi @basteran, can you share your fine-tuned script if you can? I am getting same error as you

ValueError: The model did not return a loss from the inputs, only the following keys: logits,past_key_values,image_embeds,projection_attentions,vision_model_output. For reference, the inputs it received are pixel_values,input_ids,attention_mask,image_embeds_position_mask.

I am trying to fine-tune model using Kosmos2ForConditionalGeneration.
If you are having issue with bbox offset then refer https://discuss.huggingface.co/t/issue-with-kosmos-2-encoding-and-decoding/70019/2

Hi @mit1280, @ydshieh, I am sharing here with you a Notebook for the training. I tried to explain my task and what I changed in the original code:
Notebook
Unfortunately, I cannot add any example of the data and thus the code will not run correctly. Let me know your thoughts @ydshieh
Thank you again.

@mit1280 mention me on the hugging face discussion or send me a link, please.

@basteran there is none right now. I will create one and tag you there.

@basteran here you go https://discuss.huggingface.co/t/kosmos-fine-tuning/75691

See my response on https://discuss.huggingface.co/t/kosmos-fine-tuning/75691 (essentially, I need a code snippet or notebook that could run easily to see the issue)

See my response on https://discuss.huggingface.co/t/kosmos-fine-tuning/75691 (essentially, I need a code snippet or notebook that could run easily to see the issue)

I can add you to a private repository with the Notebook and the data (I don't know how to share it with you otherwise)

The whole model is finetuned unless you do something particular to freeze the vision encoder part of it. (although, I would say, in your case, it might make more sense to freeze the vision encoder part)

That's what I thought, but it doesn't make sense: the bounding boxes are totally off or on blank spaces..

You can use a small subset of (your) dataset, say 100 or 1000 examples, finetune the model (on the data prepared by your modified Kosmos2 processor), try to fit as much as possible, and see if the model can give the expected results during inference on the trained examples. If the model can't even give the desired results, then there is something wrong.

Thanks for the suggestion, I already tried that and the model didn't give the desired results. This made me think that maybe the Visual Encoder wasn't doing any fine-tuning

This question is best to be discussed on the HF forum. From my side, I don't have clear answer other than the above suggestion.

Well, thank you for your support until now. Do you have any plans on releasing a working example for fine-tuning the Kosmos-2 model on downstream tasks?

Hi @basteran, @ydshieh, I am also finding the way to finetune KOSMOS-2. I've been following your guidance from the open issue and Hugging Face discussions, but I'm consistently encountering inaccurate bounding boxes, even on data similar to the KOSMOS-2 training set.
I was wondering if there have been any recent updates on this issue, or if you might have any additional advice. Thank you!


SharePoint marketing site collection not able to set as home site

I believe below script is intended to set site collection as home site in the SharePoint online. If I am wrong please correct.
I am trying to do using SharePoint DSC PowerShell , however it is failing due to credentials issue although provided correctly. please help.
Account I am giving is part of global admin
I can do it by trinational method, but at this point I am trying to test with `DSC.```
Below is the code:
using DSC setting SharePoint site collection home site as home site
Configuration Example
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $credsGlobalAdmin
    )
    Import-DscResource -ModuleName Microsoft365DSC

    node localhost
    {
        SPOHomeSite "SetMarketingSiteCollectionAsHomeSite"
        {
            IsSingleInstance     = "Yes"
            Url                  = "https://domain.sharepoint.com/sites/Marketing"
            Ensure               = "Present"
            Credential           = $credsGlobalAdmin
        }
    }
}

Compiling
Example

Hi @soundd2,
You are using Microsoft365DSC, this repository is for SharePointDsc which is a different module.
Please create issues for Microsoft365DSC at: https://github.com/microsoft/Microsoft365DSC and provide any error messages you are getting.
You can find the documentation for this SPOHomeSite resource here: https://microsoft365dsc.com/resources/sharepoint/SPOHomeSite/

HI Yorick Kuijs,
I believe below script is intended to set site collection as home site in
the SharePoint online. If I am wrong please correct.
I am trying to do using SharePoint DSC PowerShell , however it is failing
due to credentials issue although provided correctly. please help.
Account I am giving is part of global admin
I can do it by trinational method, but at this point I am trying to test
with DSC.
[image: image.png]
Regards
Shyam.CH
On Mon, Feb 21, 2022 at 5:30 PM Yorick Kuijs @.***>
wrote:

Hi @soundd2 https://github.com/soundd2,
You are using Microsoft365DSC, this repository is for SharePointDsc which
is a different module.
Please create issues for Microsoft365DSC at:
https://github.com/microsoft/Microsoft365DSC and provide any error
messages you are getting.
You can find the documentation for this SPOHomeSite resource here:
https://microsoft365dsc.com/resources/sharepoint/SPOHomeSite/
—
Reply to this email directly, view it on GitHub
https://github.com/dsccommunity/SharePointDsc/issues/1386#issuecomment-1046801799,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWTOEL3TTP5LK3PMEKKTR3DU4ISPHANCNFSM5O5SVKZQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

SharePointDsc (this repository) is targeting on-premise SharePoint: 2013, 2016, 2019 or Subscription Edition.
However you are trying to configure SharePoint Online, which is part of Microsoft 365 and which can be configured using Microsoft365DSC. This is also mentioned in your configuration:

Import-DscResource -ModuleName Microsoft365DSC

Closing this here since the issue is being handled in Microsoft365DSC


removeUser() implementation

Purpose of this PR
This PR provides an implementation of removeUser().

Codecov Report

Merging #44 into master will increase coverage by 0.42%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
+ Coverage   89.91%   90.34%   +0.42%
==========================================
  Files           8        8
  Lines         347      352       +5
  Branches       25       25
==========================================
+ Hits          312      318       +6
+ Misses         33       32       -1
  Partials        2        2

Impacted Files
Coverage Δ

src/classes/acl.ts
91.81% <100%> (+0.84%)
:arrow_up:

Continue to review full report at Codecov.

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


test bug

What package(s) are you using?

[ ] lyne-components
[ ] non package issue

Detailed description

Describe in detail the issue you're having.

Is this issue related to a specific component?

What did you expect to happen? What happened instead? What would you like to
see changed?

What browser are you working in?

What version of the Lyne Design System are you using?

What offering/product do you work on? Any pressing ship or release dates we
should be aware of?

Steps to reproduce the issue

Step one
Step two
Step three
etc.

Please create a reduced test case in CodeSandbox

https://codesandbox.io/

Additional information

Screenshots or code
Notes

:tada: This issue has been resolved in version 5.7.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[Bug] Enabling Email logging fills the database endlessly.

Describe the bug
Enabling Email logging fills the database endlessly. The mysql table activty_client_email got filled up, sadly I had to delete it else I couldnt access the whole database anymore.
36G     activity_client_email.MYD
23M     activity_client_email.MYI
58G     activity_client_email.TMD
The installation is a migration of BoxBilling and the bug happened overnight after the upgrade.
To Reproduce
Steps to reproduce the behavior:
Enable Email logging
Expected behavior
It is expected not to fill up the database and making the complete installation unusuable.

When you migrated this installation, did you update the email templates to be compatible?

@d3dx9, this should be fixed with #429. Can you confirm the fix?

Got confirmation from the reporter that this issue appears to be solved


add option helpers for meson

something like
[opt].MESON_ARGS_ON
[opt].MESON_ARGS_OFF

note that MESON_ARGS are added to CONFIGURE_ARGS so technically there's a workaround


Fix CircleCI config for modules

Add libs tests to CircleCI config.
Flyby: use hpx_option for all options in modules.

I assume hpx_libs_link_mode is not used anywhere anymore, LGTM.

Yep. It used to let one create dynamically linked modules, but since we're sticking to STATIC I'm removing it. We can always reintroduce it if needed. Sorry about the sneaky force-pushes, by the way.


python310Packages.pysnmplib: 5.0.18 -> 5.0.19

Description of changes
https://github.com/pysnmp/pysnmp/releases/tag/v5.0.19

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] 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/)
22.11 Release Notes (or backporting 22.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
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 195385 run on x86_64-linux 1

6 packages built:

home-assistant-component-tests.brother
home-assistant-component-tests.snmp
python310Packages.brother
python310Packages.pysnmplib
python39Packages.brother
python39Packages.pysnmplib


Move GetTextureDataAsync from inspector to core

This is a refactor that will eventually enable a serializer like GLTFExporter to use the now core-based GetTextureDataAsync in order to serialize textures that are not directly retrievable as RGBA e.g., GPU-compressed formats.
For more discussion on that point, see #12257. The part that is missing to ultimately solve this is some sort of function or BaseTexture-property that can tell whether the texture uses a GPU compressed format. Once that exists, then it should be easy to do something like this... from glTFMaterialExporter.ts:

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/14312/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14312/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/14312/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/14312/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/14312/merge
https://gui.babylonjs.com/?snapshot=refs/pull/14312/merge
https://nme.babylonjs.com/?snapshot=refs/pull/14312/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/14312/merge#BCU1XR#0

This code copies an existing texture (compressed or not) to a non-compressed RGBA texture, which is not what we want in the exporter (the exporter is already able to export compressed textures, but it exports the result of the expansion to RGBA 8 bits to a .png file, not the original compressed data).
To be able to export compressed textures in their compressed form, we would need to be able to retrieve the compressed data, which is not possible because readPixels does not work in this case:
https://playground.babylonjs.com/#E6WY1N
You will get this error in the console log:
[.WebGL-00002DB408078E00] GL_INVALID_FRAMEBUFFER_OPERATION: Framebuffer is incomplete: Attachment is not renderable.

And the buffer will be all zero.
Even if that worked, you would only get the transcoded data that was suitable for the target GPU when the texture has been created, whereas you would need the non-transcoded data for the export.
Regarding the function itself, I'm not sure we should move it into the misc tools, as it seems quite specific to the inspector...
cc @sebavan for his opinion.

which is not what we want in the exporter

If the decision is whether or not the texture is exported, this seems to be a viable solution

Yeah, just to clarify, as you found the glTF exporter does not handle GPU compressed textures now. There is a related issue here: #12257
So the idea with this helper function would be to render out a copy of the compressed texture as RGBA. (I have tried a local version of this and it does indeed work. The 'compressed' texture gets serialized as a png)

@bghgary and @Popov72 can I let you do a last review ?

I think this is ready to merge.

Excuse me, I have a question.
To avoid compressing texture exports and causing them to turn black, why not add GetTextureDataAsync to _getPixelsFromTexture, as shown in the above picture

As this ends up transforming the data quite a lot and this particular function is meant to only return what is in the storage. The usage site should rely on the TextureTools instead if it fits the use case.


Set up Netbird as a client on a Linux system (e.g., Raspberry Pi) with a proxy

Good evening everyone,
Thank you for this fantastic tool – it regularly helps me a lot. However, I now have a new challenge.
I’ve successfully set up several Raspberry Pis with the Netbird client without any issues. Now, one of the Raspberry Pis is behind an HTTP proxy without authentication and is unable to establish a connection. What’s the best way to resolve this?
I’ve already configured the proxy for APT, CURL, WGET, etc., and those services work without any problems. However, Netbird fails to connect. At the previous location, using the same hardware, everything worked fine, so the issue appears to be related to the proxy.
I’d appreciate your support and wish you a pleasant evening.

Hi @LKleemann,
does the proxy support http/2?
how is authentication realized?

Good day @lixmal ,
Thank you for your quick response. Unfortunately, I cannot answer that question for you.
The proxy was set up by the IT department. How can I best check this?
Authentication on the proxy is not required; for us, it runs via a setup key on Netbird.
Does the client side need a proxy with HTTP/2, or is it only required on the server side? I was able to connect all other clients without any issues.
I look forward to hearing from you and wish you a great day!

@LKleemann Client connects to management and signal services via GRPC (which requires HTTP/2), and as stated in the documentation, HTTP/2 support is required for any proxy/reverse-proxy between client and management/signal components


Motion scene not triggering with NestedScrollView as anchor point in beta02

Hi there!
I have a scenario which works fine on 2.1-beta01 and before but breaks on beta02.
I have the following transition
     <Transition
        android:id="@+id/transition"
        app:constraintSetEnd="@id/collapsed"
        app:constraintSetStart="@id/expanded"
        app:duration="1000"
        app:motionInterpolator="easeInOut">
        <OnSwipe
            app:dragDirection="dragUp"
            app:moveWhenScrollAtTop="true"
            app:touchAnchorId="@id/nsv_container"
            app:touchAnchorSide="top" />
    </Transition>

The layout I'm using has a MotionLayout as the parent and a child NestedScrollView which contains a LinearLayout with some chid views.
Before beta02, the Motion animation would trigger as soon as I started scrolling the contents of the NestedScrollView but on beta02, I have to reach the bottom of the NestedScrollView to trigger it.
The layout is company code so I can't share it but I think I've given enough context as to what's happening.
Edit: More context, the MotionLayout is used to create a "Collapsing Toolbar" style animation, nothing too complex.

I am having the same issue with NestedScrollView + MotionLayout

This will be fixed in next build.

Uploading งานนำเสนอไม่มีชื่อ.pdf…

แก้ไขด้วย

As of 2.1.0-rc1, this is working fine!


Ultranormalization encourages name squatting

Describe the bug
#10498 introduced "ultranormalization" to prevent name squatting of package names similar to ones already registered:

requests.exceptions.HTTPError: 400 Client Error: The name 'l10n' is too similar to an existing project. See https://pypi.org/help/#project-name for more information. for url: https://upload.pypi.org/legacy/

While the initiative, in general, is something of major concern for PyPI (and any other big package registry), the implementation has a few painful drawbacks:

It simplifies name squatting. For example, registration of the name lili (a French name) allows to additionally squat many other similar names, such as 1111, i111, i11l (could be a good name for internationalization package), i-11-l, iiii (4 in Roman numerals), and so on. In total, it's a huge amount of combinations, the exact number depends on the package max size and if you count names such as l-------ll--------l.
It complicates name registration. A few months ago, I started my work on an l10n+i18n package. I always start by picking a name. A quick search on PyPI showed that the name l10n is free. A few months later, I have the package ready but PyPI rejects my upload.  How could I know that the name is "taken"? Should I register the name before I have any code ready? Then again, that encourages name squatting.
The name rejection reason isn't clear. It just says that the name is similar to another one. Which one? If I knew, I could claim it as per PEP 541. But it can't be completely solved by just showing the name. Before the change was introduced, there were registered multiple packages that wouldn't pass the check. That means if the name l10n is rejected by PyPI because there is a package i10n, claiming the i10n name would reveal that there is a package lion which the user would need to claim again. How many times can one claim names to register a single package? And if PyPI would show all similar names, would it be reasonable to allow mass name claiming? Then again, it's not much different from mass squatting. And if I could claim any name itself without claiming all collisions, wouldn't it defeat the point of the change altogether?
It reduces the scope of available names. This one is similar to previous points but worth covering. As the Python ecosystem grows, so grows the list of registered names on PyPI, and so shrinks the scope of names available for registration. Less free names mean more frustration, harder name picking, and more awful names. You might know this frustration when you try to register a new account on, let's say, Reddit, but all usernames you ever used are already taken and in frustration, you just start slamming the keyboard trying to find just any random combination that would work. And now imagine that instead of nice readable names of packages you have such randomness in your dependency file, imports, and tracebacks. It's important to keep as many nice names for packages available as possible and the change goes against this initiative. Less good names available again means more effective name squatting.

Expected behavior
"What I see is what I get". If there is a package with this name, the name is already taken. You might claim it as per PEP 541 or pick another one. If there is no package with such name (and it's not in the stdlib), you can use it.
To Reproduce
Try to register l10n package. Or run test_fails_with_ultranormalized_names from the PyPI test suite.
My Platform
Irrelevant.
Additional context
Irrelevant.
Possible solutions
I understand the motivation behind the change but find it bringing more harm than good. To not be that person who only complaints about things, there are some solutions for the problem I see:

From the obvious, just revert the change. It would solve all the issues I outlined but the problem with the name squatting will stay for further discussions (wouldn't it always stay unsolved anyway?).
Reduce the scope of the change by checking collisions with only popular names. It makes sense to prevent registering names such as djang0 but at the same time there is no harm in having some not very popular or nearly abandoned packages collide. However, PyPI doesn't have a reliable metric of package popularity just yet. The downloads count is stored separately in BigQuery (and querying it for each name registration could be costly) and even then, the metric is pretty unreliable. GitHub stars count is an even worse indication of popularity and is available not for all packages.
Allow registering colliding names but provide a warning in the Web UI that there are packages with a similar name.
Write warnings about registering colliding names into an audit log. IDK if PyPI has any internal audits for this purpose but having one regularly might be a good idea if the registry security matters.
Avoid implementing heuristics on the PyPI side and leave PyPI scanning to the bored (or paid) pentest companies.

Sorry for a lot of text. I don't want to fight against your vision of how the project should look like but I find this particular change harmful for both security and user experience.

Here I use "name squatting" to indicate two slightly different attacks:

Squatting of names similar to existing projects. The end goal usually is to distribute a malware.
Squatting of nice-looking names. Usually, dictionary words or popular brands. The end goal usually is to sell the name later.

If there is a term to distinguish these two, it's not known to me. The difference, however, is quite small, and persuaded goals may mix. Both are somewhat of a concern for a package registry and both should be approached carefully without sacrificing one for another.

Hey @orsinium, thanks for the issue. I think we're unlikely to reverse this policy: this may not be apparent to PyPI users but this has significantly cut down on the creation of malicious packages attempting to similar-squat legitimate project names. It's generally made PyPI safer to use but also means we (PyPI maintainers) can spend less time dealing with these types of packages.
I think there's a few things we can do to make this policy easier to deal with, though:

#2082, so you can acquire a project name before you're ready to publish
#2589, so there's less contention for PyPI's single global namespace
Streamline the process of making a request for a prohibited or 'too similar' name, since these don't really need to happen in our public support issue tracker.
Make it more clear that a project name rejected for being "too similar" is available to request via PEP 541, and should pretty much always be approved (this is just a matter of updating https://pypi.org/help/#project-name)

I like the last 2 points. Even if the presence of the feature isn't something that can be discussed, there are still ways to improve it:

Show with which names exactly the requested name conflicts. I covered in the issue description why it might be a good idea.
Set a threshold for the allowed text distance. For example, 1111 and l111 (distance 1) are similar but 1111 and lili (distance 4) are completely different names.
Make threshold adaptive based on the project name. For example, python-dateutll is too similar to python-dateutil while ll and li are two completely different names. Both cases have the same distance 1 but their length (and so relative difference) is different.
Do not apply the rule to some abandoned or unpopular projects. The original change is targeted against name squatting for the purpose of malware distribution and so makes sense only for packages that have names similar to one that people often use (and so may mistype).

When I was working on dephell, I had an idea to warn users if they try to install a package that looks like a more popular project but mistyped (https://github.com/dephell/dephell/issues/133). And to this day, I still think that allowing packages to have similar names but warning users about it could be a good idea. At least because it allows for an even more aggressive similarity search than the currently implemented ultranormalization..

Copyright (c) 2011 Google Inc. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
"""Applies a fix to CR LF TAB handling in xml.dom.
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.org/issue5752
TODO(bradnelson): Consider dropping this when we drop XP support.
"""
import xml.dom.minidom
def _Replacement_write_data(writer, data, is_attrib=False):
"""Writes datachars to writer."""
data = data.replace("&", "&").replace("<", "<")
data = data.replace(""", """).replace(">", ">")
if is_attrib:
data = data.replace(
"\r", "
").replace(
"\n", "
").replace(
"\t", "	")
writer.write(data)
def _Replacement_writexml(self, writer, indent="", addindent="", newl=""):
indent = current indentation
addindent = indentation to add to higher levels
newl = newline string
writer.write(indent+"<" + self.tagName)
attrs = self._get_attributes()
a_names = attrs.keys()
a_names.sort()
for a_name in a_names:
writer.write(" %s="" % a_name)
_Replacement_write_data(writer, attrs[a_name].value, is_attrib=True)
writer.write(""")
if self.childNodes:
writer.write(">%s" % newl)
for node in self.childNodes:
node.writexml(writer, indent + addindent, addindent, newl)
writer.write("%s</%s>%s" % (indent, self.tagName, newl))
else:
writer.write("/>%s" % newl)
class XmlFix(object):
"""Object to manage temporary patching of xml.dom.minidom."""
def init(self):
# Preserve current xml.dom.minidom functions.
self.write_data = xml.dom.minidom._write_data
self.writexml = xml.dom.minidom.Element.writexml
# Inject replacement versions of a function and a method.
xml.dom.minidom._write_data = _Replacement_write_data
xml.dom.minidom.Element.writexml = _Replacement_writexml
def Cleanup(self):
if self.write_data:
xml.dom.minidom._write_data = self.write_data
xml.dom.minidom.Element.writexml = self.writexml
self.write_data = None
def del(self):
self.Cleanup()

Having hit the error message myself I am at a loss as to which name my chosen name is too similar to, despite searching the list of all project names. I could spend all day playing "guess a valid name", but I'd rather not.

What's about to use the Levenshtein distance ?

Yes, we tried that in https://github.com/pypi/warehouse/pull/5001, unfortunately it was far too noisy to be actually useful.

Which one? If I knew, I could claim it as per PEP 541.

I agree.  I tried to register "checkreqs" or so, and it was considered too similar to an unknown existing project.
I don't see anyone against giving the squatted project name, either here or in #11872, so I should probably just send a PR?

Which one? If I knew, I could claim it as per PEP 541.

I agree. I tried to register "checkreqs" or so, and it was considered too similar to an unknown existing project.
I don't see anyone against giving the squatted project name, either here or in #11872, so I should probably just send a PR?

My opinion carries no organizational weight, but I think it would be a nice improvement if PyPI could be issue a more specific error message than the current one, and a PR would represent a very actionable decision for the maintainers, +1 from me.
(For the sake of context: I ended up on this issue after helping a user in #python on Libera.chat navigate the existing error message, which left them perplexed about what they collided with and what to do about it)


Travel CI test failed (tornadox-5.x require python-3.4+)

Travel CI test failed.
https://travis-ci.org/Lawouach/WebSocket-for-Python/builds/409454320?utm_source=github_status&utm_medium=notification
This test passed python2.7 and python3.5, failed python3.3.
The Travel CI test use tornado-5.1.1, but not supported python-3.3. (tornado-5 require python3.4+)
In my opinion, install to exclude tronado-5.x in py3kreqs.txt .
-tornado>=4.2.3
+tornado>=4.2.3,<5.0.0

Add tornado version info.
https://pypi.org/project/tornado/5.1.1/
Programming Language
Python :: 2
Python :: 2.7
Python :: 3
Python :: 3.4
Python :: 3.5
Python :: 3.6
Python :: 3.7
Python :: Implementation :: CPython
Python :: Implementation :: PyPy
https://pypi.org/project/tornado/4.5.3/
Programming Language
Python :: 2
Python :: 2.7
Python :: 3
Python :: 3.3   <---- notice !!
Python :: 3.4
Python :: 3.5
Python :: 3.6
Python :: Implementation :: CPython
Python :: Implementation :: PyPy

this will be fixed very soon


Add Xojo 2016 Release 1.1

Adding a new cask

[x] Checked there aren’t open pull requests for the same cask.
[x] Checked there aren’t closed issues where that cask was already refused.
[x] When naming the cask, followed the token reference.
[x] Commit message includes cask’s name.
[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] brew cask install {{cask_file}} worked successfully.
[x] brew cask uninstall {{cask_file}} worked successfully.

This is a walled build, and as such we will not accept it.


Celo price fix

Make sure these boxes are checked! 📦✅

[ ] You ran ./run_tests.sh
[ ] You ran pre-commit run -a
[ ] If you want to add your network to setup_service.py, provide a link to your
safe-deployments PR and check network name
exists in safe-eth-py

What was wrong? 👾
Closes #
How was it fixed? 🎯

Sorry wrong repo


[Bug]: Unable to select MySQL database for structural comparison

ODC version
odc424
OB version

What happened?

What did you expect to happen?
You can choose a MySQL database
How can we reproduce it (as minimally and precisely as possible)?
Comparison of execution structures
Anything else we need to know?
No response
Cloud
No response

Fixed In Commit cea31ec22170e4217984b7ba17b37823e0063395

pass


How to get the contentOffset value from IGListCollectionView?

New issue checklist

[x] I have reviewed the README and documentation
[x] I have searched existing issues and this is not a duplicate

General information

IGListKit version: 2.1.0
iOS version(s): 10.2
CocoaPods/Carthage version: 1.2.0.beta.3
Xcode version: 8.2 beta
Devices/Simulators affected:
Reproducible in the demo project? (No):
Related issues: #158

For UICollectionView we can get e.g. collectionView.contentOffset.y value from scrollViewDidScroll(_ scrollView: UIScrollView), but is there any way to get a content offset value when using IGListCollectionView?
I need it in order to manipulate constraints and/or view positions on other views based on scroll.
Any help is much appreciated.
I started asking in #158 due to its relevance, but as it's closed I created a new issue. Hope that's okay.

@HumidBrains i think you can still receive UIScrollViewDelegate callbacks if you specify an object for the scrollViewDelegate property on your list adapter.

Thanks @jamieQ, this was embarrassingly simple :)
For others who are as confused as I am, just make sure the adapter is your scrollview delegate by adding adapter.scrollViewDelegate = self and you're good to go.
So then you can do e.g.
func scrollViewDidScroll(_ scrollView: UIScrollView) {       print(collectionView.contentOffset.y)    }

Adding adapter.scrollViewDelegate = self to viewDidLoad() causes an assertion failure in my app.
The error Invalid parameter not satisfying: indexPath != nil is produced by the IGParameterAssert(indexPath != nil);  in _didEndDisplayingReusableView as the app is trying to load the list.
Anyone have any suggestions?


Problem with Tehran's time difference (UTC +3:30)

Tehran's time difference of two hours with IST is wrongly factored as one hour on the app, this is probably a roll over from Google's Clock app.

Requesting you to do the needful.

Can you confirm that only this city is affected?

I have cross checked all other the cities in my screenshot, those are unaffected, seems to be something with +3:30 UTC.

I've never worked on the part of the code that manages time zones, but I'll take a look at it.
In any case, I don't have this problem on my phone, so I hope I can find a solution.

@sunshinekhan
Can you please specify:

the model of your device;
the Android version;
whether stock or custom ROM;
the language set on your device;
the time zone of your device;

It's amazing that on my 2 devices with 2 different versions of Android, this bug is impossible to reproduce.

Information as requested:
Model: Redmi Note 8 Pro (M1906G7I)
Android Version: 11RP1A.200720.011
ROM: MIUI Global <IP_ADDRESS>(RGGINXM)
Language: English (India)
Time Zone: GMT+05:30
I presume the issue has been fixed by Google a few days back, I had reached out to support simultaneously when writing here. Have you updated your code recently?

I presume the issue has been fixed by Google a few days back

@sunshinekhan
You mean there are no more problems on this app? Or on the one from Google?

Have you updated your code recently?

I've released version 2.8 but I haven't touched the code related to this problem.

The one from Google!

@sunshinekhan So it's solved?

The widget and app in the screenshots is also Google, but I cross checked on your app also, it's fixed!


Make sure response status is always available

Sometimes response is not what you think it is. @app_response is
always a proper Rack::Response object so it's safe to get its status.
See https://github.com/intridea/grape/issues/1059

:+1:

:+1:

This actually failed for me (specifically, for requests that fail due to wrong basic http authorization credentials). @app_response, in that case, was not a Rack::Response at all but instead was the array that response expects.
I ended up doing: status: @app_response.try(:status) || response.status in a middleware I have, and that seems to both work and be accurate.
Also, I have to admit I didn't fully understand whether or not this problem will go away once this fix is available in the actual grape gem.

the grape fix seems to be the correct one ...

Your fix does not work. For example if an exception is thrown a HTTP 500 answer will be sended and the @app_response will be nil.
I'm currently searching a solution for that problem and asked for help in the grape repo : https://github.com/ruby-grape/grape/issues/1301

@terceiro I'm closing this - I believe #33 should solve the issue 👍


chore: protect all GH CODEOWNERS files

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location

applied


add space to shebang

After running setup.py on a fresh conda environment, the wrong environment gets specified in the Miniconda/bin/aria* files ... except for ariaDownload.py.  The only difference was a space after the #! in the shebang, and this has fixed the other ones. Very strange.
#!/Users/bb/Miniconda3/envs/SL/bin/python -> incorrect without initial space in the source dir
#!/Users/bb/Miniconda3/envs/ARIA/bin/python -> correction after putting space.

included instead in #249

included instead in #249


Fix numeric facet slider tooltip.

Fixes FAIRSPC-9

That's impressive how quickly you fixed that! The only moment I found is that the tooltip is not shown until you change the pre-set long value

The only moment I found is that the tooltip is not shown until you change the pre-set long value

@tgreenwood It is fixed now - if no value is specified, the tooltip will show the placeholder value

All is good, I am just thinking about one more tiny point

now the tooltip is available like every time user hovers cursor over the edit field, even when there is no need for that (small numbers). Is it something we could hide while no need to duplicate the info for users to make it visible? I would also understand, if you called my comment "an overhead' :)

now the tooltip is available like every time user hovers cursor over the edit field, even when there is no need for that (small numbers). Is it something we could hide while no need to duplicate the info for users to make it visible? I would also understand, if you called my comment "an overhead' :)

hmm, not sure how to do that :sweat_smile: Depending on things like screen resolution, zoom etc the number of digits would be different... Not sure if having the tooltip always there would be now considered annoying

never

now the tooltip is available like every time user hovers cursor over the edit field, even when there is no need for that (small numbers). Is it something we could hide while no need to duplicate the info for users to make it visible? I would also understand, if you called my comment "an overhead' :)

hmm, not sure how to do that 😅 Depending on things like screen resolution, zoom etc the number of digits would be different... Not sure if having the tooltip always there would be now considered annoying

nevermind then, let's have it as is


New version: JDF v0.2.0

Registering package: JDF
Repository: https://github.com/xiaodaigh/JDF.jl
Created by: @xiaodaigh
Version: v0.2.0
Commit: 56f50606c3ae23395138602d792fe749db46d21c
Reviewed by: @xiaodaigh
Reference: https://github.com/xiaodaigh/JDF.jl/commit/56f50606c3ae23395138602d792fe749db46d21c#commitcomment-35627042

Your new version pull request does not meet all of the guidelines for automatic merging.
Specifically, your pull request does not meet the following guidelines:

The following dependencies do not have a compat entry that has an upper bound: julia

If you want to prevent this pull request from being auto-merged, simply leave a comment.
(If you want to post a comment without blocking auto-merging, you must include the text [noblock] in your comment.)

It is important to note that if your pull request does not meet the guidelines for automatic merging, this does not mean that your pull request will never be merged. It just means that your pull request will require manual review by a human.

These guidelines are intended not as requirements for packages but as very conservative guidelines, which, if your new package or new version of a package meets them, it may be automatically merged.

On a separate note, I see that you are registering a release with a version number of the form v0.X.Y.
Does your package have a stable public API? If so, then it's time for you to register version v1.0.0 of your package. (This is not a requirement. It's just a recommendation.)
If your package does not yet have a stable public API, then of course you are not yet ready to release version v1.0.0.

[noblock]

Your new version pull request met all of the guidelines for automatic merging.
I will automatically merge this pull request during the next cron job.
If you want to prevent this pull request from being auto-merged, simply leave a comment.
(If you want to post a comment without blocking auto-merging, you must include the text [noblock] in your comment.)

On a separate note, I see that you are registering a release with a version number of the form v0.X.Y.
Does your package have a stable public API? If so, then it's time for you to register version v1.0.0 of your package. (This is not a requirement. It's just a recommendation.)
If your package does not yet have a stable public API, then of course you are not yet ready to release version v1.0.0.

[noblock]


ChannelFileSend

How do I use this to make the bot send an image to the channel? I can't for the life of me figure it out

session.ChannelFileSend(channel, filename, bufio.NewReader(filename))
On Thu, May 26, 2016 at 10:53 AM, VuuI<EMAIL_ADDRESS>wrote:

How do I use this to make the bot send an image to the channel? I can't
for the life of me figure it out
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/bwmarrin/discordgo/issues/209

I think we can close this issue.

I think you're right!

ChannelFileSend(channelID, name string, r io.Reader)
Example in case someone needs it.

	            file, err := os.Open("picture.png")
	            if err != nil {
    				log.Fatal(err)
    			}
	            s.ChannelFileSend(channel.ID ,picture.png, file)
	            file.Close()


WIP: Added a more descriptive output for the runs.

Addresses https://github.com/paulirish/pwmetrics/issues/64. Very minor code change.

Here is the updated output, @rpkoller is this better for you?

Looks great! The only thing i am still unsure if Launching Chromeis necessary at all since you see the opening chrome window anyway.

We are launching/killing chrome for each run. It's useful to have this message when errors happens or for CI as @pedro93 noticed.

@paulirish can we merge this one?

@denar90 @paulirish with your permission I would merge both this PR and the eslint one tomorrow.


etcdctl should require root user authentication for enabling auth

[rm@dev-vm-01 etcd]$ sudo ETCDCTL_API=3 ./etcdctl --endpoints=https://dev-vm-01.example.com:2379 version
etcdctl version: 3.1.5
API version: 3.1
The workflow seems a little weird.

First we create a root user/password
Enable auth doesn't require auth
Disable auth requires auth
enable again doesn't require auth

I think everyone will agree that enable should also require auth, else if you have a root user created then anyone can enable auth even if you don't intend to.

I don't agree here. What is the threat model? If auth is disabled, then auth is disabled. A user could wipe the entire store in the meantime.

@heyitsanthony yeaah pretty much :smile: or a better argument is a person enabling auth should at-least know the root password before locking the entire store.
Closing it.


'slide' option not respecting setting

Hi all,
Noticed something a bit odd around the change done with slick automatically detects child elements (believe that was 1.5.0). If I set the slide option, it is not respecting my value: http://codepen.io/zslabs/pen/WbVgBB

@zslabs take a look here: https://github.com/kenwheeler/slick/issues/1281

Appreciate you pointing me to that, will close this and watch that thread.


Blinky-Hello-World cannot get configuration menu to open anymore.

PLEASE READ FIRST:
I was able to open the configuration menu from https://edukit.workshop.aws/en/blinky-hello-world/connecting-to-aws.html before, however, moving on to Smart Thermostat, I had a Wifi issue so I decided to go back into the config menu to see if I mispelled anything. Now it does not work:
Executed this command in attempt to open configuration menu
pio run --environment core2foraws --target menuconfig
Received this error:
Error: Couldn't find target config target-AWS_IoT_EduKit-Cloud_Connected_Blinky.elf-00000000000000000000.json
Expanded Terminal Screen:
Processing core2foraws (platform<EMAIL_ADDRESS>framework: espidf; board: m5stack-core2)
Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/m5stack-core2.html
PLATFORM: Espressif 32 (3.2.1) > M5Stack Core2
HARDWARE: ESP32 240MHz, 6.25MB RAM, 16MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:

framework-espidf 3.40201.210513 (4.2.1)
tool-cmake 3.16.4
tool-esptoolpy 1.30000.201119 (3.0.0)
tool-idf 1.0.1
tool-mconf 1.4060000.20190628 (406.0.0)
tool-ninja 1.9.0
toolchain-esp32ulp 1.22851.191205 (2.28.51)
toolchain-xtensa32 2.80400.210211 (8.4.0)
Reading CMake configuration...
Error: Couldn't find target config target-AWS_IoT_EduKit-Cloud_Connected_Blinky.elf-00000000000000000000.json

Fixed

Uninstalled PlatformIO from VsCode
Deleted .platform from hard drive
Deleted git repository
Restarted from scratch


Package upgrade: permission_handler 7.1.0 --> 8.3.0

Summary
Package upgrade: permission_handler 7.1.0 --> 8.3.0
Changelog
[General] [Change] - Upgrade permission_handler from 7.1.0 to 8.3.0 (changelog)
Test Plan
Regression test the following areas:
./lib/ui/scanner/native_scanner_view.dart
./lib/core/providers/scanner.dart

Deferred


Use Virtuoso instead of GraphDB as triplestore

Use Virtuoso webDAV to easily upload RDF files through HTTP.
We might need to play around with the configuration as Virtuoso current version (7) does not include LDP capabilities out-of-the-box

LDP docs: http://vos.openlinksw.com/owiki/wiki/VOS/VirtLDP#What is the Linked Data Platform (LDP)%3F
cf. discussion to solve it https://community.openlinksw.com/t/permissions-on-ldp-containers-and-resources/290/9
GitHub issue: https://github.com/openlink/virtuoso-opensource/issues/466
Download VAD packages: http://download3.openlinksw.com/index.html?prefix=uda/vad-vos-packages/7.2/

GitHub repo with some instructions to enable LDP in Virtuoso: https://github.com/markwilkinson/to_build_virtuoso_ldp
With the corresponding image on DockerHub: https://hub.docker.com/r/markw/ldp_server
Note: delete a file from the webDAV with iSQL
select DB.DBA.DAV_DELETE ('/DAV/home/dba/rdf_sink/gitee.ttl', 0, 'dba', 'dba');

Trying with current Virtuoso deployment
Create a folder:
curl -iX PUT -u dav:password -H 'Content-Type: text/turtle' https://data.index.semanticscience.org/DAV/home/dav/rdf_sink/test-folder

Upload with HTTP:
curl --verbose -iX PUT -F<EMAIL_ADDRESS>-u dav:password -H 'Content-Type: text/turtle' https://data.index.semanticscience.org/DAV/home/dav/rdf_sink/shapes-of-you.ttl

Error (even if the prefix is properly define in the file):

TURTLE RDF loader, line 6: SP029: TURTLE RDF loader, line 6: Undefined namespace prefix at ns1:EntryPoint
%

Using Virtuoso greatly increase the response time (from 10s to ~30s), and updating the GraphDB triplestore is easier that the Virtuoso LDP. So we will keep using GraphDB


add getRecommendedTimeoutMillis to AccessibilityInfo

Summary
resolve #30866
This PR is for using getRecommendedTimeoutMillis with React Native, which is available on Android 10 and above.
This allows the Android "Time to take action (Accessibility timeout)" setting to be reflected in the app.

Changelog

[Android] [Added] - Add getRecommendedTimeoutMillis to AccessibilityInfo
Test Plan

I couldn't find any tests at the code level, so I tested them on my Android device.

Android 10 (Pixel4a)
Settings

App

Android 7, iOS(Simulator)
Return the original timeout.

Hey, @grgr-dkrk thank you for this PR to help make React Native more accessible! I've added you to our project board. Apologies for this not getting added earlier.

Sorry for the comment churn here, @nadiia is implementing the changes I requested, so no need to any more work @grgr-dkrk! Thanks again for the PR.

@grgr-dkrk Thank you for the contribution! Would you be open to add a PR for documenting getRecommendedTimeoutMillis in here?

Thank you @grgr-dkrk for this contribution! I would like to give you a shout-out on Twitter and include you in our end-of-month issues update for your contribution. Do you have a Twitter we can tag?

@blavalla @amarlette @nadiia Thank you for your support!
I have submitted a PR of documentation on this feature.
https://github.com/facebook/react-native-website/pull/2581
My Twitter account is [@]dkrk0901, Thanks.


Not working

Saying cannot read property show of undefined

For iOS:

npm <thispackagename> --save
npm install rnpm -g
rnpm link <packagename>
react-native run-ios

This package has not been updated for a long time because we do not use anymore. We have our own snackbar js Version 🎉

@Liroo Will you put it in open source? =)

@aiserg Complicated to do, used with redux and not an overlay, juste an view over our own navigator at root.. Later I'm gonna look at the open source solution ;)

Hi @waqas19921, please try again. I've published several fixes to npm. Both android and iOS should be working now!


Some Error in Environment Setup

In Environment Setup, it should use git clone https://github.com/wyhlovecpp/PET-Reconstruction.git to download these code. However,  I have found that the /data/LRHR_dataset.py is not the correct version, which does not have the key "NHR"

The repo you downloaded is a forked version. Use git clone https://github.com/Show-han/PET-Reconstruction.git.


Ground Overlay objects are not shown on map

BUG / PROBREM REPORT
SUMMARY
Ground overlay objects are not shown on map in the PCL types. It does work in the native types.
VERSIONS

Xamarin.Forms.GoogleMaps - 2.1.0
Xamarin.Forms - <IP_ADDRESS>0

PLATFORMS

[?] Android
[x] iOS
[ ] UWP

HOW TO REPRODUCE
(Let me show how to reproduce with steps or codes)
(Not working)
var satelliteImage = new GroundOverlay()
{
     Icon = BitmapDescriptorFactory.FromStream(new MemoryStream(imageBytesArray)),
     Bounds = new Bounds(new Position(southWest.Lat, southWest.Lon), new Position(northEast.Lat, northEast.Lon)),
      IsClickable = false,
};

//NOT WORKING :( Ground overlay is not shown on map
_googleMap.GroundOverlays.Add(_satelliteImage);

(Working iOS native)
var satelliteImageNative = new Google.Maps.GroundOverlay
{
    Icon = new UIKit.UIImage(Foundation.NSData.FromArray(imageBytesArray)),
    Bounds = new Google.Maps.CoordinateBounds(new CoreLocation.CLLocationCoordinate2D(southWest.Lat, southWest.Lon), new CoreLocation.CLLocationCoordinate2D(northEast.Lat, northEast.Lon)),
    Tappable = false,
    ZIndex = 100,
    Map = _mapView
};

ACTUAL IMAGES
(Let me show your actual problem images/stacktrace. If you want to capture simulator screen to animation GIF, I recomend to LICEcap.)

// paste stacktrace

OTHERS
(free format)

Yes it is bug.
Workaround is set Transparency to 0 when after added.
_googleMap.GroundOverlays.Add(_satelliteImage);
_satelliteImage.Transparency = 0f;

I'm doing the same thing.  Anyway you can share how you are getting your imageBytesArray from a URL.

Fixed at https://github.com/amay077/Xamarin.Forms.GoogleMaps/releases/tag/v2.1.1-beta1


[RFC] hostbridge and IPv6 for containers

Hi all,
scratching my own itch I had some ideas on how to a) give nixos containers IPv6 and b) allow declarative containers to join an existing bridge for connectivity.
What I mostly do not like yet: It should be possible to define the network-settings inside the container with networking.interfaces.eth0.* instead of defining it from the outside.
So please comment on this, maybe I can rework this into something usable to get IPv6 and bridging to declarative containers.

(triage) cc @aristidb @edolstra @aszlig @chaoflow

Finally got some time to review your changes. Big :+1:, very cool!
Could you maybe group your commits into 2 or 3 commits without the fixes?

Could you maybe group your commits into 2 or 3 commits without the fixes?

Will do. Also there is one little detail missing: when host-bridge is used, the vb-* device needs to be deleted to make sure. Got bitten by this unclean exit several times now…

superseeded by #14018


Remove Publishing Edge releases to Open VSX

Fixes https://github.com/stateful/vscode-runme/pull/254


[SPARK-14362][SPARK-14406][SQL][Follow-up] DDL Native Support: Drop View and Drop Table

What changes were proposed in this pull request?
This PR is to remove the function isViewSupported from SessionCatalog. After the removal, we still can capture the user errors if users try to drop a table using DROP VIEW.
How was this patch tested?
Modified the existing test cases

Test build #55470 has started for PR 12284 at commit 0e11331.

Test build #55470 has finished for PR 12284 at commit 0e11331.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/55470/
Test PASSed.

cc @yhuai @andrewor14 Thanks!

Test build #55489 has started for PR 12284 at commit 8296bc6.

Test build #55489 has finished for PR 12284 at commit 8296bc6.

This patch fails SparkR unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/55489/
Test FAILed.

Test build #55495 has started for PR 12284 at commit 9271a03.

Test build #55495 has finished for PR 12284 at commit 9271a03.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/55495/
Test PASSed.

Thanks. Merging to master.


luci-proto-6in4: Add some HE.net pre-defined values for MTU.

Looks like normal path MTU discovery at work? My understanding was that the local (and he.net configured remote) interface MTU is basically just an upper limit for packets we can emit/forward to this interface. ICMPv6 might reduce the actual in-transit MTU even further if any intermediate hop does not support our chosen MTU. IPv6 requires 1280 at least, so there might be routers in the internet that cannot handle more than that.

Looks like normal path MTU discovery at work?

I'll wait for an answer from HE. Just want to make sure that everything works as it should.


Specifying Duration::MAX as TTL leads to addition with overflow panic

When attempting to set an entry with the maximum possible TTL, sqlite-cache will panic:
topic.set("key", value, std::time::Duration::MAX);

I can work around this by using an arbitrary value like 300 days worth.
I think the panic should at least be an Err variant so that the program doesn't terminate in surprising situations, such as when setting a TTL based on a max-age cache header returned from some external source.

I implemented a fix in https://github.com/losfair/sqlite-cache/pull/2. Now the TTL and expiration time will saturate to i64::MAX seconds to fit in a SQLite integer column.
Please check whether this solves the issue :)

Confirmed, thanks!

Released v0.1.3 with this fix.


Multi-router liquidity logic

Problem
As of now, we are dividing the liquidity in the same ratio of multi routers.
Basically we had a 21 ETH transfer. One router had 8.7 ETH and one had 19.9ETH. Because they would need to equally split, it couldnt go fast path, even through there was enough ETH between them.
Proposed Solution
Add extra signatures for remainder router calculation
Sequencer adds that together
Same logic for all assets
To utilize the full scope of liquidity multi-router, we could have a way for routers to cover remainders after even splits.
Acceptance Criteria
From an end tester and/or user perspective, the below criteria must be met to consider this done:

[ ] If a transfer is sent and there is enough router liquidity in a single router or across a few routers, then the transfer should always succeed
[ ] Even splits should still be the initial priority, where possible
[ ] This is in a testable prototype

Needs contract changes. Should be tasked accordingly.

Reopening and updated for discussion. Im not sure how serious of a change this is + with the token freeze

We need to upgrade connext diamond contract to do this.

@wanglonghong started looking into this one. Will be asking some question around it

Finishing up spec, need review.

Spec is complete, going ahead with implementation.

Spec: https://www.notion.so/connext/Multi-Router-Liquidity-4dd927a0a96e4f84b2b20142db4e5493?pvs=4
We need an Integration test for the scenario, after slow path in implemented. We can start with it's implementation and testing.

stale, closing


Pre-built binary for 64bit pi OS (aarch64)

Perhaps I'm just misunderstanding, but having issues getting any of the pre-built binaries to run for 64bit raspbian on a raspberry pi 3 (aarch64) - I'm guessing they are 32bit only and the 64bit download is for x86. Thank you for your work on this project, has been a huge help to some custom home automation projects I've been working on!

Finally got this built myself for Raspbian 64 bit. The file is available here: https://drive.google.com/file/d/1D0-sHWkswZKSuMFoRdr8WWhEZdpjcL4B/view?usp=sharing
@mfreeborn thank you again for this project and feel free to use /post the file


working sample

Ive downloaded the sample but none of them work, when you load media I get and object reference error. In addition to this I have noticed something quite odd . .
If I run the sample , I find the chromecast device but when I run it again it is not found, but if I disconnect the chromecast and reconnect it to the tv I can find it again
On code page there is some sample code however _controller is giving me errors because it has not been initialized.
Can you send me a basic sample on how to search for device and send local media ie filepath to the chromecast.
UWP C# App
Thank you
Kevin
<EMAIL_ADDRESS>

I broke the Windows 10 UWP project with the latest modifications. I will create a new version soon.
Currently only the Console application works
Sorry for the trouble

Version 0.3.4 is working now as are all the samples.


Failed to create pull request: Error: TF401398: The pull request cannot be activated because the source and/or the target branch no longer exists, or the requested refs are not branches

Describe the bug
Dependabot creates a new branch but can't create a pull-request
Creating pull request 'Bump Serilog from 4.0.1 to 4.0.2'...

Pushing 1 change(s) to branch 'dependabot/nuget/refs/heads/master/Serilog-4.0.2'...
Creating pull request to merge 'dependabot/nuget/refs/heads/master/Serilog-4.0.2' into 'refs/heads/master'...
##[error]Failed to create pull request: Error: TF401398: The pull request cannot be activated because the source and/or the target branch no longer exists, or the requested refs are not branches
Error: TF401398: The pull request cannot be activated because the source and/or the target branch no longer exists, or the requested refs are not branches
at RestClient. (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.35.923/node_modules/typed-rest-client/RestClient.js:204:31)
at Generator.next ()
at fulfilled (/home/vsts/work/_tasks/dependabot_d98b873d-cf18-41eb-8ff5-234f14697896/2.35.923/node_modules/typed-rest-client/RestClient.js:7:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
statusCode: 400,
result: {
'$id': '1',
innerException: null,
message: 'TF401398: The pull request cannot be activated because the source and/or the target branch no longer exists, or the requested refs are not branches',
typeName: 'Microsoft.TeamFoundation.Git.Server.GitPullRequestCannotBeActivated, Microsoft.TeamFoundation.Git.Server',
typeKey: 'GitPullRequestCannotBeActivated',
errorCode: 0,
eventId: 3000
},
responseHeaders: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-length': '384',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
p3p: 'CP="CAO DSP COR ADMa DEV CONo TELo CUR PSA PSD TAI IVDo OUR SAMi BUS DEM NAV STA UNI COM INT PHY ONL FIN PUR LOC CNT"',
'x-tfs-processid': 'afad4bcc-8099-4abb-915d-1f9d331d773b',
'strict-transport-security': 'max-age=31536000; includeSubDomains',
activityid: 'baf08b20-0b16-481a-a693-192b14133778',
'x-tfs-session': 'baf08b20-0b16-481a-a693-192b14133778',
'x-vss-e2eid': 'baf08b20-0b16-481a-a693-192b14133778',
'x-vss-senderdeploymentid': 'a6c8fbe9-7425-4392-883d-c602e2e7f7eb',
'x-vss-userdata': '085815d7-e6fe-48de-b063-e7286aacc314:0bab63e6-4a55-40e1-afe0-d2fee468b8a3',
'x-frame-options': 'SAMEORIGIN',
'request-context': 'appId=cid-v1:e6292eea-fb85-4107-bc0a-339fd28d3647',
'access-control-expose-headers': 'Request-Context',
'x-content-type-options': 'nosniff',
'x-cache': 'CONFIG_NOCACHE',
'x-msedge-ref': 'Ref A: 7363C1C86BF14A64921B9012A2FDA414 Ref B: AMS04EDGE2217 Ref C: 2024-09-29T08:10:29Z',
date: 'Sun, 29 Sep 2024 08:10:29 GMT'
}
}
Processing output 'mark_as_processed' with data: { 'base-commit-sha': 'd1e623fc2f35d7248292db82c01f992d89c1bae3' }
##[error]1 update job(s) failed, check logs for more information
Finishing: dependabot

@Anschra thanks for the report. It looks like the default branch name is being calculated incorrectly; I'll submit a PR to fix this shortly.
You can work around the issue for now by explicitly setting target branch in your dependabot.yml, e.g.:
updates:
  - package-ecosystem: 'nuget'
    target-branch: 'master'

Hope that helps.


mention RUSTFLAGS in -Z unknown error

#5546 suggests only doing this if the provided flag is a valid -Z arg for rustc, which would be better but also more complex to determine. this should be good enough as is, IMO.

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

Thanks for the PR, but I'm personally wary of suggestions like this. This error message mostly presumes that all unknown -Z flags were probably meant for rustc and that RUSTFLAGS would work for passing it, but neither of those are necessarily correct. I'm not really sure what to do though about improving the error message here

well, one option would be to only do that for -Z flags that rustc will actually accept, but that would either require shelling out to rustc -Z help and parsing the output (bad) or hardcoding the list (worse).
i guess a different approach would be to mention RUSTFLAGS or some other way of passing -Z flags to rustc in https://github.com/rust-lang/rust/blob/master/compiler/rustc_errors/src/emitter.rs#L326, but i'm not sure that's better.
the ugliest imaginable hack would be to only mention RUSTFLAGS-or-whatever if the unknown -Z flag is macro-backtrace. it's bad, but it solves the immediate problem of "rustc says to use -Z macro-backtrace but then if you try cargo build -Z macro-backtrace you get an unhelpful error message".

Perhaps rustc could detect it's invoked by cargo and change its error message then? I think the CARGO env var will be set in that case

:umbrella: The latest upstream changes (presumably #9369) made this pull request unmergeable. Please resolve the merge conflicts.

I'm gonna close this due to inactivity. I understand it can be confusing trying to figure out which flags should go to cargo and which to rustc. However, it isn't entirely clear if this is the right approach. Thanks!


[release-v1.0] Reorganize generate ci config script

Manual cherry pick of https://github.com/openshift-knative/eventing-kafka/pull/568

There is one change from that cherry pick: no so-forward-compat test done in this branch.

@devguyio do we want it here too?

/cherry-pick release-v0.26

cc @pierDipi


trustless auditing for FRAME pallets

Based on the forum discussion at https://forum.polkadot.network/t/rfc-trustless-in-code-auditing-annotations/988 and some internal discussions, it has become clear there is significant desire within FRAME to have auditing machinery that will allow us to annotate pallets with some attribute macro containing a hash code generated from the AST nodes that make up the actual contents of the pallet. This would look something like the following:
#[pallet]
#[audited(E0C5E21EB7AD91AA)]
pub mod pallet {
  ...
}

At compile-time we would generate a new hash for the AST nodes that make up the pallet, and if the new hash doesn't match the one recorded in the audited attribute, we would issue a compile error saying that the pallet needs to be re-audited. Then presumably the #[audited()] line would be commented out and the auditing team would add a new hash code and uncomment this line when they finish their audit.
We would also add a new version of construct_runtime!, perhaps construct_audited_runtime! that will only allow audited pallets in the runtime and will issue a compile-time error in the event that an unaudited pallet is included in the runtime.
Together, these two features will give pallet developers a better way to maintain and track the auditing status of their pallets, and runtime developers will have increased peace of mind knowing that all the pallets they are using in their runtime are audited if they opt into using the construct_audited_runtime! syntax.
We could also do a little interaction with the recently merged "pallet dev mode" feature (#12536) such that a compiler error will also be issued if a pallet with dev mode enabled is included in a construct_audited_runtime! runtime, if desirable.

We would also add a new version of construct_runtime!, perhaps construct_audited_runtime! that will only allow audited pallets in the runtime and will issue a compile-time error in the event that an unaudited pallet is included in the runtime.

If you do this, then you would require that pr that is only merged when it is audited. Imagine we are using construct_audited_runtime in Polkadot. We would  not be able to merge anything without it being audited. General this should be fine and would just require to adapt the process. However, another thing would be testing. This stuff should not get into the way of playing/adding new features or whatever. So, I think this shouldn't be its own macro call, it should more be some kind of attribute that you can set in construct_runtime based on some feature being enabled. In Polkadot we for example have the on-chain-release-build feature for this.
A little bit more off topic, the issue should be renamed. Auditing is never "trustless", at least not in my pov.

I agree a feature flag might be useful for toggling this off. As for the
trustless thing, I’m more referring to the annotations as a way of
verifying that the code you have right here matches what was at some point
audited versus trusting your mastery of git blame and what some old PR says
about the auditing status of the pallet, but point taken. My point is more
that anything short of this you have to trust that the code you have right
here is the same code some external thread is talking about, assuming we
have a rigid process around changing audited() lines
On Wed, Nov 9, 2022 at 3:46 AM Bastian Köcher @.***>
wrote:

We would also add a new version of construct_runtime!, perhaps
construct_audited_runtime! that will only allow audited pallets in the
runtime and will issue a compile-time error in the event that an unaudited
pallet is included in the runtime.
If you do this, then you would require that pr that is only merged when it
is audited. Imagine we are using construct_audited_runtime in Polkadot.
We would not be able to merge anything without it being audited. General
this should be fine and would just require to adapt the process. However,
another thing would be testing. This stuff should not get into the way of
playing/adding new features or whatever. So, I think this shouldn't be its
own macro call, it should more be some kind of attribute that you can set
in construct_runtime based on some feature being enabled. In Polkadot we
for example have the on-chain-release-build feature for this.
A little bit more off topic, the issue should be renamed. Auditing is
never "trustless", at least not in my pov.
—
Reply to this email directly, view it on GitHub
https://github.com/paritytech/substrate/issues/12656#issuecomment-1308411824,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOE4LI7NEU2WU7T5PXPKDLWHNQGJANCNFSM6AAAAAAR3CJG7E
.
You are receiving this because you were assigned.Message ID:
@.***>

You cannot use negative or default features here, as they complicate people causally playing, and cargo features are additive, but an automated process could use cargo build --features requireaudits of course.

Why do we need rust features for this?
Can we not add some syntax to the construct_runtime! macro that asserts all pallets to be audited in a test?

I agree and am not really clear why we would need a feature for this. If someone is playing/tinkering, they simply wouldn't use construct_audited_runtime! (or pass whatever argument to construct_runtime! if we decide to do it that way). If they wish to tweak an existing pallet, they mere have to remove or comment out the #[audited()] macro line above that pallet definition. I also plan to include the expected and actual hash codes in the compiler error in the event that the hash codes don't match, so they could also easily change the hash code manually in their local tinkering code instead of doing the above, if they so wish.
But yea, I agree that I don't really see why we need to bring features into this.

The moment you start changing a pallet, polkadot would stop compiling. This is a really shitty experience. It is not about "tinkering" of other users, it is about our work flow. Like you add some new pallet or fix something in a pallet and you want to test this. If there would be an extra construct runtime, it would require that you always change the macro name back or you would need to update the hash after each time you pressed a key on your keyboard. This is a really shitty dev experience.
I already had similar experiences with people requiring no warnings on a pallet level. This was an insanely annoying experience. When I want to change code, I don't want change unrelated code to achieve whatever requirement that isn't coming from rust itself.
Tldr, don't destroy the dev experience.

I definitely understand where you're coming from @bkchr -- the last thing I would want to do with this is create a shitty developer experience. That said, I think the workflow becomes pretty clear -- if you want to "open up" an already-audited pallet for editing, you simply comment out the #[audited()] line for that pallet, or, as you said, we add some feature flag for this, which I'm happy to do if you think that would make things less painful.
Another interesting idea would be to only allow the audit hash code compile-time errors to occur if/when one of those pallets is included in a construct_audited_runtime! call.  Perhaps this would be a better experience and address your concerns?

That's too heavy a change for new developers.  It's harmful security theater for experienced developers.

you simply comment out the #[audited()] line for that pallet

This workflow breaks the whole process obviously.  lol

you won't get a compile error until you go to compile a runtime that is using construct_audited_runtime!

Integration tests exist, so this cannot work.  I'll remark that profiling exists before you suggest #[not(cfg(feature = "debug"))] so that'll never work either.
We should simply write a log file of audit violations, and leave the log file empty if no violations, so then deployment tooling can fail if the log file exists.
A non-default "enable audit checks" features almost works.  We'd warn to only enable via --features never Cargo.toml, but surely fools would keep enabling in Cargo.toml anyways, and breaking the whole workflow for themselves and others.
Aside form being atrocious dev experience, a "disable audit checks" feature obviously cannot work because any create could silently disable it for the whole build.

@burdges thanks for spelling this out, I have a much clearer picture now!
In that case, I think it would be quite reasonable to have deployment tooling fail if a log file indicating auditing failures exists. Do you know where approximately in the deployment code a good injection point might be for this? I'm not familiar with the deployment machinery.

I donno, but let's see what others more involved with the code and process say.  I just wanted to make it really clear that pushing the actual check to late in the packaging/deployment pipeline makes the most sense from a security point of view too.  :)


perfect-scrollbar is not hiding the native scroll when "overflow: hidde" style is applied on the container

Could you fork one of these JSFiddles and demonstrate the issue?

This may be the CSS issue, as hiding the native scrollbar for overflow: hidden is done by the browser, not PS. Please check if the style is applied well with DevTools.
I close this by inactivity, but if you have further question, please feel free to ask.


windowcontrols/hide-close is missing buttons completely

Expected: minimize, maximize, and close button apparent. A recent update on steam seemed to break it.
Omitting windowcontrols/hide-close leaves the X button there like normal.

hide-close is supposed to hide the close button. Other buttons are already hidden by default. The bug here is that it should also override the right margin.
Perhaps this extra should be called hide-all to make it more obvious.

ah oops, I realized my mistake. I was messing with the text in the document diagnosing steam skin breakage one day.
windowcontrols/right-all is what I had intended to put there.


abapgit v1.37.7 Syntax errors with SAP_ABA 702

Hi,
minimum requirement for abap git is 702. I´m working on such a system and there are two syntax errors in the program along with component version 702.

class lcl_http, method is_local_system: invalid line
lcl_exit=>get_instance( )->change_local_host( changing ct_hosts = lt_list ).
changed to:
data instance type ref to lif_exit.
instance = lcl_exit=>get_instance( ).
instance->change_local_host( changing ct_hosts = lt_list ).
class ltcl_html_action_utils, method _hex_to_char: invalid line
cl_abap_conv_in_ce=>create( )->convert( EXPORTING input = i_x IMPORTING data = r_s ).
changed to:
data instance type ref to cl_abap_conv_in_ce.
instance = cl_abap_conv_in_ce=>create( ).
instance->convert( exporting input = i_x importing data  = r_s ).

Sorry for not providing a patch for this. I´m still having issues setting this up.
Regards

thanks, only a few of us have access to 702 systems, so sometimes downporting is needed

try again, latest version

closing


bug: XML number buttons crash Basalt

Describe the bug
When using buttons in XML, if the text is set to only numbers, Basalt crashes. This bug only happens when you create buttons via XML.
If the text field has any non-numeric character the bug doesn't happen.
To Reproduce
Steps to reproduce the behavior:

Create a XML layout with a button with the text "123"
Add this layout to a frame.
Run.
Crash.

Expected behavior
It should just show the numbers, as it does when you programmatically create a button.
Checklist
[x] I am running the latest version.
Tick the box if you are running the latest version!

Helloo! I think it's fixed now. Thank you very much for the report.


WIP - Abstraction

NOT READY TO MERGE
An attempt to make "installation builder" and "test runner" containers that each contain a piece of the existing Docker Compose configuration along with some scripting.
Currently, implementing #7, #20, and #21 would require a combinatoric explosion in the amount of Docker Compose configuration required. Hopefully this PR will solve that problem.

Let me know when you want me to look at this.


Request: add minuteInterval prop

minuteInterval has been added to  @react-native-community/datetimepicker.
Can we add it too? :)

@spyshower hey! What's stopping you from already using this prop with react-native-modal-datetime-picker? We are passing down to the community picker all the additional props specified on this component 😮

@mmazzarolo Thanks for the quick response! I have been trying to do so for the last hour with no luck. Turns out it's still not working when using @react-native-community/datetimepicker instead so I guess it's an issue with that library, not this one!


pychef cannot find libeay32.dll on Windows

This is installing into a "standalone" Python install (as contrasted with Cygwin).
>scripts\pip install pychef
...
>python -m chef
Traceback (most recent call last):
  File "C:\Python35\lib\runpy.py", line 151, in _run_module_as_main

    mod_name, mod_spec, code = _get_module_details(mod_name)
  File "C:\Python35\lib\runpy.py", line 118, in _get_module_details

    return _get_module_details(pkg_main_name)
  File "C:\Python35\lib\runpy.py", line 104, in _get_module_details

    spec = importlib.util.find_spec(mod_name)
  File "C:\Python35\lib\importlib\util.py", line 88, in find_spec
    parent = __import__(parent_name, fromlist=['__path__'])
  File "C:\Python35\lib\site-packages\chef\__init__.py", line 5, in
 <module>
    from chef.api import ChefAPI, autoconfigure
  File "C:\Python35\lib\site-packages\chef\api.py", line 17, in <mo
dule>
    from chef.rsa import Key
  File "C:\Python35\lib\site-packages\chef\rsa.py", line 6, in <mod
ule>
    _eay = CDLL('libeay32.dll')
  File "C:\Python35\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

The workaround is to copy Git\mingw64\bin\libeay32.dll into %PYTHON_HOME%

Or add that folder to your PATH so it can find the DLL. What variant of OpenSSL does the 3.5 for Windows installer use?

Oh, it might be libeay64.dll now that we have 64-bit on Windows working correctly.

I couldn't find a good OpenSSL installer to download ... And yes, Git runs https/ssh protocols using the libeay64.dll. I will continue to exercise this tomorrow.
Would you consider updating the install to deliver libeay64.dll for Windows installs?
Thanks

Python includes OpenSSL already as part of its TLS support. I don't have a Windows machine handy to look at which DLLs it specifically has for 3.5 though, so you need to do that (or someone else).

And no, I can't redistribute an OpenSSL Windows binary inside a pure-Python package, I think @dstufft's raw horror might kill me on the spot.

That wouldn't work well :)
The Windows files are at:
https://www.python.org/ftp/python/3.5.1/python-3.5.1-embed-win32.zip
It is not clear to me which one contains OpenSSL ...

Now I'm seeing InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html   InsecureRequestWarning)
I tried to override (for now) by setting api.ssl_verify = False, but it didn't take effect ...

https://github.com/coderanger/pychef/pull/49

I looked in to this a bit last weekend. Apparently I just hallucinated that Python distributes libeay32.dll because as far as I could find, they never did.

Does this mean that pychef is not supported on Windows? I've tried to copy the libeay32.dll from git/mingw64/ but that doesn't solve the issue.
Is this project abandoned?

To get pychef to work on Windows for me, I downloaded the SSL libraries from http://indy.fulgan.com/SSL/ and put them into the system32 directory.

Seeing this on Windows 10 and Python 3.8:
Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import chef
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Micheal\Projects\Tools\Public\Python\chef-pillage\venv\lib\site-packages\chef\__init__.py", line 5, in <module>
    from chef.api import ChefAPI, autoconfigure
  File "C:\Users\Micheal\Projects\Tools\Public\Python\chef-pillage\venv\lib\site-packages\chef\api.py", line 17, in <module>
    from chef.rsa import Key
  File "C:\Users\Micheal\Projects\Tools\Public\Python\chef-pillage\venv\lib\site-packages\chef\rsa.py", line 6, in <module>
    _eay = CDLL('libeay32.dll')
  File "C:\Users\Micheal\AppData\Local\Programs\Python\Python38\lib\ctypes\__init__.py", line 373, in __init__
    self._handle = _dlopen(self._name, mode)
FileNotFoundError: Could not find module 'libeay32.dll'. Try using the full path with constructor syntax.


Added support for the slovenian language

Adding support for the slovenian language
This pull request includes a

[ ] Bug fix
[ ] New feature
[x] Translation

The following changes were made: /
If this is related to an existing ticket, include a link to it as well.

Closing this as Slovene/Slovenian is already supported (see https://github.com/select2/select2/commit/8e6422c570a87da8d89c45daf0d253695a943c84).  Also, be aware that the language code for Slovenian is sl, not si.


Remove unnecessary Default impl

Closes #29.

@homu r+

:pushpin: Commit 68c16d2 has been approved by indiv0

:hourglass: Testing commit 68c16d2 with merge 6636de7...

Coverage remained the same at 100.0% when pulling 68c16d2df4e9d13d5298162c06edf918246fd758 on patch-29 into 27add11411fdaba425445bae09ab1cc839fb5223 on master.

:sunny: Test successful - status


feat: Add DefaultAuthenticationSchemes option

Fixes #21

@thoraj Could you review this PR？

I'm not sure I have enough knowledge about how casbin-aspnetcore is architected, or the underlying frameworks, to provide any feedback of value by just inspected the code.
I think perhaps the best way I can contribute is to test if, and how, changes will work in our project. Is there a way I can consume a package with these changes?

@Sagilio plz make a release so @thoraj can help on testing it.