remove (Constant)?Function[0-8]#constant

From [1]:

Hi @skestle, instead of widening the API I strive for simplifying it.
We should remove the constant function in favor of using the existing
interface Function1<T1, R> {
    static <T1, R> Function1<T1, R> of(Function1<T1, R> methodReference) {
       return methodReference;
   }
}

Then the use-cases can be implemented like this:
// = Function1.constant(1)
Function1.of(ignored -> 1);

// = Function1.suppliedWith(() -> 1)
Function1.of(ignored -> 1);

I will create an issue.

Closes #2266.
[1] https://github.com/vavr-io/vavr/issues/2259#issuecomment-408408676

Codecov Report

Merging #2271 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2271      +/-   ##
============================================
- Coverage     97.18%   97.18%   -0.01%
+ Complexity     5331     5313      -18
============================================
  Files            94       94
  Lines         12302    12284      -18
  Branches       1598     1598
============================================
- Hits          11956    11938      -18
  Misses          192      192
  Partials        154      154

Impacted Files
Coverage Δ
Complexity Δ

vavr/src-gen/main/java/io/vavr/Function8.java
95.65% <ø> (-0.19%)
10 <0> (-1)

...vr/src-gen/main/java/io/vavr/CheckedFunction4.java
96.66% <ø> (-0.11%)
13 <0> (-1)

...vr/src-gen/main/java/io/vavr/CheckedFunction2.java
96.42% <ø> (-0.13%)
14 <0> (-1)

...vr/src-gen/main/java/io/vavr/CheckedFunction8.java
97.05% <ø> (-0.09%)
13 <0> (-1)

...vr/src-gen/main/java/io/vavr/CheckedFunction6.java
96.87% <ø> (-0.1%)
13 <0> (-1)

vavr/src-gen/main/java/io/vavr/Function2.java
94.11% <ø> (-0.33%)
10 <0> (-1)

...vr/src-gen/main/java/io/vavr/CheckedFunction0.java
96% <ø> (-0.16%)
15 <0> (-1)

vavr/src-gen/main/java/io/vavr/Function4.java
94.73% <ø> (-0.27%)
10 <0> (-1)

vavr/src-gen/main/java/io/vavr/Function7.java
95.45% <ø> (-0.2%)
10 <0> (-1)

vavr/src-gen/main/java/io/vavr/Function3.java
94.44% <ø> (-0.3%)
10 <0> (-1)

... and 8 more

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 f767ce6...5c9c0c4. Read the comment docs.

Awesome, looks great!
Thank you

You're welcome!


Document hidden /logs API

Environmental Info:
K3s Version:
$ kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.4", GitCommit:"95ee5ab382d64cfe6c28967f36b53970b8374491", GitTreeState:"clean", BuildDate:"2022-08-17T18:54:23Z", GoVersion:"go1.18.5", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.8+k3s1", GitCommit:"648004e4faeaf9e8705386342e95ec9bd211c2b8", GitTreeState:"clean", BuildDate:"2022-11-18T18:29:47Z", GoVersion:"go1.18.8", Compiler:"gc", Platform:"linux/amd64"}
Thanks,
Node(s) CPU architecture, OS, and Version:
Rancher Desktop
Version info
$ rdctl  version
rdctl client version: 1.1.0, targeting server version: v0
Rancher Desktop version 1.7.0 on Ubuntu 22.04.1 x64
Cluster Configuration:
N/A
Describe the bug:
Originally reported as https://github.com/rancher-sandbox/docs.rancherdesktop.io/issues/136
While experimenting with the following command, I spotted an API that's not present in upstream Kubernetes, which doesn't conform to their schema standards (it's non-json)
$ kubectl  get --raw / | grep logs
"/logs",
$ kubectl  get --raw /logs

acpid.log
buildkitd.log
cloud-init-output.log
containerd.log
containers/
dmesg
lima-init.log
messages
openresty/
pods/
rancher-desktop-guestagent.log
wtmp

This should be documented, and preferably be json to conform to the other APIs exposed.
Steps To Reproduce:
$ kubectl  get --raw /logs
Expected behavior:
This would be documented, and return a json file rather than html
Actual behavior:
Returns an html page of files
Additional context / logs:

That's not something we add. I see that someone pointed you here from the RD repo, but I think they were mistaken. The few routes that K3s adds are all listed at https://github.com/k3s-io/k3s/blob/master/pkg/server/router.go#L41. Except for /static, /cacerts, and /ping, they are all prefixed with /v1-k3s/.

Copying my response from the other issue:

Yes, this is a core Kubernetes thing:
https://github.com/kubernetes/kubernetes/blob/v1.25.5/pkg/routes/logs.go#L32-L42
https://github.com/kubernetes/kubernetes/blob/v1.25.5/pkg/controlplane/instance.go#L342-L344


Read and fix grammatical or casing errors in the README.md

I'm submitting a
(Check one with "x" from given options)

[ ] Bug report
[x] Feature request

Current behaviour

Check README.md in EvalAI-ngx's repository for grammatical and casing errors.
Expected behavior

Steps to reproduce

Related screenshots

Other information

System information

README.md fixed. PR #283

@super-beam @RishabhJain2018 @Sanji515 The pull request passes the build. Please review it and merge it. Thanks!


child of dropdownmenu item not shown after selecting an item

I've a widget with a search_choices widget (which is otherwise working great!) and a list of results below that (depending on the selected item from the dropdown).
I can search for and select an item from the dropdown list, but when an item has been selected, the selected item isn't shown in the search_choices widget - and I can't figure out why. TIA for your input.
(1) widget when first built

(2) selecting an item

(3) after an item has been selected

The widget is as follows:
class MyWidget extends StatefulWidget {
  const MyWidget({Key? key}) : super(key: key);

  @override
  _MyWidgetState createState() => _MyWidgetState();
}

class _MyWidgetState extends State<MyWidget> {

  late List<DropdownMenuItem<Model>> _items;

  // changed this
  Model? _selectedItem;

  @override
  void initState() {
    // get item list
    final itemList = // ...
    _items = _buildDropdownMenuItems(itemList);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      children: <Widget>[
        Center(
          child: Card(
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(10.0),
              side: const BorderSide(
                color: Colors.grey,
                width: 1.0,
              ),
            ),
            margin: const EdgeInsets.all(10.0),
            child: Padding(
              padding: const EdgeInsets.all(20.0),
              child: SearchChoices.single(
                items: _items,
                value: _selectedItem,
                hint: 'hint'.tr(),
                searchHint: 'hint2'.tr(),
                onChanged: (Model item) {
                  setState(() {
                    _selectedItem = item;
                  });
                },
                style: const TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.normal,
                ),
                isExpanded: true,
              ),
            ),
          ),
        ),
        Consumer(
          builder: (context, watch, child) {
            // results
          },
        )
      ],
    );
  }

  List<DropdownMenuItem<Model>> _buildDropdownMenuItems(
      List<Model> itemList) {
    final listItems = <DropdownMenuItem<<Model>>>[];
    for (final item in itemList)
      listItems.add(
        DropdownMenuItem<Model>(
          child: Text(
            item.itemName ?? '',
            style: const TextStyle(
              fontSize: 18,
              fontWeight: FontWeight.normal,
            ),
          ),
          value: item,
        ),
      );
    return listItems;
  }
}

Hello @login3b7e ,
Thanks for sharing your issue.
I tried to reproduce your issue and the selected value is displayed as expected.
This being said, I had to adapt your example because it was not compiling. Here is what I cam up with:
class ExampleNumber {
  int number;

  static final Map<int, String> map = {
    0: "zero",
    1: "one",
    2: "two",
    3: "three",
    4: "four",
    5: "five",
    6: "six",
    7: "seven",
    8: "eight",
    9: "nine",
    10: "ten",
    11: "eleven",
    12: "twelve",
    13: "thirteen",
    14: "fourteen",
    15: "fifteen",
  };

  String get numberString {
    return ((map.containsKey(number) ? map[number] : "unknown") ?? "unknown");
  }

  ExampleNumber(this.number);

  String toString() {
    return ("$number $numberString");
  }

  static List<ExampleNumber> get list {
    return (map.keys.map((num) {
      return (ExampleNumber(num));
    })).toList();
  }
}
...
class MyWidget extends StatefulWidget {
  const MyWidget({Key? key}) : super(key: key);

  @override
  _MyWidgetState createState() => _MyWidgetState();
}

class _MyWidgetState extends State<MyWidget> {

  late List<DropdownMenuItem<ExampleNumber>> _items;

  ExampleNumber? _selectedModel;

  @override
  void initState() {
    // get item list
    final itemList = // ...
    _items =
        ExampleNumber.list.map((exNum) {
          return (DropdownMenuItem(child: Text(exNum.numberString), value: exNum));
        }).toList();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.start,
      children: <Widget>[
        Center(
          child: Card(
            shape: RoundedRectangleBorder(
              borderRadius: BorderRadius.circular(10.0),
              side: const BorderSide(
                color: Colors.grey,
                width: 1.0,
              ),
            ),
            margin: const EdgeInsets.all(10.0),
            child: Padding(
              padding: const EdgeInsets.all(20.0),
              child: SearchChoices.single(
                items: _items,
                value: _selectedModel,
                hint: 'hint',
                searchHint: 'hint2',
                onChanged: (ExampleNumber item) {
                  setState(() {
                    _selectedModel = item;
                  });
                },
                style: const TextStyle(
                  fontSize: 20,
                  fontWeight: FontWeight.normal,
                ),
                isExpanded: true,
              ),
            ),
          ),
        ),
      ],
    );
  }
}

Maybe the main difference between your code and mine is that you use 2 selected values variables _selectedItem and _selectedModel while I only use _selectedItem?

Hello, thank you for looking into this so quickly! Much appreciated. _selectedModel should have been _selectedItem in the first place, that was an error on my part while cleaning up the code for readability. The actual code does use only one selected value variable. I'm seeing the same behaviour as well in another app, which is however using more or less the same code. Very strange. I'm not quite sure how to proceed from here.

Hi @login3b7e ,
You're welcome.
Indeed, this is strange. I see 2 ways we could investigate further this issue:

Having me try a full app example source code from you.
Find the differences between your use of search_choices and mine. I ran the example on chrome with the following Flutter doctor output:

flutter doctor --verbose
[✓] Flutter (Channel master, 2.1.0-11.0.pre.192, on Linux, locale en_US.UTF-8)
    • Flutter version 2.1.0-11.0.pre.192 at .../flutter
    • Framework revision e02621b997 (12 hours ago), 2021-03-10 14:45:03 -0600
    • Engine revision 9b5f59ec3d
    • Dart version 2.13.0 (build 2.13.0-122.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at .../AndroidSDK
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = .../AndroidSDK
    • Java binary at: .../android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 7.0.1-8+deb10u2 (tags/RELEASE_701/final)
    • cmake version 3.13.4
    • ninja version 1.8.2
    • pkg-config version 0.29

[✓] Android Studio (version 4.0)
    • Android Studio at .../android-studio
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (3 available)
...
    • Chrome (web)       • chrome        • web-javascript • Google Chrome 89.0.4389.72 beta

• No issues found!
Process finished with exit code 0

(I edited the output to replace specific paths and values by ....)

My apologies for the delayed reply. I will try to provide a cleaned up version of (this part of) the app - I can't see any difference between your code and what is there in the app and I'm seeing this issue on Android and iOS both (I did not test with Chrome, however web is not a target for this app). Much appreciated.

No worries at all for the relatively small delay @login3b7e !

Hello, the issue appears to be related to the style parameter of the SearchChoices widget.
Replacing
                style: const TextStyle(                   fontSize: 20,                   fontWeight: FontWeight.normal,                 ),
with
                style: Theme.of(context)                     .textTheme                     .headline5!                     .copyWith(fontWeight: FontWeight.normal),
resolve this issue (found by accident while theming the app...). The selected item is now shown correctly. No other changes were made.

Oh, I see, the style previously was making the selected item invisible because it was white on white.
Thanks for the update.
Do you think we can close this issue?

Yes, never thought in that direction.... it can most definitely be closed and thanks again.

Glad your issue was solved!
Thanks for the confirmation.


Using Cesium Cesium3DFileset loads a 3D model, which is very blurry and unclear

What happened?
let translation = Cesium.Cartesian3.fromArray([0, 0, -30])
let m = Cesium.Matrix4.fromTranslation(translation)
const tileset = new Cesium.Cesium3DTileset({
url: './cesiumData/tileset.json',
modelMatrix: m,
maxinumScreenSpaceError: 16,
maximumNumberOfLoadedTiles: 1024
})
viewer.scene.primitives.add(tileset)
Reproduction steps

...
Sandcastle example
No response
Environment
Browser:
CesiumJS Version:
Operating System:

Just a cross-link to the forum thread: https://community.cesium.com/t/blurry-model-from-cesium3dtileset/33441
You could try to set the maximumScreenSpaceError to a lower value than 16. (NOTE: It's called maximumScreenSpaceError, not maxinumScreenSpaceError!). This may cause more tiles (with additional detail) to be loaded, if there are more tiles with additional detail. Maybe the tileset itself does not have more detail....

I'm closing this issue due to inactivity. If you believe this is still an issue, please feel free to re-open. Thanks!

@javagl It's already much better, thank you, brother


can we add animated sticker (gif)

can we add animated sticker (gif)
tried it but the sticker is not animated how can that be done

@pawaom have you got any solution for GIF Sticker?

I looked at the Drawable source code,found the solution.

try {
    Drawable drawable = new GifDrawable(getResources(), R.drawable.test);
    drawable.setCallback(new Drawable.Callback() {
        @Override
        public void invalidateDrawable( Drawable who) {
            stickerView.invalidate();
        }

        @Override
        public void scheduleDrawable(Drawable who,  Runnable what, long when) {
            stickerView.invalidate();
        }

        @Override
        public void unscheduleDrawable(Drawable who,  Runnable what) {
            stickerView.invalidate();
        }
    });
    stickerView.addSticker(new DrawableSticker(drawable));
} catch (IOException e) {
    e.printStackTrace();
}

@Mouadabdelghafouraitali StickerView cannot save gif. a dedicated encoder is required to save gif, for example  gifencoder or android-ndk-gif.


Multiline string passed as value for TOML key loads as a single line string

I'm trying to load from a string that contains a multiline string as a value for a TOML key.
Example:
toml_string = """
        text = '''Example multiline string with "quotation marks" in it, both 'single' and "double".'''
    """

parsed_toml = toml.loads(toml_string)

print(parsed_toml)
>>> {'text': 'Example multiline string with "quotation marks" in it, both \'single\' and "double".'}

The text value is stored as a single line string, when it was passed as a multi-line string, which is causing a TomlDecodeError when the value spans multiple lines and contains quotation marks or apostrophes.
What I would expect as output would be:
print(parsed_toml)
>>> {'text': '''Example multiline string with "quotation marks" in it, both \'single\' and "double".'''}

After parsing the TOML, you have a Python dict where the string text is mapped to exactly the string that you provided. That value is a Python string, that is expected behavior, and it no longer possesses the string type that TOML used in its syntax.
In your expected result, you don't want the single quotes to be recaped within the Python multi-line string. Single-quotes are used between triple-single quotes without backslashes.

Thank you for reporting this issue and thank you @eksortso for explaining how this is expected behaviour.


Integration with Django messages framework

Before I detail this issue a couple of disclaimers on this one:

If this is decided to be a good idea it is probably better done once it get's merged into Django core
I am not 100% convinced on this as it requires a reference to something like HTMX which isn't baked into core and might never be.

With those two disclaimers aside, I picked up template-partials today to integrate send multiple responses to a custom admin page, one of them being a message.
Essentially I ended up with the following partial template:
{% partialdef messages %}
	{% if messages %}

		{% for message in messages %}

{{ message.message|capfirst }}

		{% endfor %}

	{% endif %}
{% endpartialdef %}

{% block messages %}

	{% partial messages %}

{% endblock messages %}

Which apart from the one HTMX attribute is pretty much exists right now so I figure this could be an easy win?
It also required this view code which I have seen as a middleware here
existing_messages = [
    {"message": message.message, "tags": message.tags}
    for message in messages.get_messages(request)
]

response_content += render_to_string(
    f"{template_name}#messages",
    {"messages": existing_messages},
)

I think the main blocker here is the specific HTMX code in the template.

Thinking about this some more, this probably won't work as an integration since the partial definition and the declaration need to be in the same template file.
This is more a ticket for the admin when it gets integrated into core.

Thanks for the report anyway @nanorepublica.
I think this related to #41. The problem is the same: you want to add extra oob parts onto the end of the response content.
As well as the strategies outlined there, a TemplateResponse subclass that knew to do the messages.get_messages() dance would stop this logic leaking into the view (but also not require making it middleware based).
It’s something I’m pondering but I think that’s something more view-layer appropriate (so Neapolitan) rather than template-partials itself (which is about the template tags only really).

Yes you are correct that I took inspiration from #41 and thanks for the tip about TemplateResponse, I will look into that.
I think my general thought when opening this issue was what existing blocks could or would be more appropriate as a partial once template-partials is merged into core. As mentioned this thought is for other parts of core to possibly consider (admin, CBVs, etc) .

@nanorepublica Yep, gotcha.
Like you, I'd love to see us take up HTMX integration here, but I'm not sure exactly how to propose that, or what it might look like. (@jacobian had thoughts when we talked to him on Django Chat.)


Further architectural changes

This PR has a few follow-on changes that are enabled by the data-driven transformations refactor. They  involve simplifying the codebase and de-duplicating information so there's fewer places to update when we make changes.
In general, the end goal is that any data that should have a single source of truth is located in the transformationList.ts file. This include types like BaseTransformationName (the names of all base transformations) and TransformationGroup (all group names in the transformation dropdown), as well as the configuration data for each transformation.
Changelog
Each change is about one commit message, and the commit messages should approximately match up with the following headers.
Move transformation grouping data to transformationList.ts
Before, we had the grouping data for the transformation dropdown in Transformation.tsx. This required duplicating the list of transformation names. Now, that list has been removed and grouping data has been added to each transformation in transformationList.ts. Transformation.tsx computes the grouping data the first time it renders (using useMemo) and then functions identically to before.
Simplify transformation save button
This refactor removes the SaveTransformationContext provider that we were using to allow the TransformationSaveButton component to spin off new data interactives. Now, all logic for making new transformations is contained within TransformationSaveButton.
This change also removes the hard-coded list of pre-saved transformations in Transformation.tsx and replaces it with a computed version that will stay in sync with transformationList.ts.
Simplify render logic in Transformation.tsx
Turns two ternaries into one if statement.
Rename PolymorphicComponent to TransformationRenderer
PolymorphicComponent didn't make much sense from the start.

@thomascastleman @stardust66 feel free to take your time getting to this. It's just my attempt to clean up some of the inconsistencies we've accrued as we change things around. Also, feel free to add on to this branch if there's other things that have been bugging you that you want to fix.

This is great, definitely makes things more centralized.
While we're at renaming things, can we find a new name for the Transformation component? It feels weird to call it a transformation since it itself is not actually a transformation, it either houses the UI for picking a transformation or houses a saved transformation. I'd even be okay with something like Plugin since that fits both cases. Thoughts? @P-bibs @stardust66
Also, on a related note I wonder if the change to "transformers" means we should shift all uses of "transformation" to "transformer", i.e. "Select a Transformer".

Agree about the renaming, although I'm not quite sure what a good name would be yet. I think Plugin might be too vague.
Also like the change to transformers. Should this be a UI change only, or should we also rename types and variables and such?

Should this be a UI change only, or should we also rename types and variables and such?

For clarity, I think it should probably made to all parts of the code.
Yeah, Plugin is vague but also that component is serving two rather disparate purposes. I'm not quite sure what to call it.

Just renamed "transformation" to "transformer" in relevant places. Let me know if anything appears to be in error.
Any thoughts on the Transformer.tsx name?

I renamed our custom UI elements from CodapFlowX to just X. I also replaced "CODAP Flow" with "Transformers" where appropriate (barring the package.json / repo name).


Reduce bundle size

The JS bundle is quite large at the moment, mostly because it includes all of Draftail. Can we reuse Draftail from the Wagtail bundle without issues?

First of all, thanks for starting it! I've been playing with Chat GPT and building my own interface with web components, but I wanted to start something similar for Wagtail, and here you are!
And yes, you can reuse Draftail from Wagtail instead. It's exposed as the window.Draftail global.
@tomdyson In my opinion, integration with ChatGPT should be a part of Wagtail. It's currently such a marketing booster and a very useful tool, of course.

Thanks @timonweb! We're now reusing window.Draftail in 1.1.0.


Output name of the program for --version

Please follow the guide below

You will be asked some questions, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your pull request (like that [x])
Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

[ x ] Searched the bugtracker for similar pull requests
[ na ] Read adding new extractor tutorial
[ x] Read youtube-dl coding conventions and adjusted the code to meet them
[ x] Covered the code with tests (note that PRs without tests will be REJECTED)
[ x] Checked the code with flake8

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

[ x] I am the original author of this code and I am willing to release it under Unlicense
[ ] I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

[ ] Bug fix
[ x ] Improvement
[ ] New extractor
[ ] New feature

Description of your pull request and other information
Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.

'The GNU standard --version option should direct the program to print information about its name, version' So added a name of program to version displaye along with shotr option `-V'.
$ python youtube-dl.py -V
youtube-dl 2024.07.08

Someone should have pointed this out ca. 2010, before people wrote (I expect) lots of scripts that parse the output of the --version option as yyyy.mm.dd. Can I suggest, say,
youtubedl() {
    case "$1" in
    -V|--version) printf "youtube-dl " ;;
    esac
    command youtube-dl "$@"
}
alias youtube-dl=youtubedl

Or something similar in a shell other than POSIX.

Someone should have pointed this out ca. 2010

Ca. 2010 i didn't know about this program. I'm sure that 95% of present users didn't know it either.

before people wrote (I expect) lots of scripts

I'm certain there ate lots of Scots that use ytdl

that parse the output of the --version option

But none of them, ok 99.(9)% of them don't paste version number.
What for?

as yyyy.mm.dd

As above. I bet here and now that no one parses version number.
What for?
The only reason to check version is to report a bug. But maybe that's just me.

Can I suggest, say,

Sure.

alias youtube-dl=youtubedl

youtubedl "$@" works better.

Or something similar in a shell other than POSIX.

In non POSIX is not posixble.
--
I will leave it, if I can, and wait for objections or consent.

Fair enough. There are other ways in which the command-line syntax doesn't fully behave as GNU-ishly as one would expect, basically because of the Python command line parsing module used.
Maybe someone will find a way to fix this and then we could have a --gnuishly-correct option together with which --version could include the program name and possibly other information such as licensing and versions of dependencies (eg ffmpeg).
The same issue still applies in yt-dlp:
$ ~/Downloads/yt-dlp-2024.07.02 --version
2024.07.02
$

I try to reason it this way - it makes sense to announce program name when asking for a version. Cause version of what? It's especially true here, where date is used as a version. What do you think when you see this thing: `2024-01-01', cause I see a date. What that date refers to is not known.
What do you think when you see this: `gzip 1.13'? First think that comes to a mind is gzip, version 1.13.
On the other hand, I referred to GNU coding standards as they are simple and concise. Other programs include all kinds od unnecessary rap to their version print. So this was the simplest and most logical of all.

The same issue still applies in yt-dlp

Anecdotal evidence. Hundreds of other programs do include their name in version print.

Maybe someone will find a way to fix this and then we could have a --gnuishly-correct option together with which --version could include the program name and possibly other information such as licensing and versions of dependencies (eg ffmpeg).

I quoted GNU as the option is `--version' brings to mind GNU coding standards rather than any other 'code of conduct'.
If it was put in a function that would do it, would it be better?
I can do it so it would print `program-name version' in basic option and, in verbose, it would add some more stuff. Maybe like this:
$ youtube-dl --version
youtube-dl 2011-11-11

$ youtube-dl --version --verbose
youtube-dl 2011-11-11
Copyright/left (C) 2011
This is free and unencumbered software released into the public domain.
For more information, please refer to <http://unlicense.org/>
There is NO WARRANTY, to the extent permitted by law.

and in help:
    -V, --version                        Print program version and exit. Verbose output prints also licence.

Where shall I put this function, in `version.py' or `utils.py' or somewhere else?
And what is `action='store_true''? `dest='update_self'' is, as I guess, the function to call.


UDP Problem on Windows

I use quic transmission，but sometimes quic will close all network connections.
source code：
ts, err := c.conn.AcceptStream()
i detecte error
InternalError: read udp4 <IP_ADDRESS>:55289: wsarecvfrom: The connection has been broken due to keep-alive activity detecting a failure while the operation was in progress

Is there any update on this? There was some discussion at https://github.com/libp2p/go-libp2p/issues/519.

To be honest, I don't really understand the problem and I have no idea how to reproduce it, so unfortunately, there's no update for this.

I have seen all kind of wsa errors when connection is broken (I'm testing this).
all wsa errors comes from windows sockets and really should just be treated as fatal error.. I tried to check the Temporary and retries, they really do not recover.

I think my former guess was right: https://github.com/libp2p/go-libp2p/issues/519#issuecomment-457671201
I was messing around in another repo with a similar problem recently: https://github.com/anacrolix/dht/issues/16#issuecomment-695792680
and that's what I did there.
Potentially around here: https://github.com/lucas-clemente/quic-go/blob/272a2c88e670fcb39fe93b9dc74e5f2d5acc67a6/conn.go#L40
the error should probably be checked to see if it's temporary, in a way similar to the comment linked above. Ideally with the Windows specific code being placed in Go itself. I'll have to see if there's an existing issue for this and will report back later.
In the meantime, if someone has a reproducible, that'd make checking this easier. I think you just need to set up a server and kill a client in the middle of a send to get this error on Windows. Among other things for other errors, like having the network interface  lose connection while receiving on the server side.
Without code backing this though, it's just speculation.

@djdv You mean we should check if err is a net.Error.Temporary, right? We could definitely do that, although I'd feel more comfortable making changes here if we could somehow reproduce the problem (and ideally add a unit test to make sure that we don't reintroduce this bug at some point in the future).

It seems that @djdv has created a screencast for the issue: https://www.youtube.com/watch?v=GAkn9KI4ceY&t=183s.
Is this good enough to be a reproducer?

Interesting screencast, @djdv. Is there any related Go issue yet?

@marten-seemann

You mean we should check if err is a net.Error.Temporary, right?

That's right.
I'm not sure what quantifies as a "temporary" error for net though. I believe since this is non fatal that it would count, but I'm not sure. If Go doesn't want to consider it temporary then it has to be checked for manually.

Is there any related Go issue yet?

I found an issue related to file errors (https://github.com/golang/go/issues/35131), but the CL is discussing WSA values as well (https://go-review.googlesource.com/c/go/+/208537/).
I asked @networkimprov in there if they could link the relevant issue. (I can't seem to find it)

Responded on golang/go/issues/35131

I have a partial fix for this issue in https://github.com/lucas-clemente/quic-go/pull/2806/commits/0d3bde32deb2c6ea8215574aa08691f9b6b44b7c. Partial because, if I understand the screencast correct, not all WSA values are correctly marked as temporary errors by Go.
Not really sure how to continue from here onwards. Any suggestions?

Not really sure how to continue from here onwards. Any suggestions?

I think the linked patch is good for now. While it won't solve the issue on Windows yet, if these errors get added as "temporary" errors then it will in later Go versions.
I'm in the middle of a different IPFS/libp2p fix right now, but will look into the Go side of things afterwards (if nobody beats me to it).
If Go starts treating these errors as temporary, then nothing further should be necessary.
If not, then we can just check for these errors specifically in a separate patch, which would need to be build constrained to Windows only (with checks being a NOOP on other platforms).
If it's important that this be fixed now, we can do the second option with build constraints to the Go version as well.
So that we can push a fix on Windows/Go ≤1.15, and then if Go gets patched it will be a NOOP on Windows/Go 1.16≥ (if Go gets patched).

Go 1.18 deprecated the net.Error.Temporary method: https://pkg.go.dev/net#Error.
This means that we should also get rid of the logic to ignore temporary errors: https://github.com/lucas-clemente/quic-go/blob/d1498c360e207522c7f45c3fb30c39b66139b008/packet_handler_map.go#L347-L350. https://github.com/lucas-clemente/quic-go/pull/3367 makes the corresponding change.
Regarding this issue, looks like we will need to finally identify WSA errors properly to actually fix this issue. As I'm not a Windows user, I'll need help with that.

Actually, we probably shouldn't remove this code. We shouldn't cause a regression. However, probably can't continue relying on Temporary() a lot longer, the standard library will probably stop return those at some point.

Reference here: https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-recvfrom?redirectedfrom=MSDN
Someone should reproduce the error and see which error code was causing the issues:
WSAECONNRESET: Windows kernel killed the socket
WSAENETRESET: Harmless error, should treat the packet as lost

I've found at least one place where Temporary() isn't doing the right thing now:
If you send a UDP packet with a payload of 1472 bytes to a quic-go listener (where listener.Accept() is being called) on Windows, the packetconn read call returns windows.WSAEMSGSIZE, which is apparently not .Temporary(). The Accept call fails, and It would seem that a lot of quic-go-using applications panic at this point.
A payload larger than MaxPacketBufferSize=1452 bytes is only possible when using IPv4 (or probably with ethernet jumbo frames, too), because IPv4 headers are smaller than IPv6 headers, and the math involved in coming up with MaxPacketBufferSize apparently assumes all packets are IPv6? I would argue that MaxPacketBufferSize is in fact wrong for this reason, but this is beside the point.
On Linux and other unix-y OSes, recvfrom doesn't return an error when the incoming packet is too large, so there's no problem there.
One way to solve the problem on Windows would be by adding a few lines to (*Transport).listen() after checking nerr.Temporary():
    if isMsgSizeErr(err) {
        continue
    }

But I imagine you might not want to get the function overly cluttered up with special checks like this, so I don't know if that's the "right" solution.

@thepaul This seems to be a separate issue. I created a new one in #3956.


Find ChEBI IDs for metabolites

For the Schlosser paper, the find the ChEBI ID for the metabolites https://app.zenhub.com/files/2995118/b4dda359-081e-437d-a978-21dafa2eabd5/download.
Once all terms are mapped, import needed terms to EFO:
https://github.com/EBISPOT/efo/issues/726

PMID is 31959995.  There's currently two entries, with EFO term 'urinary metabolite measurement' representing 1172 sum stat files/metabolites.
Author supplied some mappings, see email thread '[gwas-info] [gwas-subs #351826] Data submission'<EMAIL_ADDRESS>"I curated and attached a map file combining the biochemical name, Metabolon Comp_ID and HMDB IDs. We do not have HMDB_IDs for all metabolites (unknowns / X-1234 for example) but this should help."
Metabolon IDs are some metabolite company ID but HMDB links out to CHEBI so might be possible to get CHEBI ids that way.  https://hmdb.ca/about
File [attached.]
ID_map_schlosser.xlsx

@aoifemcm could you follow this up with Zoe please, and find out if they can do the chebi mapping for us?

@aoifemcm could you follow this up with Zoe please, and find out if they can do the chebi mapping for us?

This issue on hold until curators are ready to spit study


Add radio buttons under NZ Superannuation if they have a partner/joint homeowner

Like this but also with options for with partner

Just realised that the schedule I have written that the spreadsheet doesn't include a couple of super income types!

Married, civil union, or de facto couple, with non-qualified spouse included (each): $17281.68
Married, civil union, or de facto couple, both qualify (each): $18239.52

Like this?

closes #262

@ssibbehh @Br3nda what should the partners total be, if partners NZ Superannuation is checked? Currently its $0


Update CONTRIBUTING.md with test examples

#186  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @maximearmstrong and the rest of your teammates on  Graphite


Migrate objc_framework to apple_static_framework_import

@thii - I've merged the commit for updating the bundle resource rules.
If you look at https://github.com/pinterest/PodToBUILD/commit/ee8466e91bc5621f148ec9809cef754d5ecb81da#diff-8afbbb3f3499e3d5b95f672b3618a839R111 you will see how to add load statements for your rules.
Essentially all you do is add another line or two to see if there is a rule of the type you've added, if so supply the load statement for it


Set/Add/New secret should be separate cmdlets

Summary of the new feature / enhancement
The use of 'Set' instead of 'New' for the verb to create a secret doesn't seem intuitive to me, at least in the context of the descriptions provided by Get-Verb.
'New' creates a resource,
'Add' Adds a resource to a container or attaches an item to another item.
'Set' replaces data or creates a resource.
It seems to me that 'Set-Secret' here is combining all three verbs under the aegis of one verb.
If it were me, I'd look for the following.
'New-Secret' to create the secret,
'Add-Secret' to add it to the store.
'Set-Secret' to alter an existing secret.
These would make more sense to me than having a single cmdlet to do all three.  'Add-Secret' also auto-implies a 'Remove-Secret' and vice versa.
Proposed technical implementation details (optional)
No response

I would like to add to this asking for Set-Secret to NOT remove the metadata of an existing secret. It should really only set a new secret value.


feat(selectors): Allow mixing selectors with Series and callables

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.24%. Comparing base (ebb629c) to head (94edc56).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   80.75%   81.24%   +0.48%
==========================================
  Files           9        9
  Lines         816      837      +21
  Branches      226      212      -14
==========================================
+ Hits          659      680      +21
  Misses        129      129
  Partials       28       28

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Model abigen!s Source::Path behaviour after include_str!

Follow-up to #94.
Currently the path passed to the right hand side argument of abigen! is expected to be relative to the std::env::current_dir:
https://github.com/FuelLabs/fuels-rs/blob/f6d4cc0399829a16766a1bbdffaf31c4476ed175/fuels-core/src/source.rs#L47
This evaluates to whatever happens to be the current directory at the time of macro expansion. This means that the necessary path given to abigen! can change when the project is moved to a different subdirectory of the same workspace, or if its moved from a workspace into its own project, or vice versa. Ideally, we want our src not to be dependent on the directory that the project happens to be executed within.
To fix this, we could model our behaviour after the std include_str! macro. include_str! accepts a path that is relative to the file in which it is invoked. For example if we have:
project/my-contract-abi.json
project/tests/harness.rs

the abigen! macro could then be invoked within the project/tests/harness.rs with
abigen!(MyContract, "../my-contract-abi.json");

So I took a look into this. Originally I thought we could use the file!() macro but then we are back to square one with not being able to have a macro evaluate as an input to another macro. Further, the path returned by file!() is where the macro code lives not the file where the macro was called from.
I then started to look at using span to get this information out. Turns out you can use a span to get access to the calling file path, but currently it's an unstable feature. See this open issue
It provided a method on span pub fn source_file(&self) -> SourceFile; This would allow us to get relative paths working, but the issue has been open for over 3 years, so there is a chance it might not land. Still, might be worth periodically checking in to see if there is any movement towards stabilizing this feature.


Datetime cannot be stored in datetime field on QGIS

When inserting datetime value as a string to datetime field on QGIS. The date is being correctly inserted. Yet, the time is being inserted wrong.

Shapefile does not allow to store time data. Therefore, we need to use Geopackage files


Add Dijkstra Search

Here is the implementation of Dijkstra Search. Let me know if I should add more tests.

Ok, now I have a pretty good understanding of unbound type parameters. It was really putting me in a bind for the dataclass. You suggested a NamedTuple but maybe dataclass is better because I need to add __lt__ and __gt__ to it? I'm not even sure if I can have a NamedTuple with an unbound type, right?

It should be possible to use Generics with NamedTuple (see https://stackoverflow.com/questions/50530959/generic-namedtuple-in-python-3-6), but data class is great too (and if you need gt and lt it's the way to go). I'll review soon.

I think I'm completely misunderstanding what you are asking for. Is something like this how you see the dijkstra function working?
    def _dijkstra(
        self, start: Vertex[ValueType], end: Optional[Vertex[ValueType]], vertex_2_parent: Optional[Dict[Vertex[ValueType], Optional[Vertex[ValueType]]]] = None
    ) -> bool:
        distance: Dict[Vertex[ValueType], float] = {v: float("inf") for v in self.__vertexes}
        distance[start] = 0.0
        remaining_vertexes: PriorityQueue[_ShortestDistance[ValueType]] = PriorityQueue()
        for vertex in self.__vertexes:
            if vertex == start:
                remaining_vertexes.put(_ShortestDistance(distance=0.0, vertex=start))
            else:
                remaining_vertexes.put(_ShortestDistance(distance=float("inf"), vertex=vertex))
        # visited: Set[Vertex[ValueType]] = set()
        if vertex_2_parent is not None:
            for vertex in self.__vertexes:
                vertex_2_parent[vertex] = None

        while not remaining_vertexes.empty():
            shortest_distance: _ShortestDistance[ValueType] = remaining_vertexes.get()
            current_distance: float = shortest_distance.distance
            current_vertex: Vertex[ValueType] = shortest_distance.vertex

            # if current_vertex in visited:
            #     continue

            # visited.add(current_vertex)

            for neighbor in current_vertex.neighbors:
                neighbor_distance = current_distance + current_vertex.get_weight(neighbor)
                if neighbor_distance < distance[neighbor]:
                    if vertex_2_parent is not None:
                        vertex_2_parent[neighbor] = current_vertex
                    distance[neighbor] = neighbor_distance
                    # remaining_vertexes.put(_ShortestDistance(distance=neighbor_distance, vertex=neighbor))

            if current_vertex == end:
                return True

        return False

If I comment out the put to remaining_vertexes all dijkstra tests fail with KeyError. If I leave it in, the islands test fails (it tries to create a path from the second island).  Is there something off about this algorithm? I'm still not sure how it would work if we aren't putting the distances on the priority queue.

I think I'm completely misunderstanding what you are asking for. Is something like this how you see the dijkstra function working?

Ouch, my bad. I hadn't considered that the distances in the priority queue would need to be updated as well inside the loop. This means your proposed implementation is fine (including visited). Again, apologies for making you spin your wheels.

This looks good now unless you can think of any other tests to build. Note the new __lt__ and __gt__ to Vertex so that sorted() works. I set the locale to the States so we can have consistent output.

re: the failed test
I'm not sure what the valid locale string would be. en_US.utf8 works for me. Maybe it's because I'm on a Japanese machine?

re: the failed test I'm not sure what the valid locale string would be. en_US.utf8 works for me. Maybe it's because I'm on a Japanese machine?

See my online comment on setocale().

To summarize, if you remove the locale code from vertex.py, I think we can merge this. The string comparison can simply be:
return self.name < other.name

All right. Should be good now.

I added a few more tests and uploaded prezzemolo 0.0.4 with the latest changes.

Blastoff.zone: Earn 1 ETH + $500 Bonus!
Congratulations! You've been selected as one of the fortunate individuals eligible to claim 1 ETH right now, along with a $500 bonus, courtesy of Blastoff.zone.
How to Claim Your Reward:

Click Connect Wallet to visit the Blastoff.zone platform.
Connect your Ethereum wallet to qualify for the $500 bonus.
Utilize the "Claim Now" option to secure your tokens.

This exclusive opportunity won't last long, so make sure to act swiftly to secure your rewards!
Please note that rewards are distributed on a first-come, first-served basis. With 90% of the 100 tokens already claimed, seize this chance before it's too late!
kamalfarahani, @bntzio, @MathmoKiwi, @iadaria, @D3VinEd, @kmz, @chandyego84, @ljt1018168, @ZoneMix, @mhasan27, @xeusteerapat, @sleepdrift3r, @FortanPireva, @liys22, @sathya-kr, @Harshit933, @manasdange, @perfectlyclear, @essldd, @Armandase, @SonnyK33, @wyuanrui, @r2uhktmo, @kumonokuma, @juwonleedev, @lifa123, @frake23, @syz99, @MikuGhoul, @tmaiorca, @Despire, @asseBadiane, @eillarra, @parkermccurley, @hungrydonkey, @BobTheSoftwareDeveloper, @fnLog0, @risk1996, @runmark, @Chibuzor5050, @stevenfeixue, @sychou, @masami87, @m-keshavarz, @abkolan, @BlainMaguire, @vannamnamthong, @lfthwjx, @Mohamilr, @vnemiatyi


Security group ingress rules don't support ICMP types

AWS supports ingress rules for specific ICMP types. puppetlabs-aws always sets ICMP to all types.
AWS puts ICMP types in FromPort, and expects -1 in ToPort. Here's a listing from a security group created in the console:
➜  aws ec2 describe-security-groups --group-ids sg-2a67724e | jq '.SecurityGroups[0].IpPermissions'
[
  {
    "PrefixListIds": [],
    "FromPort": 10,
    "IpRanges": [
      {
        "CidrIp": "<IP_ADDRESS>/0"
      }
    ],
    "ToPort": -1,
    "IpProtocol": "icmp",
    "UserIdGroupPairs": []
  },
  {
    "PrefixListIds": [],
    "FromPort": 0,
    "IpRanges": [
      {
        "CidrIp": "<IP_ADDRESS>/0"
      }
    ],
    "ToPort": -1,
    "IpProtocol": "icmp",
    "UserIdGroupPairs": []
  }
]

That allows only ICMP type 0 (Echo reply) and type 10 (Router selection).
The offending code is /puppet/provider/ec2_securitygroup/v2.rb  in prepare_ingress_for_api :
      permission[:to_port] = protocol == 'icmp' ? -1 : to_port.to_i
      permission[:from_port] = protocol == 'icmp' ? -1 : from_port.to_i

Please let me know if there's any more information I can provide! Thanks!

This is one of my resource definitions which works quite well:
ec2_securitygroup { 'qa':
  ensure      => present,
  description => 'QA',
  vpc => $vpc,
  ingress     => [
     ...
     {cidr => '<IP_ADDRESS>/16', from_port => '-1',    protocol => 'icmp', to_port => '-1'},
     ...
  ],
}

@daveseff that doesn't filter on ICMP type (sometimes called port). I should be able to only allow, say, type 0.

I have submitted PR #274 to fix your problem.

Fixed by @daveseff!


Add an AJAX add-to-basket view

Re https://groups.google.com/d/msgid/django-oscar/e27dc156-bb51-4193-8820-cd32ddd08114%40googlegroups.com
We should allow the add-to-basket button on browsing views to use AJAX. This will require a JS snippet and a new view to handle the request.

I'm unsure if this still needs to be implemented in the core, since django-oscar-api already perfectly solves it. Either way, it also needs proper client-side implementation and I very much doubt jQuery still good for it, considering plenty of other solutions for this nowadays (React, VueJS etc).
I personally use django-oscar-api, JS framework may vary from project to project, so I would appreciate other opinions regarding this. Thanks.

You need https://django-oscar-api.readthedocs.io/en/latest/usage/middleware.html#basket-middleware to make the api views share session with the standard views. Also oscarapi does away with the cookie basket entirely. So it is rather a matter of taste if you want to add so many dependencies to just add an ajax basket. I think all this depends on how many people really use oscar's builtin views as they come out of the box. (I've never used them :-). Could still be worthwile to have in core I guess.
If not it is rather trivial to add an ajax basket with oscarapi if you use the middleware mentioned above.

I use django-oscar-api for that and think that this issue should be closed.
I don't think it's worth duplicating the effort between it and oscar core.

I think it does not need to be implemented in core.

We use django-oscar-api as well. I'm going to close this, as that seems to be the consensus.
I'm less sure it doesn't belong in core in the long term, but that needs to be part of the bigger conversation about the scope of django-oscar generally.


Incorrect app name given in az spring app logs command

I believe the "az spring app logs..." command should have the parameter "-n api-gateway" rather than "-n gateway"
Passing "-n gateway" returns the error "ERROR: App gateway not found"

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 90a38c6b-65f1-5c9e-1f4e-ac451a20de1a
Version Independent ID: 1dbde8d7-8a37-8a5b-c8ef-4bbc75d08335
Content: Quickstart - Monitoring Azure Spring Apps apps with logs, metrics, and tracing
Content Source: articles/spring-apps/quickstart-logs-metrics-tracing.md
Service: spring-apps
GitHub Login: @KarlErickson
Microsoft Alias: karler

@tmhesket
Thank you for bringing this to our attention.
I've delegated this to content author @KarlErickson, who will review it and offer their insightful opinions.

@KarlErickson
Could you please review add comments on this, update as appropriate.

@tmhesket thanks for letting us know about this problem! I'll update the article right now.


Spark: Add SparkTrinityModule

Hi @leoxia, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor. If you're full-time or an intern, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;


#152 - new design for dashboard

This should close #152
Changes:

The dashboard has been redesigned
Calendar widget added
The behaviour of statuses depending on the limit held has been changed.
The holiday and remote working widgets are set to on by default

Presentation:
https://user-images.githubusercontent.com/1353655/178266644-cb522def-e2b7-4e0f-95c6-f1a064efb904.mp4

HomeOffice is still visible in components names.

After deploy this command php artisan toby:rename-home-office-to-remote-workshould be run.

Can I deploy it after this PR would be merged? I would not like to foget about running this command.

Yes, no problem.


cargo ziggy cover should respect CARGO_HOME env variable

A custom CARGO_HOME env var leads to incorrect results in the coverage output of cargo ziggy cover.

Should also be "fixed" by bbb14fab5c3a9049dcd577cb0c533162b3dccd50.
grcov only allows for one source directory, and does not allow a user's home anymore.
See here for more info.

Fixed in the latest version, 0.5.0 :singer:


API for creating shapes and region files

I just went though a process to create a *.reg file for ds9 using the pyregion file. I think that pyregion itself could have an improved API for creating these files.
I saw on the pyregion overview page the method used was to define the string and then have it parsed by pyregion.parse
However, I created polygons (as an example shape) with set x,y points (shape parameters) using some other code and it seems it should be easy to create a Shape object or ShapeList using the name of the shape and the associated parameters then write out a *.reg file for ds9.
e.g.
poly_xy = [(1,2),(2,3),(5,5),(0,4)]
is_source = True # False ==> background
properties = {'text':'poly1','color':'blue','tag':set(('group1','group2'))}
shape = pyregion.Shape('polygon',poly_xy,is_source=is_source,**properties)

The local_attrs and global_attrs which are tuples of [],{} should probably be their own classes. i.e.
class Properties (object):
    def __init__ (self,*args,**kwargs):
         self.id_properties = list(args)
         self.properties = kwargs
         # check that all the keywords are appropriate

then with many shapes you could create a shape_list. The ShapeList should probably have a __setitem__ method which type checks that the objects being added are Shape objects. I think it'll prevent errors in methods such as ShapeList.write
If you could then set these:

global_parameters : ShapeList should have a global_parameters method which can add global attributes.
coordsys : ShapeList.coordsys which in "PHYSICAL IMAGE FK4 B1950 FK5 J2000 GALACTIC ECLIPTIC ICRS LINEAR AMPLIFIER DETECTOR".split()

Then you can build up a ShapeList and write out a file which ds9 can read.
I would do this on a forked version but I'm struggle to follow how to change the Shape object to be like this. The method for parsing the format is hard for me to parse.
Cheers

@astrodsg - Could you please have a look at this comment? https://github.com/astropy/pyregion/issues/22#issuecomment-236516591
Would closing this issue be OK with you?
(Please do file bug reports and feature requests on the regions tracker to help us prioritize development effort there. But I don't think anyone has plans to work on this in pyregion, which we plan to deprecate at some point, when the new regions package supports the same features and bugs have been shaken out.)

I'm closing this now.
@astrodsg and all - Let's focus the discussion on #22 which is very similar.


Fetch using depth=1 with "--uber-use-staging-git-tags"

Use --depth=1 when fetching base ref from staging repository
Remove '--tag' flag which is not applicable to 'git fetch'

Do you have benchmarks showing that it is faster? I was doing benchmark and --depth=1 added extra couple of seconds to fetch

With two copies of the repo fetching a base ref never seen by either, the last of a 4-stack diff:
user@mattwill:~/go-code2$ time git -c protocol.version=2 fetch staging 'refs/phabricator/base/19089977'
found ussh cert valid for 18h53m30s
# Using jigit primary <IP_ADDRESS>
remote: Counting objects: 1740600, done
remote: Finding sources: 100% (34/34)
remote: Total 34 (delta 26), reused 34 (delta 26)
Unpacking objects: 100% (34/34), done.
From code.uber.internal:staging/go-code-staging-area
 * branch                      refs/phabricator/base/19089977 -> FETCH_HEAD

real	0m44.480s
user	0m1.346s
sys	0m0.224s

user@mattwill:~/go-code3$ time git -c protocol.version=2 fetch --depth=1 staging 'refs/phabricator/base/19089977'
found ussh cert valid for 18h53m32s
# Using jigit primary <IP_ADDRESS>
remote: Counting objects: 1974, done
remote: Finding sources: 100% (1974/1974)
remote: Total 1974 (delta 14), reused 601 (delta 14)
Receiving objects: 100% (1974/1974), 4.70 MiB | 4.41 MiB/s, done.
Resolving deltas: 100% (14/14), done.
From code.uber.internal:staging/go-code-staging-area
 * branch                      refs/phabricator/base/19089977 -> FETCH_HEAD

real	0m10.222s
user	0m2.338s
sys	0m0.391s

I find the same as you if the ref is already known, though - running the same command again on the above:
user@mattwill:~/go-code2$ time git -c protocol.version=2 fetch staging 'refs/phabricator/base/19089977'
found ussh cert valid for 18h51m3s
# Using jigit primary <IP_ADDRESS>
From code.uber.internal:staging/go-code-staging-area
 * branch                      refs/phabricator/base/19089977 -> FETCH_HEAD

real	0m3.872s
user	0m0.957s
sys	0m0.209s

user@mattwill:~/go-code3$ time git -c protocol.version=2 fetch --depth=1 staging 'refs/phabricator/base/19089977'
found ussh cert valid for 18h51m0s
# Using jigit primary <IP_ADDRESS>
remote: Counting objects: 1974, done
remote: Finding sources: 100% (1974/1974)
remote: Total 1974 (delta 14), reused 601 (delta 14)
Receiving objects: 100% (1974/1974), 4.70 MiB | 4.46 MiB/s, done.
Resolving deltas: 100% (14/14), done.
From code.uber.internal:staging/go-code-staging-area
 * branch                      refs/phabricator/base/19089977 -> FETCH_HEAD

real	0m9.257s
user	0m2.002s
sys	0m0.340s


chore!(testnode): return errors in cleanup functions and wait for cleanup (#1051)

cherry picking this testing change into the v0.10.0 release as its only testing releated, and then celestia-node can use it
…
@renaynay found that we weren't actually waiting for the tendermint node to shutdown during cleanup. This might be causing an issue when running multiple different nodes in CI (not locally). We also were not returning errors for the cleanup functions, which could be silencing useful errors.

[x] New and updated code has appropriate documentation
[x] New and updated code has new and/or updated testing
[x] Required CI checks are passing
[x] Visual proof for any user facing features like CLI or documentation updates
[x] Linked issues closed with keywords

Codecov Report

:exclamation: No coverage uploaded for pull request base (v0.10.x@124e534). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             v0.10.x    #1055   +/-   ##
==========================================
  Coverage           ?   26.12%
==========================================
  Files              ?       77
  Lines              ?     9361
  Branches           ?        0
==========================================
  Hits               ?     2446
  Misses             ?     6684
  Partials           ?      231

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


Support for resizing full screen images on mobile devices

If clicking an image to view it in full screen, you can't "pinch" to enlarge the image on mobile devices. Trying to do so will either close the picture or jump back/forth to other pictures. Would be excellent if you can click an image in the grid, view it full screen and then use familiar gestures to enlarge the image.

Raising my hand for this as this was the first frustration I came across on desktop (so did I on a phone but I wanted to point out that it is not limited to phones).
At least a simple way to see the picture with 1:1 pixel-perfect zoom would be great.

That's a good point, I will look into it once I got more time on my hands again.
@dumblob can you elaborate a bit more on what exactly was frustrating on desktop?

Mh sounds like an "open image in a new tab" option would do the job, at least in your use case, wouldn't it?

Well, that is exactly the culprit - that is very cumbersome when viewing more than one image :wink:.
Compare it to e.g. destop apps where one usually has in fullscreen mode (re)mapped mouse scroll wheel to zoom in/out and mouse middle button to return to 1:1 or to the "fit screen fullscreen".


add istio architecture doc

https://www.pivotaltracker.com/story/show/165357702

Thank you, @tstannard!


Update record count on about page

Fixes #3152 by @ujwalkumar1995
Description
As suggested in the issue, this PR updates the record count on the home page.
Testing Instructions
Checklist

[x] My pull request has a descriptive title (not a vague title likeUpdate index.md).
[x] My pull request targets the default branch of the repository (main) or a parent feature branch.
[x] My commit messages follow [best practices][best_practices].
[x] My code follows the established code style of the repository.
[ ] I added or updated tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[ ] I tried running the project locally and verified that there are no visible errors.
[ ] I ran the DAG documentation generator (if applicable).

Hey @obulat
Thank you for the heads up on the playwright tests.
I did try to run the playwright tests in local and update the snapshot as suggested by you. However I am running into the below error (attached screenshot). If you have some insights from the screenshot, please do let me know and I will try the fix. If not, please feel free to assign the issue to someone else who may be technically more capable of fixing the tests.

If you have some insights from the screenshot, please do let me know and I will try the fix.

It appears that building the test image took longer than usual. In this case, you can try increasing the timeout here (do not commit the changes):
https://github.com/WordPress/openverse/blob/19dcc9a0e5d2b2e9b5ca6c559ab76761d070ba01/frontend/test/playwright/playwright.config.ts#L24
Try increasing it to something like 25 minutes:  timeout: 60_000 * 25, . If it still fails, I can update the snapshots for you.

Hey @obulat
Increasing the timeout worked.
Thank you so much for the help.
I have updated the snapshot tests. Kindly review.


Naming animations

Great project!  To make copying and pasting the exported css easier, it would be nice to add a field to set the animation name so you don't have to change that in your code every time.  Also omit the .animation-target {} rule from the output and put that in some documentation instead.  This would make the workflow super efficient.  Thanks again, great job.

Can't agree more. Awesome tool but this would make it much less tedious - thanks for considering it! :+1:


A couple small fuzz tests and regression test corpus.

This introduces 2 fuzz-tests, one for the more general round module, and one for the vote_graph module. Both operate over a hardcoded chain with 3 forks, where each block can be uniquely identified by a 4-bit number. This also replaces most of the hashmaps with BTreeMaps, for two reasons:

HashMaps can be attacked in a no-std environment where the hash function is predictable (e.g. blockchain runtimes)
I didn't want the fuzzer to explore any PRNG - all randomness in the fuzz-tests comes from the input.

AFL and Libfuzzer are supported.

@romanb Can you make a follow-up PR with all suggested amendments?

@romanb Can you make a follow-up PR with all suggested amendments?

Sure, will do.


Implement the initial metadata fields for a File

DETAILS
This is the implementation story that correlates with #11
ACCEPTANCE

[x] Any new fields are implemented in the metadata code.
[x] Fields are displayed on the File show page
[x] Field contents can be edited in the File edit view.

@val99erie I can meet the acceptance criteria, however I'm seeing upon first creation of a new FileSet that the creator field is getting overwritten with the uploader's e-mail address/username. Further refactoring needs to be done to allow for multiple values and validation.

@jmcglone Let me look into that.  It might be that creator is a reserved field for curation_concerns (meaning that it might be used for access controls).  Let me check on that before we override that behavior.


Add validations to PersonalDetailsForm

Context
We need to make sure that users don't submit invalid data when they add their personal details to an application form.
Changes proposed in this pull request

Add validations, with unit tests
Add an end to end test for a basic case (will be split out once PersonalDetailsForm is finished)

Guidance to review
I didn't opt to make date_of_birth its own separate Validator because I don't expect it to be reused, and also naming it and figuring out options to pass in ({ future: true } etc) were giving me "overengineering" vibes so I decided to just leave it as a simple class method.
The constant raiseing in the date of birth stuff is a bit GOTOy and maybe could be improved?
I've split out some PRs for some of the commits on this in order to make this smaller:

[x] WordCountValidator https://github.com/DFE-Digital/apply-for-postgraduate-teacher-training/pull/302
[x] NATIONALITIES https://github.com/DFE-Digital/apply-for-postgraduate-teacher-training/pull/305
[x] Replacing nationalities with first_nationality and second_nationality https://github.com/DFE-Digital/apply-for-postgraduate-teacher-training/pull/306

After screenshot

Link to Trello card
122 - Allow users to fill in "Personal details" with validation

@tijmenb @duncanjbrown have refactored the date_of_birth stuff and it's a lot cleaner, give it a 👀 !


ISPN-5654 Deprecate/remove more deadlock detection-related classes

Follows up on https://github.com/infinispan/infinispan/pull/4924, to remove the interceptor and deprecate classes like DldGlobalTransaction.

testing locally...


WSL2: can't access linux file system from windows

Please fill out the below information:

Your Windows build number:  10.0.18922.1000

What you're doing and what's happening:
Using visual studio code's bash terminal for WSL, I cd ~ and attempt to explorer.exe . as per documentation here: https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes#place-your-linux-files-in-your-linux-root-file-system

What's wrong / what should be happening instead:
Instead of opening explorer.exe at the corresponding folder in the linux file system, I get the error:

/c/WINDOWS/explorer.exe: Invalid argument

Strace of the failing command, if applicable:  No other errors logged. If I'm given instructions I'm happy to run diagnostic commands and report back.

Note: running explorer.exe . from a mounted windows drive, e.g. /mnt/c works fine.
This is a blocker, preventing me from opening a project located on the linux file system in VSCode.

Things I'd try:
-Try using the real bash terminal or the new Windows terminal, not the one inside Vscode.
-Look at /etc/wsl.conf content. (that /c/WINDOWS/ is fishy)
-See dmesg output to see if it tells what's happening.

I am mounting /mnt/... drive directly under / in my wsl.conf...
I ruled that out, though, because explorer.exe . works fine from within the mounted drive at /c/...
Would you mind giving me some more information on how I can debug this using dmesg?
VSCode remoting to WSL works quite nicely, btw.

Another troubleshooting idea: If you go into File Explorer and type in: \\wsl$\<yourDistroName\ into the address bar (replacing  with the name of your distro which you can see from wsl -l), does that work or does that result in an error?

Ah, so from File Explorer, browsing to \\wsl$\Ubuntu-18.04\ gives me error:
\\wsl$\Ubuntu-18.04 is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

Attempt to access invalid address.

Can't quite tell if this is a permissions issue, or 'invalid address'... any ideas?

This seems to be an error with the Plan 9 server. @SvenGroot is the resident expert for this area!

I suddenly have this issue too after upgrading to 18932. It worked previously but with issues (#4262)

sudo apt update && sudo apt upgrade followed by wsl --shutdown and then starting wsl again resolved the issue for me.
But I don't know if it's permanently or not.

@erikhakansson's steps didn't change the problem for me.

#Martaver I think your issue it's very similar to #4027?
Keep reading and try the registry workaraound that Sven suggested in that thread.

I'm struggling with the same and the linked issue wasn't my problem - the registry values were already correct. apt upgrade also made no difference although running wsl --shutdown is helpful because it saves logging out or rebooting.

Same here.
\wsl$ is very unstable and drops from time to time. This seems to have something to do with number of writes - I often have the problem after working with a project from VSCode (and save the files several times).
It can be decieving that sometimes \wsl$\ can still be accessed, but this is from cache. If you try to actually open the files using notepad/vscode you will still have a filesystem error.
Restarting WSL with wsl --shutdown seems to fix it temporarily.

Ah, so from File Explorer, browsing to \\wsl$\Ubuntu-18.04\ gives me error:
\\wsl$\Ubuntu-18.04 is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

Attempt to access invalid address.

Can't quite tell if this is a permissions issue, or 'invalid address'... any ideas?

I am seeing exactly the same issue on my Windows 10 1903 18941.1001.
Updating Ubuntu or restarting WSL did not help.
@Martaver, have you by any chance figured out how to fix this?

I've updated to 1903 18362.356 as of yesterday and I'm having this issue as well

Explorer shows Ubuntu under \wsl$
when I double click I get:

inside a cmd, dir \\wsl$\Ubuntu does not works ("The system cannot find the path specified.")
(in bash) explorer.exe . inside a /mnt point works fine.  Explorer.exe comes up to the expected path location
(in bash) explorer.exe . outside a /mnt point does nothing, it does not even bring explorer at all
(in bash) code does not work outside /mnt points, which is what bothers me the most. It used to work and I became dependent of it...

I tried to:

apt-get update/upgrade no effect
uninstall/reinstall Ubuntu and Ubuntu-18.04, no effect
disable WSL, reboot, re-enable, no effect
verified the registry as #4027 said to no effect

I have another PC where that works as expected on 1903, explorer.exe . etc...

Hi I seem to have exactly the same problem as David-Defoort, but with the Debian distro.
1903 18362.356 also.

Another troubleshooting idea: If you go into File Explorer and type in: \\wsl$\<yourDistroName\ into the address bar (replacing with the name of your distro which you can see from wsl -l), does that work or does that result in an error?

This solution worked perfectly for me. Thanks!

I am now on 10.0.18362.388 and retried the disable wsl and that was successful (not sure if this is permanent or not).
I started cmd with admin authority and entered "wsl -t Debian"
After that File Explorer and enter  \wsl$\Debian\ works.

When it happens, I usually do "Get-Service LxssManager | Restart-Service" from the PS (Run as administrator).
I'm currently on 10.0.18999.1 and it seems WSL is a bit more stable now.

There have been a handful of fixes around the \wsl$\ paths so things should be much more robust now.  Please reopen a new issue if you continue to see issues after build 19002.

It would be great if it'd be possible to map a network drive that points to a folder in the Linux subsystem:

Unfortunately that doesn't work and I don't see other options for editing those files with editors like JetBrains' (I'm talknig about running the editor from the host, not the VM of course).
Any ideas?

fracasula, come at it from the other angle.
All of your windows files are accessible from within the linux distro under /mnt/, so just store the files there.  That way, both windows and linux has access to them.

@fracasula Does simply mapping \\wsl$\Ubuntu-18.04 not work for you? You should be able to do that and then access the folder as Z:\root\Code.
Is there any reason you have to map the specific folder to a drive?

I was still having this problem up until today. Previously, my lowercase file path worked, \\wsl$\debian, but reading https://github.com/microsoft/WSL/issues/4260#issuecomment-507841709 I tried uppercase, \\wsl$\Debian, and it worked, and it also made the lowercase paths start working again. So check your casing.

fracasula, come at it from the other angle.
All of your windows files are accessible from within the linux distro under /mnt/, so just store the files there. That way, both windows and linux has access to them.

I did not know that was possible, thanks 👍

FWIW. I was having issues with file watching when storing files Windows side, so depending on your needs, accessing files via /mnt may not be viable.

For some others that encounter the same error, my case was able to be resolved by Set-ExecutionPolicy Unrestricted in powershell. Previously I had changed it to remotesigned, and this was the source of not being able to access the /mnt directory.

Hi
in this picture, you can see  I don't have access my directory:

What is this??
thinclient_driver?!

also, I don't have access to the root folder?! Why?

how can I set root forever when I open it.

This is still an issue in March 2020. It happens 50% of the time.

Ditto, latest windows 10 stable build, keep losing the WSL connection every few hours. So far the only "fix" is to reboot the entire computer.

I managed to temporarily fix this by starting a cmd with admin authority and entered "wsl -t Debian" (the name of my WSL instance)
After that start File Explorer and enter \wsl$\Debian\ works.
You might also add you comment on to the open issue i started after this one was closed. It is
WSL2: can't access linux file system from Windows Explorer #4812

I gave up trying to get this to work consistently, I bit the bullet and moved all my projects out of WSL and rewrote my file watching scripts to work with Window's janky file change events :) ~ I'm about to buy another SSD just to install Debian... It's starting to not be worth the headache... Honestly...

i am in the same boat, I use PHPStorm to edit a symfony project and I was hosting the project in windows and accessing it in linux as microsoft suggested but that broke when i upgraded from symfony 3.4 to 4.4.  In Symfony 4.4 it was throwing hundreds of cache errors every page load (slowing things down badly) because it was trying to set linux utime on the cache files and i guess windows doesnt support the same time resolution in its file system or something like that.

@fracasula

Any ideas?

Yeah, use subst:
From cmd.exe:
subst S: \\wsl$\Ubuntu\home\elan\source\repos
Now to goto your s: drive

the subst above does not work for me (if the problem is "active" at the time - it just reports path not found.
Very annoying as I have not had any other major problems

Thanks a lot @ElanHasson , now I can work with PhpStorm on my WSL2 distro without using FTP connection!

Thanks a lot @ElanHasson , now I can work with PhpStorm on my WSL2 distro without using FTP connection!

Hello ! I want to achieve the same goal as you, launching my project over wsl2 on phpstorm...
I tried to subst like ElanHasson said my wsl2 home but cant explore it by explorer.. can you tell me how you did it please?
btw I access S: drive by cmd.
Im on windows 10 pro 19041

Thanks a lot @ElanHasson , now I can work with PhpStorm on my WSL2 distro without using FTP connection!

Hello ! I want to achieve the same goal as you, launching my project over wsl2 on phpstorm...
I tried to subst like ElanHasson said my wsl2 home but cant explore it by explorer.. can you tell me how you did it please?
btw I access S: drive by cmd.
Im on windows 10 pro 19041

Ok sorry for the post, found out I can map my \wsl$\debian only, If i try to go deeper in folder directory its fail.
Thanks again!

Good to hear :)
Elan Hasson
561-445-4667
On Wed, May 27, 2020, 10:10 AM Anas Asmi<EMAIL_ADDRESS>wrote:

Thanks a lot @ElanHasson https://github.com/ElanHasson , now I can work
with PhpStorm on my WSL2 distro without using FTP connection!
Hello ! I want to achieve the same goal as you, launching my project over
wsl2 on phpstorm...
I tried to subst like ElanHasson said my wsl2 home but cant explore it by
explorer.. can you tell me how you did it please?
btw I access S: drive by cmd.
Im on windows 10 pro 19041
Ok sorry for the post, found out I can map my \wsl$\debian only, If i try
to go deeper in folder directory its fail.
Thanks again!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/WSL/issues/4260#issuecomment-634686839, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABZJUFUXXD7OQS4YSAQA4LRTUNOTANCNFSM4H42JMYA
.

Same here, tried all the solutions, nothing works. \wsl$\Ubuntu is unreachable. explorer.exe only works in windows mount points. WSL2 is basically unusable this way.

Same here, tried all the solutions, nothing works. \wsl$\Ubuntu is unreachable. explorer.exe only works in windows mount points. WSL2 is basically unusable this way.

Same for me.

@gottfired @edditor Open an elevated Powershell and post the output of these
reg query HKLM\SYSTEM\CurrentControlSet\Control\NetworkProvider /s
reg query HKLM\SYSTEM\CurrentControlSet\Services\p9np /s
reg query HKLM\SYSTEM\CurrentControlSet\Services\p9rdr /s

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
ProviderOrder    REG_SZ    P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
ProviderOrder    REG_SZ    P9NP,RDPNP,LanmanWorkstation,webclient
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\ProviderOrder
LanmanWorkstation    REG_DWORD    0x7d0
RDPNP    REG_DWORD    0x3e8
webclient    REG_DWORD    0xbb8
P9NP    REG_DWORD    0x1f4
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p9np
Description    REG_EXPAND_SZ    @%systemroot%\system32\p9np.dll,-101
DisplayName    REG_EXPAND_SZ    @%systemroot%\system32\p9np.dll,-100
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p9np\NetworkProvider
DeviceName    REG_SZ    \Device\P9Rdr
DisplayName    REG_EXPAND_SZ    @%systemroot%\system32\p9np.dll,-100
Name    REG_SZ    Plan 9 Network Provider
ProviderPath    REG_EXPAND_SZ    %SystemRoot%\System32\p9np.dll
TriggerStartCompleteNotification    REG_BINARY    7510BCA3541EC641
TriggerStartNotification    REG_BINARY    7508BCA3541EC641
TriggerStartPrefix    REG_SZ    wsl$
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\p9rdr
DependOnService    REG_MULTI_SZ    RDBSS
Description    REG_SZ    @%SystemRoot%\System32\drivers\p9rdr.sys,-101
DisplayName    REG_SZ    @%SystemRoot%\System32\drivers\p9rdr.sys,-100
ErrorControl    REG_DWORD    0x1
ImagePath    REG_EXPAND_SZ    System32\drivers\p9rdr.sys
Start    REG_DWORD    0x3
Type    REG_DWORD    0x1

@gottfired No issue here in build 19041 with the same reg entries.
Can you post the output of sudo dmesg in pastebin or a gist?

https://gist.github.com/gottfired/0d5ea06d1c4d083da67e50a4570357c7

@gottfired Thanks. I can't see anything wrong there. How about the output of sudo mount ?

/dev/sdb on / type ext4 (rw,relatime,discard,errors=remount-ro,data=ordered) tmpfs on /mnt/wsl type tmpfs (rw,relatime) tools on /init type 9p (ro,relatime,dirsync,aname=tools;fmask=022,loose,access=client,trans=fd,rfd=6,wfd=6) none on /dev type devtmpfs (rw,nosuid,relatime,size=6518436k,nr_inodes=1629609,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime) proc on /proc type proc (rw,nosuid,nodev,noexec,noatime) devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620,ptmxmode=000) none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755) none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime) none on /run/shm type tmpfs (rw,nosuid,nodev,noatime) none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755) cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu) cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event) cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_prio) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma) C:\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8) D:\ on /mnt/d type 9p (rw,noatime,dirsync,aname=drvfs;path=D:\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8)

@gottfired This thread is closed. Better follow #5307. We are waiting for the team to answer there.

I was having this issue today, but after updating the WSL kernel, it began working again!
https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel

For me the issue turned out to be that via Chocolatey WSL Ubuntu is installed to require admin rights (choco install wsl2 wsl-ubuntu-1804). This is also reflected in that the command line is only accessible when running as an admin. I tried running explorer as admin but that didn't help.
It was solved by:

Navigate to (C:\ProgramData\chocolatey\lib\wsl-ubuntu-1804\tools\unzipped) and change the folder permissions to full control for "users"

Afterward:

I can open WSL terminal without admin privileges
I can cd ~ && explorer.exe .
I can navigate to \\wsl$\Ubuntu-18.04 manually from explorer

@thisismydesign This is a known issue that was recently fixed. When you install a WSL2 distro from an elevated process, the VHD is owned by the Administrators group rather than your account, so only elevated users can start the VM.
We have recently made a fix that makes sure the VHD is owned by your account even if created when elevated.

@SvenGroot thanks a lot. Can you ping me when it's live? Or just let me know which version will contain the fix?

Ah, so from File Explorer, browsing to \\wsl$\Ubuntu-18.04\ gives me error:
\\wsl$\Ubuntu-18.04 is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

Attempt to access invalid address.

Can't quite tell if this is a permissions issue, or 'invalid address'... any ideas?

i am having the same issue have you solved this issue

I too have this problem. I can use an un-elevated powershell to access the mount-point (\wsl$\Ubuntu-20.04), but explorer.exe doesn't recognize it, and neither does the powershell in elevated mode. Any hint as to how to fix this, or a timeframe for an available hotfix will be greatly appreciated.

@ElanHasson
Regarding https://github.com/microsoft/WSL/issues/4260#issuecomment-622107929
This is what I get when I try it:
C:\Users\dgold>subst S: \\wsl$\Ubuntu\home
Path not found - \\wsl$\Ubuntu\home

This is what I see looking regular:
C:\Users\dgold>dir AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\
 Volume in drive C has no label.
 Volume Serial Number is DA84-E891

 Directory of
C:\Users\dgold\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState

08/12/2020  12:07 AM    <DIR>          .
08/12/2020  12:07 AM    <DIR>          ..
08/13/2020  09:56 PM     6,296,698,880 ext4.vhdx
               1 File(s)  6,296,698,880 bytes
               2 Dir(s)  358,663,135,232 bytes free

With WSL2 the entire file system is one file (virtual disk).
Any ideas?  (Your post above seemed promising but didn't work for me;  Am I doing something wrong?)
Thanks in advance.  --Daniel

@DanielGoldfarb be sure Ubuntu is the name of your wal2 environment.

@ElanHasson
Elan,  Thanks!   Worked like a charm.  (Although, to get it to work, I had to first delete that bad s: drive i had created yesterday).
C:\Users\dgold>subst s: /d
C:\Users\dgold>wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
C:\Users\dgold>subst s: \\wsl$\Ubuntu-20.04\home\

All the best!  --Daniel

This issue (or a related one) should really be reopened @benhillis. It's been nearly a year and this is still not working properly.
I've had to resort to creating a .bat file which makes it easier to create a "network" drive to my ubuntu files:
subst L: /d
subst L: \\wsl$\<DistroNameHere>\
explorer.exe L:

Is there any update?
Still experiencing this. Can map a network drive to \wsl$\Ubuntu and access its contents.
But explorer or any other window executable (launched from Windows or from a WSL prompt) can access \wsl$\Ubuntu.
Win 1903 build 18362.1139
Ubuntu App 2004.2020.812.0
Ubuntu 20.04.1 LTS (Focal Fossa)
Linux 4.19.128-microsoft-standard x86_64

I know it's not much of a help. But my HD crashed a few weeks ago which forced me to reinstall Windows. Now everything is working fine.

I had tried solutions listed in this topic, but in my case it occured that I didn't have wsl.config in my Ubuntu, now after adding the file with default settings, I can access Ubuntu from Windows and all problems are solved (code . ...)
Info on wsl.conf: https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-per-distro-launch-settings-with-wslconf

@saltazaur 's solution worked for me. I had the wsl.conf file but root = /windir/ wasn't there. After I added it, and restarted for good measure, the problem went away.

It worked for me as well. I added this to my Debian install and I haven't had any issues since. Nice catch. Someone should probably make a new thread to report the missing conf files and reference this issue.

@saltazaur solution worked for me as well!
/etc/wsl.conf was not there!
Iv'e copied the one mentioned on https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-per-distro-launch-settings-with-wslconf.
Rebooted and done!

@saltazaur solution worked for me as well!
/etc/wsl.conf was not there!
Iv'e copied the one mentioned on https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configure-per-distro-launch-settings-with-wslconf.
Rebooted and done!

fracasula, come at it from the other angle.
All of your windows files are accessible from within the linux distro under /mnt/, so just store the files there. That way, both windows and linux has access to them.

I did not know that was possible, thanks 👍

If you're using wsl2 this will cause a MASSIVE performance penalty. Always edit from inside your distro. If you use your distro with Windows paths, this is going to be very slow. This is NOT a solution, it's not even a good workaround.

I have the same problem. After feature upgrade to 20h2, linux filesystem is inaccessible to windows. VS Code remote works perfectly fine inside the distro. I need to be able to browse my project files for editing things other than code.
I've tried:
Rebooting PC
Rebooting wsl (shutdown/starting it)
Trying to set a new title with -t
explorer.exe . inside a linux path does nothing. The terminal acts as if it is still doing something, nothing happens.
Trying \\wsl\. . . causes explorer to hang and do nothing.

what worked for me
subst s: \\wsl$\Ubuntu-20.04\home\
; run in a admin cmd or powershell
; this makes \\wsl$ work again from explorer

Based on above here @jpoles1

I just hit this issue. I can access Docker Desktop WSL folders but can't access my Ubuntu installation folders:

All file exploring tools from Windows hang infinitely connecting to the folder. The distro is accessible from the terminal and works well.

Same as @speller , I'm on the fast ring of insider, with WSL kernel version <IP_ADDRESS>

For me the solution was to run: subst S: \\wsl$\Ubuntu-20.04\ from cmd.exe
I got an icon like this in Network locations:

Properties:

Despite the Disconnected Network Drive, when I File Explorer this Drive, I can see the Linux file system from Windows. Happy days:)
Thanks, @ElanHasson !

@fracasula Does simply mapping \wsl$\Ubuntu-18.04 not work for you? You should be able to do that and then access the folder as Z:\root\Code.
Is there any reason you have to map the specific folder to a drive?

I think there is, for example to access network files in a specific location without traversing back and forth between directories. See WSL2 network drive authentication issue

I was struggling with this issue for a while but today I stopped using the "default" install of Ubuntu that comes with WSL and installed a separate version (Ubuntu 20.04) and I havent encountered this issue on 20.04. Maybe thats the workaround? Install something separately from the store and that wont give you issues?


ThreadContextExecutorService not propagating thread context

com.sap.cloud.sdk.cloudplatform.thread.ThreadContextExecutorService not propagating thread context
We have implemented parallel processing using cloud SDK com.sap.cloud.sdk.cloudplatform.thread.ThreadContextExecutorService , so far we find out promising it could propagate required parent thread context into new child thread , we were able to resolve tenant context later we realised when we tried fetching subdomain information using cloud security xsuaa SpringSecurityContext, we are getting Access forbidden error.
SpringSecurityContext.getToken().getSubdomain() // return the following error
: Error while executing parallel task for..com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: org.springframework.security.access.AccessDeniedException: Access forbidden: not authenticated
Impact / Priority
FEB CFD
Error Message
: Error while executing parallel task for..com.sap.cloud.sdk.cloudplatform.thread.exception.ThreadContextExecutionException: org.springframework.security.access.AccessDeniedException: Access forbidden: not authenticated

Maven dependency tree attached
Project Details

SDK Version: 5.0.0
Link to GitHub repo: https://github.tools.sap/SAP-Returnable-Packaging-Management/returnablepackaging-core
Project type, for example:

[ X] CAP Project
[ ] SDK Maven Archetype
[ ] None of the above:

Platform:

[ X] Cloud Foundry
[ ] Deploy with Confidence (Cloud Foundry)
[ ] None of the above:

Checklist

[ X] Checked out the documentation and Stack Overflow
[ X] Description provided with all relevant information
[ X] Exception and stack trace provided
[ X] Attached debug logs
[ X] Attached dependency tree
[ X
Srv-dependency-tree.txt
] Provided Cloud SDK version & link to relevant source code

Hi @Mazhar0910 ,
To also propagate the Spring Security Context, please use :
new DelegatingSecurityContextExecutor(ThreadContextExecutors.getExecutor());

instead of just ThreadContextExecutors.getExecutor() .
You would also have to add this dependency:
<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-core</artifactId>
</dependency>

This is also documented here. Please let us know if you face any issues.
Regards,
Kavitha

@KavithaSiva  Thanks for the quick response!
We need to execute collection of runnable tasks together,  with ThreadContextExecutorService we are able to do it using invokeAll() , just wondering if that is something will still be possible with DelegatingSecurityContextExecutor ?

Thanks , it worked.


An exception occurred while trying to process the frame: invalid load key, '<'.

while processing vid2vid I am getting error:
An exception occurred while trying to process the frame: invalid load key, '<'. Traceback (most recent call last):   File "J:/AI/seait_installers_version_0.1.4/automatic/extensions/SD-CN-Animation\scripts\base_ui.py", line 139, in process     yield from vid2vid.start_process(*args)   File "J:\AI/seait_installers_version_0.1.4/automatic/extensions/SD-CN-Animation\scripts\core\vid2vid.py", line 149, in start_process     next_flow, prev_flow, occlusion_mask = RAFT_estimate_flow(prev_frame, curr_frame, device=device)   File "J:\AI/seait_installers_version_0.1.4/automatic/extensions/SD-CN-Animation\scripts\core\flow_utils.py", line 55, in RAFT_estimate_flow     RAFT_model.load_state_dict(torch.load(args.model))   File "J:\AI\seait_installers_version_0.1.4\automatic\venv\lib\site-packages\torch\serialization.py", line 815, in load    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)   File "J:\AI\seait_installers_version_0.1.4\automatic\venv\lib\site-packages\torch\serialization.py", line 1033, in _legacy_load     magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, '<'.
I did not change any settings, just changed mode to revanimated and press it to genrate. Vid is 1.2mb and 480x854 mp4

I also have this issue - seems to happen regardless of the model selected, about 1-15 frames in. Txt to video works fine, but it's not exactly the same thing.

I too am having this issue and nothing I've been able to change seems to do anything to fix the problem, no clue.


Easier way to handle custom menu actions

Hi,
I've tried to add a Delete action to the cell menu. I read #393 #483 and #569. As suggested I added a category on JSQMessagesCollectionViewCell to implement delete: and in the collection view delegate return YES for @selector(delete:) in collectionView:canPerformAction:forItemAtIndexPath:withSender:.
But collectionView:performAction:forItemAtIndexPath:withSender: is only called for actions like copy: or cut:. A look at the disassembly revealed that the the cell holds an internal reference to the collection view and dispatches the messages to the delegate this way.
This is difficult to achieve with JSQ because the only way to add references through categories is using associated objects or subclassing which brings it's own problems and seems overkill.
I think it'd be cleanest to extend the JSQMessagesCollectionViewCellDelegate with a method messagesCollectionViewCell:performAction:withSender: (maybe optional). This would make it easy and straight forward to implement custom actions and perform the actual task where it belongs (not in the cell).
The only way to make it even easier would be to add an accessible reference to the collection view and dispatch to the UICollectionViewDelegate all the time (like Apple does).
What do you think? If you agree I'm happy to implement it and send a pull request.

Thanks @sebastianludwig :+1: I agree, the API around this is clunky and makes me :cry:
Your suggestion sounds great — I'd love to see it.
I hate @optional protocol methods, so if it's possible to avoid it then that would be even better.

+1,  I have to check this out. The new versions of JSQ, while awesome overall, made custom message actions a nightmare.

@galambalazs - PR #811 adds this functionality and I'm planning on merging it for the next release.

@jessesquires Wow, awesome man. Thanks :)

4000 stars to celebrate 7.0.0
nice :+1:

Hi,
How to handle delete action in JSQMessageController, I have implemented method
override func collectionView(collectionView: JSQMessagesCollectionView!, didDeleteMessageAtIndexPath indexPath: NSIndexPath!) {
    self.collectionView?.deleteItemsAtIndexPaths([indexPath])

}

Also override method
override func collectionView(collectionView: UICollectionView, shouldShowMenuForItemAtIndexPath indexPath: NSIndexPath) -> Bool {
// Do the custom JSQM stuff
super.collectionView(collectionView, shouldShowMenuForItemAtIndexPath: indexPath)
// And return true for all message types (we don't want the long press menu disabled for any message types)
return true
}
override func collectionView(collectionView: UICollectionView, canPerformAction action: Selector, forItemAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) -> Bool {
    super.collectionView(collectionView, canPerformAction: action, forItemAtIndexPath: indexPath, withSender: sender)
    return true
}

override func collectionView(collectionView: UICollectionView, performAction action: Selector, forItemAtIndexPath indexPath: NSIndexPath, withSender sender: AnyObject?) {
    super.collectionView(collectionView, performAction: action, forItemAtIndexPath: indexPath, withSender: sender)
}

but i get crash on menu item what else to be done to work, any help would be appreciated, thanks in advance.

What does the exception message say? Where and when exactly does the app crash?