expect: Fix non-object received value in toHaveProperty

Summary
Fixes #7942

In getPath function, move in operator into try block and use it only if value is undefined
Although not a bug in the issue, also fix false negative from incorrect logic in hasOwnProperty method that called equals for value undefined even when property does not exist in received object

Residue for future pull requests:

Replace obscure 'pass must be initialized' error with meaningful matcher error if expected array path is empty
Rewrite getPath from recursive to iterative
Improve report when test fails

Test plan
Added 14 test cases. Here is the key to notes in cells:

in was broken in Jest 24: TypeError: Cannot use 'in' operator to search for 'key' in …
false negative has been passing when it should fail: Expected the function to throw an error. But it didn't throw anything.
prototype was fixed in Jest 24: TypeError: Cannot read property 'prototype' of undefined
false positive was incorrect error for false as received value

The other tests confirm that toHaveProperty matcher is compatible with in operator.
For example, the first row that passes for a setter without a getter. It is what it is :(

received
path
value
23.6.0
24.0.0

new Foo()
'setter'
undefined

foo2
'a'
undefined

foo2
'c'
'c'

foo2
'val'
true

new E()
'nodeType'
1

''
'length'
0

in

memoized
'memo'
[]

{a: {}}
'a.b'
undefined
false negative
false negative

false
key

false positive
in

0
key

in

''
key

in

Symbol()
key

in

Object.create
'not'

prototype

{}
[]

cc @ulrichb @jeysal @dubzzz

@jeysal Yeah, although concise parallel arrays of test cases seem super at first glance:

hard to distinguish obvious original spec and subtle later regression
hard to match up with serialized title of snapshots, especially with instances

After enough time to be confident that the change in behavior is solid, when we collaborate to improve the report, let’s pay special attention to clear feedback when received is an instance.

This is, BTW, a breaking change. Multiple tests are failing due to:

received
path
value
23.6.0
24.0.0

{a: {}}
'a.b'
undefined
**false negative
false negative

I thought the standard way of behaving for Jest was to consider key: undefined and the absence of the key itself the same.

I thought the standard way of behaving for Jest was to consider key: undefined and the absence of the key itself the same.

Yeah mostly, but we want to move away from it (why toStrictEqual is a thing). Should not break in a minor of course.

Makes sense, I agree with the change. Should we back-out for the minor? Or is it good to go as-is?

I think we should make sure it works like it does in 24.1.0 (it is a breaking change), and create an issue for reinstating the current behavior for Jest 25. Agreed?
We still want to fix #7942, though

@mjesun The purpose of the pull request was to fix a regression. I might have gone too far.
To help me figure out if we can keep the unbreaking part and defer the breaking part, can you give a minimal example of assertion that fails?

Aha, the bug in assignment to pass which caused contradictory results:
      expect({a: {}}).toHaveProperty('a.b', undefined); // 23.6
      expect({a: {}}).not.toHaveProperty('a.b'); // 23.6

Yeah, I will open pull request to change it back and comment out the test until Jest 25


Unification with \or patterns

Fixes #699
Reviewer checklist

[ ] Test coverage: stack test --coverage
[ ] Public API documentation: stack haddock

Could you add tests?

Could you add tests?

@andreiburdusa You can look at the K regression test suite for inspiration.


Per-site sections in the config file

Checklist

[x] I'm reporting a feature request
[x] I've verified that I'm running youtube-dl version 2021.06.06
[x] I've searched the bugtracker for similar feature requests including closed ones

Description

Currently the user can provide generic format settings in their $XDG_CONFIG_HOME/youtube-dl/config. Yet it's common to use different formats across different sites - can we have support for that?
Example and use-case:
cat $XDG_CONFIG_HOME/youtube-dl/config
# Generic section
--verbose
--format='best'

# The section identifier can be either the extractor name or a wildcard for the actual URL
# It's up-to the team to decide.
[youtube.com]
# say you want some websites to be audio-only
--format='bestaudio'

[dailymotion.com]
# sometimes the connection to the website is too slow for anything better
--format='best[height<=?720][fps<=?60]'

You could create  a separate extra configuration file for each site or application.
Eg with dailymotion.conf containing
# sometimes the connection to the website is too slow for anything better
--format='best[height<=?720][fps<=?60]'

then use youtube_dl --config-location dailymotion.conf ... 'http://dailymotion.com/...'

I've considered that, but in practise it's no different than providing the --format line on each invocation.
Can give it a try and implement this, when I have some time.
Would the developers be in favour or against a PR for this?

I've found this: #8901
It's been kept stopping, unfortunately.

Since found - thank you. Will have a closer look/respin.


feature: stress-testing CRUD for BindingPolicies

Feature Description
I witnessed a WDS api server go unresponsive while creating 5 binding policies in quick succession
this is from stacker:
working on ***** wec-kuberay-bindingpolicy for wds1 - git clone and apply *****
🗑 deleting Repository from git@github.ibm.com:MCC/MCC.git from /Users/andan02/projects/MCC/stacker/bin/gitRepos/MCC
🛠 [rm -rf /Users/andan02/projects/MCC/stacker/bin/gitRepos/MCC]
🗑 deleted local local git repository '/Users/andan02/projects/MCC/stacker/bin/gitRepos/MCC'
🌱 cloning Repository from ks2 git@github.ibm.com:MCC/MCC.git to /Users/andan02/projects/MCC/stacker/bin/gitRepos/MCC
Enumerating objects: 279, done.
Counting objects: 100% (279/279), done.
Compressing objects: 100% (234/234), done.
Total 279 (delta 75), reused 158 (delta 34), pack-reused 0
🌱 cloned repository
REPO name: MCC.git
REPO directory: gitRepos/MCC/cicd/stars/wec-kuberay-bindingpolicy
📁files containing 'kind: Kustomization':
none
📁files containing 'kind: Namespace':
none
📁files containing 'kind: CustomResourceDefinition':
none
📁non-crd and non-ns files found:
📄kuberay-bindingpolicy1.yml
📄kuberay-bindingpolicy2.yml
📄kuberay-bindingpolicy3.yml
📄kuberay-bindingpolicy4.yml
📄kuberay-bindingpolicy5.yml
✨ creating objects from files above:
ℹ BindingPolicy/kuberay-bindingpolicy-1 object not detected, attempting creation
✨ created object control.kubestellar.io/v1alpha1/bindingpolicies kuberay-bindingpolicy-1
ℹ BindingPolicy/kuberay-bindingpolicy-2 object not detected, attempting creation
✨ created object control.kubestellar.io/v1alpha1/bindingpolicies kuberay-bindingpolicy-2
ℹ BindingPolicy/kuberay-bindingpolicy-3 object not detected, attempting creation
✨ created object control.kubestellar.io/v1alpha1/bindingpolicies kuberay-bindingpolicy-3
ℹ BindingPolicy/kuberay-bindingpolicy-4 object not detected, attempting creation
✨ created object control.kubestellar.io/v1alpha1/bindingpolicies kuberay-bindingpolicy-4
ℹ BindingPolicy/kuberay-bindingpolicy-5 object not detected, attempting creation
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
ℹ object kuberay-bindingpolicy-5 is being created (if error, namespace might be missing from resource definition). Retrying in 5 seconds: control.kubestellar.io/v1alpha1/bindingpolicies: the server could not find the requested resource
🟡 error creating object control.kubestellar.io/v1alpha1/bindingpolicies kuberay-bindingpolicy-5 in default: the server could not find the requested resource
✅ git clone and kubectl apply successful
Proposed Solution
just apply a few dozen bp in a row, delete them, re-create them, etc.
Want to contribute?

[ ] I would like to work on this issue.

Additional Context
No response

To test he hypothesis that the kube-apiserver restarted, get a pod listing that includes the kube-apiserver. If it shows some container restarts, use kubectl logs -p to get the log from the last container run that crashed.

@clubanderson Can you please add some info so we can try to reproduce?  Did you already have objects that need to be downsynced or did you create a BP before the objects are in WDS ?
Any additional info on the env will be helpful (kind?  OCP ?  number of WECs?  wds==host ?  etc..)

objects existed, bp was added after

@clubanderson have you seen it since?  Any hints on how to go about reproducing?  I tried creating 10 bindingpolicies after creating a few objects, but perhaps I am not creating enough objects or something similar.


CB-7105 Add resource based Auth for Redbeams api

tested with (mowdev ums):

cli redbeams describe with owner and non-owner
cli redbeams delete with owner and non-owner
cli redbeams list
sdx create with database
sdx delete
distrox create with database
distrox stop with database
distrox start with database
distrox delete


javasrc2cpg: Compilation failed

I get [error] (javasrc2cpg / Compile / compileIncremental) Compilation failed when compiling the project.
> sbt -java-home "C:\Program Files\Java\jdk-11.0.15" stage

[info] welcome to sbt 1.6.2 (Oracle Corporation Java 11.0.15)
[info] loading settings for project joern-build from meta-build.sbt,plugins.sbt ...
[info] loading project definition from C:\Code\external\joern\project
[info] loading settings for project root from build.sbt ...
[info] loading settings for project joerncli from build.sbt ...
[info] loading settings for project querydb from build.sbt ...
[info] loading settings for project console from build.sbt ...
[info] loading settings for project dataflowengineoss from build.sbt ...
[info] loading settings for project macros from build.sbt ...
[info] loading settings for project semanticcpg from build.sbt ...
[info] loading settings for project benchmarks from build.sbt ...
[info] loading settings for project c2cpg from build.sbt ...
[info] loading settings for project ghidra2cpg from build.sbt ...
[info] loading settings for project x2cpg from build.sbt ...
[info] loading settings for project pysrc2cpg from build.sbt ...
[info] loading settings for project php2cpg from build.sbt ...
[info] loading settings for project jssrc2cpg from build.sbt ...
[info] loading settings for project javasrc2cpg from build.sbt ...
[info] loading settings for project jimple2cpg from build.sbt ...
[info] loading settings for project kotlin2cpg from build.sbt ...
[info] loading settings for project x2cpg from build.sbt ...
[info] loading settings for project kotlin2cpg from build.sbt ...
[info] loading settings for project javasrc2cpg from build.sbt ...
[info] loading settings for project pysrc2cpg from build.sbt ...
[info] loading settings for project php2cpg from build.sbt ...
[info] loading settings for project jimple2cpg from build.sbt ...
[info] loading settings for project jssrc2cpg from build.sbt ...
[info] resolving key references (20617 settings) ...
[info] set current project to joern (in build file:/C:/****/joern/)
Java Compiler Compiler Version 7.0.10 (Parser Generator)

...

[error] C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\src\main\scala\io\joern\javasrc2cpg\util\CachingReflectionTypeSolver.scala:8:26: object cache is not a member of package com.google.common
[error] import com.google.common.cache.CacheBuilder
[error]                          ^
[error] C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\src\main\scala\io\joern\javasrc2cpg\util\CachingReflectionTypeSolver.scala:15:27: Class com.google.common.cache.Cache not found - continuing with a stub.
[error]   private val cache = new GuavaCache(
[error]                           ^
[error] C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\src\main\scala\io\joern\javasrc2cpg\util\CachingReflectionTypeSolver.scala:16:5: not found: value CacheBuilder
[error]     CacheBuilder.newBuilder().build[String, SymbolReference[ResolvedReferenceTypeDeclaration]]()
[error]     ^
[error] three errors found
[info] Main Scala API documentation successful.
[info] compiling 20 Scala sources to C:\Code\external\joern\joern-cli\frontends\kotlin2cpg\target\scala-2.13\classes ...
[info] Main Scala API documentation successful.
[info] compiling 11 Scala sources to C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\target\scala-2.13\classes ...
[info] compiling 5 Scala sources to C:\Code\external\joern\joern-cli\frontends\jimple2cpg\target\scala-2.13\classes ...
[info] Main Scala API documentation successful.
[warn] You have no main class in your project. No start script will be generated.
[info] compiling 24 Scala sources to C:\Code\external\joern\joern-cli\frontends\ghidra2cpg\target\scala-2.13\classes ...
[error] C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\src\main\scala\io\joern\javasrc2cpg\util\CachingReflectionTypeSolver.scala:8:26: object cache is not a member of package com.google.common
[error] import com.google.common.cache.CacheBuilder
[error]                          ^
[error] C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\src\main\scala\io\joern\javasrc2cpg\util\CachingReflectionTypeSolver.scala:15:27: Class com.google.common.cache.Cache not found - continuing with a stub.
[error]   private val cache = new GuavaCache(
[error]                           ^
[error] C:\Code\external\joern\joern-cli\frontends\javasrc2cpg\src\main\scala\io\joern\javasrc2cpg\util\CachingReflectionTypeSolver.scala:16:5: not found: value CacheBuilder
[error]     CacheBuilder.newBuilder().build[String, SymbolReference[ResolvedReferenceTypeDeclaration]]()
[error]     ^
[error] three errors found
[warn] You have no main class in your project. No start script will be generated.
[info] Main Scala API documentation successful.
...

[error] Scaladoc generation failed
[error]         at xsbt.Runner.run(ScaladocBridge.scala:50)
[error]         at xsbt.ScaladocBridge.run(ScaladocBridge.scala:21)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:154)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
[error]         at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
[error]         at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2159)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error]         at sbt.Execute.work(Execute.scala:291)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error]         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error]         at java.base/java.lang.Thread.run(Thread.java:834)
[error] (javasrc2cpg / Compile / compileIncremental) Compilation failed
[error] (javasrc2cpg / Compile / doc) Scaladoc generation failed
[error] Total time: 192 s (03:12), completed Jun. 28, 2022, 12:35:49 p.m.

Hmm, we run sbt clean test (which also runs compile) on windows for each PR build, e.g. https://github.com/joernio/joern/runs/7090108711?check_suite_focus=true
The workflow config with the exact steps is here:
https://github.com/joernio/joern/blob/master/.github/workflows/pr.yml
No idea what's wrong on your system, but it's worth wiping your local caches, e.g. ~/.ivy2 and ~/.m2/repository...

Closing due to inactivity.


Is it possible to disable these options, I really don't think I will ever need them?

Is it possible to disable these options, I really don't think I will ever need them?

the only option I need is "sign in with google".

Is it possible to disable these options, I really don't think I will ever need them?

the only option I need is "sign in with google".

Multiple login modes are configured for the convenience of users in different environments. Future optimizations may be made to make the login interface look simpler.

Click the wrong button


Issues opening depth + infrared on the F200

Hi there,
I am trying to get the example files to work with the RS F200, but it seems to me that the depth and infrared streams look strange when they are open simultaneously (on v4l). I've attached some pictures and would appreciate if any input on why this is going on.

Firmware: 2.60
OS: (regrettably) 15.04, linux 4.4.
chipset: Intel 7 series/C216 family.

It looks like you might not have applied our uvcvideo.ko kernel patches, as described here:
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md#ubuntu-1404-lts-installation
The F200 multiplexes its infrared and depth images on the same UVC device, using a number of simple but nonetheless proprietary formats. Video4Linux cannot handle these formats without some slight modifications. However, due to a quirk of how Video4Linux works, an attempt to set the video mode to an "unknown" format will fail, but leave the device in whatever video mode it would default to. For the F200, this means that an unpatched system will always return 640x480 16-bit depth images at 60 fps, hence the "correct" behavior when you request only depth.
Please let us know whether or not you've applied the kernel patches, and if not, whether or not the problem persists after you do so. Thank you for your time and patience.

Thanks for the reply. I distinctly remember patching the kernel, as that one took the longest time out of the others.
I can try redoing the steps, but I do remember updating the kernel and spending a bit of time shallow cloning the repo.

This quickest way to be sure your kernel is patched is to run this with the camera plugged in.
v4l2-ctl --list-formats --device=/dev/videoX

Where X is the device node for the depth camera. With the F200 you get only one named format if it isn't patched, and a bunch if it is.
I'm pretty sure you got the right format though. The way to get depth, and infrared at the same time on the F200 is with a muxed 24 bit format. The first 16 bits are depth, and the last 8 are infrared. In both the depth, and IR images there is banding which tells me you got the depth data. There are also shadows that aren't from the projector getting blocked which tells me you got the IR data.
I think the unpacking routine is moving 32 bits at a time instead of 24. It's taking me a while to grasp how it's supposed to work with the templates. You could try using your own unpacking routine. One byte array in, and two out. Once you have the array of two byte values filled cast it to 16 bit.

As teknotus noted above, running:
v4l2-ctl --list-formats --device=/dev/videoX

should yield a list of formats including at least the FourCCs 'INVZ', 'INVI', and 'INZI' if the kernel patch was applied and loaded correctly. Please let us know if you see these formats when enumerating
Note: If the F200 is the only video device plugged into your machine, the depth/infrared device should be /dev/video1, while the color device should be /dev/video0.

Interestingly, this is what I get from v4l2.
schung@penguin:~$ v4l2-ctl --list-formats --device=/dev/video1
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2

	Index       : 1
	Type        : Video Capture
	Pixel Format: ''
	Name        : 5a564e49-2d90-4a58-920b-773f1f2

	Index       : 2
	Type        : Video Capture
	Pixel Format: ''
	Name        : 495a4e49-1a66-a242-9065-d01814a

	Index       : 3
	Type        : Video Capture
	Pixel Format: ''
	Name        : 52564e49-2d90-4a58-920b-773f1f2

	Index       : 4
	Type        : Video Capture
	Pixel Format: ''
	Name        : 49524e49-2d90-4a58-920b-773f1f2

	Index       : 5
	Type        : Video Capture
	Pixel Format: ''
	Name        : 49564e49-57db-5e49-8e3f-f479532

	Index       : 6
	Type        : Video Capture
	Pixel Format: ''
	Name        : 494c4552-1314-f943-a75a-ee6bbf0

schung@penguin:~$ v4l2-ctl --list-formats --device=/dev/video0
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2

I think the unpacking routine is moving 32 bits at a time instead of 24.

I thought it would be this too, but now I am not sure if the kernel was patched properly. I'll do it again and update.

Seems to work after removing the repo and doing it again. Not sure where it went wrong but thanks!

Sorry for the inconvenience.


DexArchiveBuilderException when building

Getting an issue when building with the latest 0.5.2 related to dex and "invoke-customs". I have "multiDexEnabled" as true in my defaultconfig. Switching back to 0.4.9 builds with no issues. Not sure if this is a bug or something else in my config. Would appreciate any help!

@7200rpm Do you target Java8 or 7? Code below should exist in your build.gradle
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

That seemed to fix it! Given that this isn't the default setup, might be worth mentioning.


Finishing up the rebrand from kmp-readiness to kmp-ready

Looks good so far... Let's see if publishing works after merging 🤞


Article completeness, Playwright vs Anglesharp; other minor items

The article appears incompletely re-worked over the original setup a year ago. It originally used Anglesharp to parse results from Blazor. It now speaks of using Playwright in the beginning but then continues with Anglesharp after chapter Test app prerequisites
Also, the inheritance from a WebApplicationFactory for Blazor does not work anymore, instead one needs to use a generic aspnet core host for hosting the Blazor components, otherwise the loading will fail.
If one seperates the setup in Frontend - Blazor, Backend - WebAPI setup, an end-to-end solution requires loading the different solutions in different threads to listen on different ports. One might not want to overcomplicate the article with that, there are still some extra steps to go. The aspnetcore team has an example how to do this.
Finally, the article unfortunately doesn't talk about coverage. At this point I suspect that there are some holes in calculating coverage in Blazor (which I will explore) as well as issues when loading in separate threads.
Ping me if you would like to discuss the items - I'm happy to share the code I have.

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

ID: 77889d43-fedb-f8b4-8fea-379ec946555c
Version Independent ID: f499b131-8b14-7e10-1728-543fdd5a5656
Content: Integration tests in ASP.NET Core
Content Source: aspnetcore/test/integration-tests.md
Product: aspnet-core
Technology: aspnetcore-test
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

I think I'll move this to https://github.com/dotnet/AspNetCore.Docs/issues/16341 and name it "Update for .NET 6".
@guardrex  to comment on Blazor comments.
See all open issues on this topic

@eduralph ... I don't understand your remarks about this article ever applying specifically to Blazor or Razor components.
There are no plans to carry integration testing coverage for Blazor in this topic. We maintain unit testing and E2E testing coverage for Razor components in a dedicated Blazor topic ...
https://docs.microsoft.com/aspnet/core/blazor/test

@guardrex, you are right - I mixed up some stuff primarily of the nature of integration tests. I'm happy to slice it down a bit to get it to the right folks and apologies for the lack of clarity.
Anyways, I think the page is suffering more from need of context and the specific solution then actual errors. The "Web Apps" section is at the same hierarchy level as the "Test, debug, and troubleshoot" section. In the Web Apps section you have the different application types such as MVC, Razor, Blazor & Client-side. In the "Test" section you have a chapter called "Integration testing" but it covers only MVC & Razor not Blazor or Client-side Integration testing. I get the choice, but I think this needs to be communicated better.
The Blazor part covers components tests only, not integration tests. It's easy to assume that the "Integration tests" section covers all technologies which it unfortunately doesn't. If you have Blazor pages and want to do integration tests, using a WebApplicationFactory as host of the SUT as described in the "regular" part will fail. The Blazor dev team has addressed this issue in their own code already and some bloggers have picked up on it - albeit with errors unfortunately.
Finally, I think there is an error in the coverlet part of integration testing for Blazor - it appears that coverlet doesn't handle the shared layout pages correctly. It counts the "@Body" tag as code but doesn't recognize that the layout page has been integrated properly. At least I can't get the test engine to recognize it's being rendered.

I see ... you're using language to describe the doc set that we don't use or use differently. Your "section" is our "node" or "folder" of topics for example. When you say "page," you're lumping in the ToC (table of contents) in the sidebar, but that's a separate file/UI area for us. To us, the "page" is just the article's content. We discuss the sidebar and navigation as a separate issue to whatever article has loaded. Anyway ... yes ... I understand what you're addressing now.
@eduralph, We're not going to ever place the Blazor test topic in this node. A decision was made by management a long time ago to keep all of the Blazor content together under one ToC node (under Web apps), so the best we can do elsewhere in the ASP.NET Core main doc set is cross-link to Blazor articles where needed.
@Rick-Anderson, I think the Integration testing topic will need a cross-link to get readers over to the dedicated testing topic in the Blazor node. It could be in Additional resources, but that might be too deep and too late or just not noticed to get readers to the right spot. Perhaps, an early (very short) section or even just a single sentence in the opening remarks will make readers aware of the Blazor-specific topic ... or perhaps a NOTE at the end of the opening remarks before the first H2.

coverlet part of integration testing for Blazor

But there is no integration testing coverage for Blazor (we link out to Playwright), and I don't know what "coverlet part" means. "@Body" doesn't appear in either article.

In case of the documentation of Blazor, given the constraints, I would suggest creating an integration test content for Blazor and just add a reference at the bottom. The page might get too top-heavy with "consider this & that" unless you get that feedback more often... if you need any help on that, let me know.
As to the coverlet thing - go ahead and ignore, I'll drop a note directly to the maintainers there.
Thanks!

@Rick-Anderson, I think the Integration testing topic will need a cross-link to get readers over to the dedicated testing topic in the Blazor node. It could be in Additional resources, but that might be too deep and too late or just not noticed to get readers to the right spot. Perhaps, an early (very short) section or even just a single sentence in the opening remarks will make readers aware of the Blazor-specific topic ... or perhaps a NOTE at the end of the opening remarks before the first H2.

an early (very short) section

An early section pointing off would be good and add the link to the additional resources.


Add Reflection Data to SSLException?

Following up on a crash I've seen - it seems like IosHttpURLConnection uses SSLException via reflection (https://bit.ly/2SHtoPW), however - SSLException does not seem to have the @ReflectionSupport annotation attached to it (https://bit.ly/2S7JnkV). Would adding it help mitigating the crash?
Error seen:
ComGoogleJ2objcReflectionStrippedError at IOSClass_GetMetadataOrFail: ComGoogleJ2objcReflectionStrippedError: JavaxNetSslSSLException: Reflection is unavailable. Fix this by avoiding reflection or building without --strip-reflection.

Yes, that's right. The runtime doesn't require reflection to load a class dynamically (it just has to be linked into the app), but querying that class for a constructor requires Java reflection. Since you found the bug, do you want to submit a pull request with the @ReflectionSupport(FULL) annotation added to get the credit. If not, we can get to it later this week.

I can send a PR, but I won't be able to test it (beyond unit tests) for a while.
If you don't get to it, I'll try followup in ~2 weeks when I'm back :)

I added the annotation to SSLException. The fix will be visible after our next repo sync.

Fixed in latest source code.


window.localStorage is not available in packaged apps. Use chrome.storage.local instead.

So I tried following the steps .. i assume this is for making a Chrome App? If it is then I am getting this error "window.localStorage is not available in packaged apps. Use chrome.storage.local instead." is this library to old? Is there a newer one I should be using?

https://github.com/borismus/oauth2-extensions is clear that you should be using the chrome.identity API.


chore(main): release 0.2.0

:robot: I have created a release beep boop
0.2.0 (2024-01-21)
Features

added release please (ed71f36)

Bug Fixes

added job permissions (d39a556)
and again (6243e0b)
chart path (93d2d0c)
chart path for CI (8ad5b45)
CI again (85e717e)
CI again (7a62627)
CI again (48997e0)
path again mayhaps (fdf32ff)
release type as helm (0265351)
test helm change (1cc75b9)
test simple release type because helm doesn't work with paths (03b6a11)
test symlink (43b8034)
tweaked path again (ce90900)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/Sillock-Inc/Dotbot/releases/tag/v0.2.0 :sunflower:


PDF Links for Fragment Identifiers are not generated

Links with fragment identifiers (like #id-of-heading) do not show up as links in PDFs generated from Electron.
Using electron-pdf with Electron 0.36.7, I get the PDF:
https://caleblloyd.com/downloads/pdf/electron.pdf
Links in the Table of Contents do not work.
Using the latest Chromium, I get:
https://caleblloyd.com/downloads/pdf/chromium.pdf
Links in the Table of Contents work properly.
Command in electron-pdf was:
electron-pdf http://www.sec.gov/Archives/edgar/data/789019/000119312516441821/d15167d10q.htm electron.pdf

Chrome 48 has switched to use pdfium for PDF generating, so we will get this fixed in Electron once we upgrade to Chrome 48.

We've also had this problem. Seems that the printer generates bad Destination references for the links, writing just the fragment identifier in a link without creating a reference with that identifier in the dictionary.
We've managed to go around this limitation by post-processing the PDF with Apache PDFBox in Java, but there are also Python libraries that can help, e.g. PyPDF2.
The idea is to iterate through all the annotations, identify the broken ones, and set the correct destinations.
But yes, we're very much looking forward to that pull request being merged :-D


Fix more binop line break

Summary

Test Plan

Current dependencies on/for this PR:

main

PR #4985   👈

This comment was auto-generated by Graphite.

@MichaReiser merged this pull request with Graphite.


show_just_path_prediction

I started to work on showing just the prediction path (based on what we discussed in a previous issue)
Right now, it looks like this :

Am I on the right track ? :) Do you think we need to show also the neighborhood nodes. I don't have a strong argument for them, but I like how they look (they show somehow the 'opposite' prediction path)

Looks pretty cool! I think our goal, though, is to show the path from root to predictor leaf in a big tree as tightly as possible. I wonder what it looks like as a vertical stack of just the decision nodes entered and then the leaf.  That would be the smallest footprint, which I think is kind of the goal here. what do you think?

Indeed, if I look again at above visualisation, it looks 'scattered'. I will adjust it to the vertical stack version. Let's see how it'll look ;)

It looks much cleaner now :)

heh, nice work! I like it. Does it work horizontally too? I think we have an option for that.

cool. By horizontally.... do you mean a horizontal stack instead of vertical stack ?

yep, left to right

wouldn't be a problem if the prediction path is very deep ? I think we will end with a 'crowdy' plot.

well, sometimes you want very tall and sometimes very wide. seems like original code can change orientation so this should inherit that; i assume you just cut/paste, right?

I wanted to use as much functionality as possible from dtreeviz(), so I didn't cut/paste. I will take a look for horizontal view.  There is little work left also for vertical view, I made a little 'hack' to create the visualisation with vertical view for decision nodes only :)

We can skip horizontal if it gets messy in the code :)

For horizontal view I didn't have to do any extra logic, it was already in dtreeviz() code ;)

Looks great!  Only question is, how do we activate this? Seems like it should be an arg to existing tree viz functions.  Oh, I see you have show_just_path.  Sounds good! Please do make a PR.  Does it work for regression trees too?

I didn't try it on regression trees. I will try it tomorrow.

yey, it works also for regression trees. I will create a PR for this.

great job!


Fix SSL read timeouts in Python 2.7

Pull Request check-list

[X] Does $ python setup.py test pass with this change (including linting)?
[ ] Does travis tests pass with this change (enable it first in your forked repo and wait for the travis build to finish)?
[ ] Is the new or changed code fully tested?
[ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

Description of change
The ssl module in Python 2.7 raises timeouts as ssl.SSLError instead of socket.timeout. When these timeouts are encountered, the error will be re-raised as socket.timeout so it is handled appropriately by the connection.
This issue was discovered when using Redis as a result backend for Celery. When celery was waiting for results in Redis, its connection would time out causing the operation to fail. This only occurred when using secure connections; it works fine with non-secure connections.

Do we also need to wrap socket.connect? Establishing a connection can raise a socket.timeout error before recv is ever called. What exception is raised when establishing a secure connection trips the socket_timeout timeout?

Do we also need to wrap socket.connect? Establishing a connection can raise a socket.timeout error before recv is ever called. What exception is raised when establishing a secure connection trips the socket_timeout timeout?

I tested this out using netcat to force a timeout and sure enough, an ssl.SSLError timeout was raised during the handshake.
I decided to find all the possible "timed out" error messages in the ssl module and updated the wrapper to raise socket.timeout when it encountered one of the messages. I then added some additional compatibility wrappers to catch all the other paths.
I didn't want to amend the existing commit with these changes without checking if that was acceptable; let me know if you'd want me to do that.

Awesome, thanks. This looks great. I've merged and released 3.3.9 to PyPI.


Stop neo-express

As a smart contract developer, I would like not only to start a neo-express node, but also to stop any existing neo-express running.
The first thing developers would do to stop a running neo-express is: go to the terminal running the neo-express, press CTRL+C. However, this seems that some commands are still running in the background (triggered by the extension):

That's why, IMHO, it's important to have a "button" (or an action, somewhere) to stop running a neo-express and everything related to it.

Ok, I get it: the "Reset blockchain" performs a kind of stop and reset (deletes everything). Gotcha.
Then, this issue should be about just adding another option to "Stop blockchain" in the following dropdown, but not reseting:

😄

Just a side note: the problem with the reset MIGHT be another issue, and it's NOT in the scope here. Sorry for this.
Let's keep it focused: I believe that adding an option just to stop things makes sense. 👍


Update Replication-error-1753-There-are-no-more-endpoints-available-f…

…rom-the-endpoint-mapper.md
Knowledge Management project - Work Item 32335
Fixing type-o in "Applies To" (the last item is missing '2016').  Also fixing a few other OS references throughout the article to reflect it applies to newer OS'.

@robinharwood, @Xelu86
Can you review the proposed changes?
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team


Validate RHEL 8.5 in v2.5.x

https://github.com/rancher/rancher/issues/35460

We're actually having an issue getting load distibution and balancing working propertly on RHEL 8.x.  No issues with the same on RHEL 7.x.  Anyone having similiar issues?  I'll follow up shortly with some further details.


Macros parsing fail on a phobos comment

An exception is thrown for the Macros section of this phobos comment
/**
 * Mathematical Special Functions
 *
 * The technical term 'Special Functions' includes several families of
 * transcendental functions, which have important applications in particular
 * branches of mathematics and physics.
 *
 * The gamma and related functions, and the error function are crucial for
 * mathematical statistics.
 * The Bessel and related functions arise in problems involving wave propagation
 * (especially in optics).
 * Other major categories of special functions include the elliptic integrals
 * (related to the arc length of an ellipse), and the hypergeometric functions.
 *
 * Status:
 *  Many more functions will be added to this module.
 *  The naming convention for the distribution functions (gammaIncomplete, etc)
 *  is not yet finalized and will probably change.
 *
 * Macros:
 *      TABLE_SV =

 *
Special Values

 *              $0

 *      SVH = $(TR $(TH $1) $(TH $2))
 *      SV  = $(TR $(TD $1) $(TD $2))
 *
 *      NAN = $(RED NAN)
 *      SUP = $0
 *      GAMMA = Γ
 *      THETA = θ
 *      INTEGRAL = ∫
 *      INTEGRATE = $(BIG ∫$(SMALL $1)$2)
 *      POWER = $1$2
 *      SUB = $1$2
 *      BIGSUM = $(BIG Σ $2$(SMALL $1))
 *      CHOOSE = $(BIG () $(SMALL $1)$(SMALL $2) $(BIG ))
 *      PLUSMN = ±
 *      INFIN = ∞
 *      PLUSMNINF = ±∞
 *      PI = π
 *      LT = <
 *      GT = >
 *      SQRT = √
 *      HALF = ½
 *
 *
 * Copyright: Based on the CEPHES math library, which is
 *            Copyright (C) 1994 Stephen L. Moshier (moshier@world.std.com).
 * License:   $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
 * Authors:   Stephen L. Moshier (original C code). Conversion to D by Don Clugston
 * Source:    $(PHOBOSSRC std/mathspecial.d)
 */

Can you add information about what tool you were using when you saw the problem, or what the stack trace looks like? I'm not able to reproduce the issue.

Wrong button...


Python 3.8 not supported

Python 3.8.0 released on 14th October, but Scipy does not support it. I tried updating pyproject.toml to the following:
[build-system]
requires = [
    "wheel",
    "setuptools",
    "Cython>=0.29.2",
    "numpy==1.13.3; python_version=='3.5' and platform_system!='AIX'",
    "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'",
    "numpy==1.14.5; python_version>='3.7' and platform_system!='AIX'",
    "numpy==1.16.0; python_version=='3.5' and platform_system=='AIX'",
    "numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'",
    "numpy==1.16.0; python_version>='3.7' and platform_system=='AIX'",
    "numpy==1.17.2; python_version>='3.8' and platform_system=='AIX'",
    "pybind11>=2.2.4",
]

(My commit is here.)
I then installed scipy from source and ran python3.8 -c "import scipy; scipy.test(). The tests freeze at 79%.
.local/lib/python3.8/site-packages/scipy/sparse/tests/test_construct.py ........................                               [ 78%]
.local/lib/python3.8/site-packages/scipy/sparse/tests/test_csc.py ..                                                           [ 78%]
.local/lib/python3.8/site-packages/scipy/sparse/tests/test_csr.py ...                                                          [ 78%]
.local/lib/python3.8/site-packages/scipy/sparse/tests/test_extract.py ..                                                       [ 78%]
.local/lib/python3.8/site-packages/scipy/sparse/tests/test_matrix_io.py ......                                                 [ 79%]
.local/lib/python3.8/site-packages/scipy/sparse/tests/test_sparsetools.py ...

After using Ctrl+C to quit that test, it continues to 100% with the following final results:
========================================================== warnings summary ==========================================================
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
  /home/sam/.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321: PytestUnknownMarkWarning: Unknown pytest.mark.slow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    warnings.warn(

.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321
  /home/sam/.local/lib/python3.8/site-packages/_pytest/mark/structures.py:321: PytestUnknownMarkWarning: Unknown pytest.mark.xslow - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/latest/mark.html
    warnings.warn(

.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_explicit
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_explicit
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_implicit
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_implicit
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_multi
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_multi
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_pearson
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_pearson
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_pearson
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_pearson
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_lorentz
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_lorentz
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_ticket_1253
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_ticket_1253
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_ifixx
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_ifixx
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_ifixx
.local/lib/python3.8/site-packages/scipy/odr/tests/test_odr.py::TestODR::test_ifixx
  /home/sam/.local/lib/python3.8/site-packages/scipy/odr/odrpack.py:1103: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
    self.output = Output(odr(*args, **kwds))

-- Docs: https://docs.pytest.org/en/latest/warnings.html
================ 14520 passed, 1280 skipped, 1225 deselected, 77 xfailed, 8 xpassed, 27 warnings in 614.71s (0:10:14) ================

   Normal return from subroutine COBYLA

   NFVALS =   50   F = 2.485185E+01    MAXCV = 1.999965E-10
   X = 4.955358E+00   6.666553E-01

 NNLS quitting on iteration count.

Scipy/Numpy/Python version information:
Note: scipy was installed from source after modifying pyproject.toml (see code).
1.3.1 1.17.2 sys.version_info(major=3, minor=8, micro=0, releaselevel='final', serial=0)

We'll need NumPy 1.17.3 first; 1.17.2 doesn't support Python 3.8.

After building NumPy and SciPy master locally on 3.8 I see the same behavior (plus what's fixed by #10930) -- with scipy.test('full') it gets stuck at 81% and ctrl-C allows it to finish. Running:
scipy.test('full', extra_argv=['-ra', '--full-trace', '-vv'])

and then ctrl-Cing I can see that the problem happens here:
python/scipy/scipy/sparse/tests/test_sparsetools.py::test_nnz_overflow ✓                                                                                81% ████████▏
^C
python/scipy/scipy/sparse/tests/test_sparsetools.py::TestInt32Overflow.test_coo_todense ✓                                                                            81% ████████▏

But running pytest -ra -vv scipy/sparse/tests/ directly, I don't get this problem. So I'm not sure what's causing things to hang. However, if I run:
$ SCIPY_AVAILABLE_MEM="10 Gb" python
>>> import scipy
>>> scipy.test('full')

Things work. However, thanks to snakeviz I was able to do
$ python -m cProfile -o ~/Desktop/prof.prof ~/Desktop/sci.py  # sci.py just does "import scipy; scipy.test('full')"
$ snakeviz ~/Desktop/prof.prof

And see that the problematic stack was (probably!):
test_sparsetools.py:112(test_coo_todense) 1.07e+3 s
~:0(<built-in method gc.collect>) 1.07e+3 s
util.py:170(__call__) 1.07e+3 s
pool.py:679(_terminate_pool) 1.07e+3 s
pool.py:670(_help_stuff_finish) 1.07e+3 s
~:0(<method 'acquire' of '_multiprocessing.SemLock' objects>) 1.07e+3 s

So the problem is actually with gc.collect making multiprocessing pool wait.
In #10932 I turn this into a pytest fixture, and on my 3.8 distribution it stops here:
python/scipy/scipy/optimize/tests/test__differential_evolution.py::TestDifferentialEvolutionSolver.test_parallel ✓

@andyfaff this thus looks like a probable _differential_evolution pool problem. Any ideas?

It's annoying that the 3.8-dev matrix entry didn't pick up a Pool issue, this is exactly the reason why it was added. What are the circumstances in which the issue occurs? Does this hang occur on the Travis 3.8-dev entry? What OS does it happen on? Do the optimize tests pass without issue?

With #10930 all other tests pass, and even the ctrl-C'ed one passes. This is on Ubuntu 19.10 (I upgraded early). The full is actually not necessary, even this hangs in the same spot:
$ python -c "import scipy; scipy.test(extra_argv=['-vv', '-ra'])"

I guess the way to approach this would be to comment out all the differential evolution tests that use multiprocessing.Pool, then introduce them one by one to see if there is a particular test that causes the issues.
Once that's been done there are ways to modify the test to see if it's MapWrapper in scipy that's causing the issues, or if it's the Python implementation of Multiprocessing.Pool.

Okay @andyfaff here is a minimal example that hangs on my machine:
import gc
from scipy.optimize import rosen
from scipy.optimize._differentialevolution import DifferentialEvolutionSolver
bounds = [(0., 2.), (0., 2.)]
solver = DifferentialEvolutionSolver(rosen, bounds, workers=2)
# solver.__del__()
del solver
gc.collect()  # hangs

If I uncomment the line # solver.__del__(), which calls internally self._mapwrapper.close() then terminate(), which in turn ends up calling Pool.close() and Pool.terminate() things work fine.
Not sure how easy it would be to to boil it down to a minimal example, though. Any experience opening CPython issues?

@andyfaff FYI we do see the failure on 3.8-dev on the PR that forces GC:
https://travis-ci.org/scipy/scipy/jobs/598662945

Okay this also fails on my Python:
import gc
from multiprocessing import Pool

class A(object):
    def __init__(self):
        self.pool = Pool(processes=2)

solver = A()
del A
gc.collect()

So, not a SciPy problem. Hopefully we can get this fixed upstream. Or maybe my system is just pathalogical...?
Meanwhile, this issue still documents other 3.8 problems, like needing NumPy 1.17.3 to be out, and pyproject.toml to be updated. So let's keep it open.

Filed an upstream bug:
https://bugs.python.org/issue38501

Thanks for all that detailed investigation, wasn't looking forward to it.
I wonder if the context changes things for this issue:
from multiprocessing import get_context
# context one of {None, 'fork', 'spawn', 'forkserver'}
ctx = get_context(None)
self.pool = ctx.Pool(2)

you can change from

Same failure with atexit (I think it's a variant on the gc problem at least), now on 3.8.0 since 19.10 pushed an update, when running the script with the suggested change as:
from multiprocessing import get_context

class A(object):
    def __init__(self):
        self.pool = get_context(None).Pool(2)

solver = A()

No issues with your example on miniconda Python 3.7.3

Yep, I don't see it on Ubuntu Python 3.7.3 either.

@larsoner I can confirm a similar problem with your code on macOS, the interpreter hangs on quit() for Python 3.8.0. No problem when I run the code in the Python 3.7.4 interpreter.

Awesome thanks @sol-prog, could you make a comment along these lines over on the upstream issue (if possible) at https://bugs.python.org/issue38501 ?

@larsoner Same problem on Windows 10 64 bits! No problem with 3.7.5, hangs with 3.8.0. Currently, I don't have an account at bugs.python.org, but I'll see what I can do.

NumPy 1.17.3 is out so I'll try amending #10930 to run 3.8

Installing SciPy on Python 3.8 within Travis CI using Pip fails for me; you can view the error messages at https://travis-ci.org/rlee287/voicechat-modem-dsp/jobs/603290459. From what I can tell it seems that it is not able to find linear algebra libraries that it depends on.

@rlee287 You have to install the BLAS/LAPACK libs. See our Travis jobs on PRs, say, https://travis-ci.org/scipy/scipy/jobs/603096059#L166

Nevermind you are installing via pip. Scratch the comment above. Must be related to the wheel process.

Installing liblapack-dev still helps when pip tries to build scipy from source[0].
[0]https://travis-ci.com/jvesely/PsyNeuLink/jobs/249399814

I can confirm that liblapack-dev installation does work to resolve the issue. While I understand why pip and installing scipy would only look for these libraries when recompiling the library (as opposed to using a prebuilt wheel), this behavior is still somewhat counterintuitive.

How about wheels for 3.8?

They'll be added for SciPy 1.3.2, it's on the way.

Why should we wait for 1.3.2 for that?

because it requires fixes that are not in 1.3.1. Python releases rarely are 100% backwards compatible

Is it possible to backport these fixes to 1.3.1 and create a release supporting 3.8 now?

That is going to be 1.3.2

Have some patiemce please we are already trying to figure out what changed on python 3.8 that we have to fix. Amd old ones should keep working with 3.7 so it is not that trivial.

ERROR: Command errored out with exit status 1:
command: 'c:\users\fablab\appdata\local\programs\python\python38-32\python.exe' 'c:\users\fablab\appdata\local\programs\python\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\FabLab\AppData\Local\Temp\pip-build-env-grh495uw\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"''
cwd: None
Complete output (344 lines):
Ignoring numpy: markers 'python_version == "3.5" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.5" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
Ignoring numpy: markers 'python_version >= "3.7" and platform_system == "AIX"' don't match your environment
Collecting wheel
Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/d9/de/554b6310ac87c5b921bc45634b07b11394fe63bc4cb5176f5240addf18ab/setuptools-41.6.0-py2.py3-none-any.whl
Collecting Cython>=0.29.2
Using cached https://files.pythonhosted.org/packages/22/03/510503cfbf20f62810a9548c9be13ab86181f00cca9a3a56717c4595d952/Cython-0.29.14-cp38-cp38-win32.whl
Collecting numpy==1.14.5
Using cached https://files.pythonhosted.org/packages/d5/6e/f00492653d0fdf6497a181a1c1d46bbea5a2383e7faf4c8ca6d6f3d2581d/numpy-1.14.5.zip
Installing collected packages: wheel, setuptools, Cython, numpy
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\fablab\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\setup.py'"'"'; file='"'"'C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\FabLab\AppData\Local\Temp\pip-record-v6v16vfn\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\FabLab\AppData\Local\Temp\pip-build-env-grh495uw\overlay' --compile
cwd: C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy
Complete output (322 lines):
Running from numpy source directory.
  Note: if you need reliable uninstall behavior, then install
  with pip instead of using `setup.py install`:

    - `pip install .`       (from a git repo or downloaded source
                             release)
    - `pip install numpy`   (last NumPy release on PyPi)

  C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\misc_util.py:464: SyntaxWarning: "is" with a literal. Did you mean "=="?
    return is_string(s) and ('*' in s or '?' is s)
  blas_opt_info:
  blas_mkl_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries mkl_rt not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  blis_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries blis not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  openblas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries openblas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
  get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem', 'intelem', 'flang']'
  customize GnuFCompiler
  Could not locate executable g77
  Could not locate executable f77
  customize IntelVisualFCompiler
  Could not locate executable ifort
  Could not locate executable ifl
  customize AbsoftFCompiler
  Could not locate executable f90
  customize CompaqVisualFCompiler
  Could not locate executable DF
  customize IntelItaniumVisualFCompiler
  Could not locate executable efl
  customize Gnu95FCompiler
  Could not locate executable gfortran
  Could not locate executable f95
  customize G95FCompiler
  Could not locate executable g95
  customize IntelEM64VisualFCompiler
  customize IntelEM64TFCompiler
  Could not locate executable efort
  Could not locate executable efc
  customize PGroupFlangCompiler
  Could not locate executable flang
  don't know how to compile Fortran code on platform 'nt'
    NOT AVAILABLE

  atlas_3_10_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_3_10_blas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_blas_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_blas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\system_info.py:624: UserWarning:
      Atlas (http://math-atlas.sourceforge.net/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [atlas]) or by setting
      the ATLAS environment variable.
    self.calc_info()
  blas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries blas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\system_info.py:624: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    self.calc_info()
  blas_src_info:
    NOT AVAILABLE

  C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\system_info.py:624: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE

  'svnversion' is not recognized as an internal or external command,
  operable program or batch file.
  'svnversion' is not recognized as an internal or external command,
  operable program or batch file.
  non-existing path in 'numpy\\distutils': 'site.cfg'
  F2PY Version 2
  lapack_opt_info:
  lapack_mkl_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries mkl_rt not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  openblas_lapack_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries openblas not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  openblas_clapack_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries openblas,lapack not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  atlas_3_10_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas,tatlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas,tatlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries tatlas,tatlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
    NOT AVAILABLE

  atlas_3_10_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas,satlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas,satlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries satlas,satlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_3_10_info'>
    NOT AVAILABLE

  atlas_threads_info:
  Setting PTATLAS=ATLAS
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries ptf77blas,ptcblas,atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_threads_info'>
    NOT AVAILABLE

  atlas_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\lib
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in C:\
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries f77blas,cblas,atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack_atlas not found in c:\users\fablab\appdata\local\programs\python\python38-32\libs
  <class 'numpy.distutils.system_info.atlas_info'>
    NOT AVAILABLE

  lapack_info:
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  customize MSVCCompiler
    libraries lapack not found in ['c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\lib', 'C:\\', 'c:\\users\\fablab\\appdata\\local\\programs\\python\\python38-32\\libs']
    NOT AVAILABLE

  C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\system_info.py:624: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    self.calc_info()
  lapack_src_info:
    NOT AVAILABLE

  C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\system_info.py:624: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    self.calc_info()
    NOT AVAILABLE

  c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  running install
  running build
  running config_cc
  unifing config_cc, config, build_clib, build_ext, build commands --compiler options
  running config_fc
  unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
  running build_src
  build_src
  building py_modules sources
  creating build
  creating build\src.win32-3.8
  creating build\src.win32-3.8\numpy
  creating build\src.win32-3.8\numpy\distutils
  building library "npymath" sources
  No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Inumpy\core\src\private -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Ic:\users\fablab\appdata\local\programs\python\python38-32\include -Ic:\users\fablab\appdata\local\programs\python\python38-32\include -I"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include" /Tc_configtest.c /Fo_configtest.obj
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\lib\x86" _configtest.obj /OUT:_configtest.exe
  LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
  failure.
  removing: _configtest.c _configtest.obj
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\setup.py", line 394, in <module>
      setup_package()
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\setup.py", line 386, in setup_package
      setup(**metadata)
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\core.py", line 169, in setup
      return old_setup(**new_attr)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\install.py", line 62, in run
      r = self.setuptools_run()
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\install.py", line 36, in setuptools_run
      return distutils_install.run(self)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\command\install.py", line 545, in run
      self.run_command('build')
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\build.py", line 47, in run
      old_build.run(self)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\fablab\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
      cmd_obj.run()
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\build_src.py", line 148, in run
      self.build_sources()
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\build_src.py", line 159, in build_sources
      self.build_library_sources(*libname_info)
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\build_src.py", line 294, in build_library_sources
      sources = self.generate_sources(sources, (lib_name, build_info))
    File "C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\numpy\distutils\command\build_src.py", line 377, in generate_sources
      source = func(extension, build_dir)
    File "numpy\core\setup.py", line 675, in get_mathlib_info
      raise RuntimeError("Broken toolchain: cannot link a simple C program")
  RuntimeError: Broken toolchain: cannot link a simple C program
  ----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\fablab\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\setup.py'"'"'; file='"'"'C:\Users\FabLab\AppData\Local\Temp\pip-install-rs48fhf4\numpy\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\FabLab\AppData\Local\Temp\pip-record-v6v16vfn\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\FabLab\AppData\Local\Temp\pip-build-env-grh495uw\overlay' --compile Check the logs for full command output.
ERROR: Command errored out with exit status 1: 'c:\users\fablab\appdata\local\programs\python\python38-32\python.exe' 'c:\users\fablab\appdata\local\programs\python\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\FabLab\AppData\Local\Temp\pip-build-env-grh495uw\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' Check the logs for full command output.

FWIW:  scipy 1.4.0.dev0+ba207e9 works for me (CentOS-7) with python 3.8.0 rebuild from source

Has this been fixed? I'm still getting this error with Python 3.8.6 with scipy 1.5

Yes, Python 3.8 support has been present for a long time.

I'm still getting this error with Python 3.8.6 with scipy 1.5

This is a very long thread so not sure what you're referring too. Please open a new issue with a full build log or traceback.


[AUTOPATCHER] Patches CVE-2021-36980 for openvswitch

        Patches CVE-2021-36980 for openvswitch.
        This patch and PR was automatically generated and needs human verification before merging.

Closing. This PR took all of the patches listed in NIST's NVD database, but we only need the one that applies to the 2.12 branch of openvswitch.


Add Authentication section in the Dapr FAQ

Please add a Link to the Dapr Authentication FAQ on Azure at https://docs.dapr.io/developing-applications/integrations/azure/authenticating-azure/#using-managed-service-identities

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

ID: 0811cba1-4634-3787-57b5-8ce8b9c1b8f2
Version Independent ID: 6ba1f28a-9d32-9f1b-a958-72ba25a9f06b
Content: Dapr extension for Azure Kubernetes Service (AKS) overview (preview) - Azure Kubernetes Service
Content Source: articles/aks/dapr-overview.md
Service: container-service
GitHub Login: @zr-msft
Microsoft Alias: nickoman

Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

Issue addressed per https://github.com/MicrosoftDocs/azure-docs-pr/pull/214159.
#please-close


Re-enable tests in DateParse2.js

In #4067, we've changed the format of Date.toUTCDate for negative years. After this change, some tests in DateParse2.js fail because Date.parse() isn't able to parse negative years in some cases, so these failing tests are disabled in #4067. They should be re-enabled (uncommented) after #4178 is fixed.
Ref: https://github.com/Microsoft/ChakraCore/pull/4067#issuecomment-346196337

Really appreciate the effort but appreciate even more if you do not enable / add negative year tests to xplat. (my 2 cents, if it has a runtime cost, please do not even change for Windows too)
Why => xplat negative years time zone info != what we get from Windows. Correcting that, costs lots of if/else/copy. At the moment, toStringAndToUTCStringYearPadding.js is failing on local xplat and I'm planning to disable it there too.
Curious.. why anyone needs negative years?

See #4325

Curious.. why anyone needs negative years?

Because it's in the spec.
(Or, more specifically, by my reading of the relevant spec sections, negative years are not out of range and therefore do not cause Date ctor to return NaN and therefore negative years are supported by the spec.)

Not sure question/answer matches :) Correct me if I'm wrong but, no real app needs negative years, no?
Probably some wouldn't agree but can we consider twice on any extra ops we will add because of making negative years more spec compliant?

If it slows down the common case, absolutely we should consider this being an issue that is so unimportant that it's not worth fixing. If it only slows down the negative years case, there's no cost to the common case, so I don't see why we couldn't fix it there.

I will run a benchmark to see if it slows down common cases.

^ @xiaoyinl should be able to tell by analyzing the code: if there's already a branch surrounding the logic for negative cases, adding more logic to it means that only the negative cases will be affected. If this would require adding a branch to separate positive and negative cases, then we will need to look at the benchmarks to decide if there's a noticable impact.

@dilijev There're a few branches added to separate both cases, like L1240-1245, and L1405-1408. But I'm not sure if this cost is negligible or not for common cases.

Ah yes, those new checks will add non-zero overhead, though without a benchmark it's hard to tell how small the overhead will be (although the branch predictor will probably render it even more negligible for the common case).


[Snyk] Fix for 6 vulnerabilities

Snyk has created this PR to fix 6 vulnerabilities in the npm dependencies of this project.
Snyk changed the following file(s):

sdk/core/core-http/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue
Score

Regular Expression Denial of Service (ReDoS) SNYK-JS-MOCHA-2863123
  192

Denial of Service (DoS) SNYK-JS-WS-7266574
  169

Missing Release of Resource after Effective Lifetime SNYK-JS-INFLIGHT-6095116
  131

Regular Expression Denial of Service (ReDoS) SNYK-JS-PATHTOREGEXP-7925106
  67

Regular Expression Denial of Service (ReDoS) npm:debug:20170905
  58

Regular Expression Denial of Service (ReDoS) SNYK-JS-MINIMATCH-3050818
  45

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Regular Expression Denial of Service (ReDoS)

:tada: Snyk checks have passed. No issues have been found so far.
:white_check_mark: security/snyk check is complete. No issues have been found. (View Details)
:white_check_mark: license/snyk check is complete. No issues have been found. (View Details)


Support executing multiple Gradle (or shell?) commands

Sample use case:
    - name: 'Run tests with JaCoCo'
      shell: bash
      run: |
        ./gradlew --version
        ./gradlew --scan --no-parallel --stacktrace --warning-mode=all -PenableJaCoCo build jacocoRootReport

big +1
I have a case where I need to capture all stdout from ./gradlew for logs processing. Currently I just pipe the output to tee that save log into file (for further analysis) but also keeps printing logs to console


Edited ToTable to finish rows in each format

Previous version left table cells without borders and edges if the number of items on each row differed. This edit counts the maximum number of columns in each table and then adds any necessary empty cells to add empty cells and finish the table.

Hey!  This pull request has gotten rather old and that's our fault.  This project stopped being actively maintained for a while and it looks like your pull request has started to gather dust.  Would you be able to update your branch to the latest version of CyberChef and we'll give it a review?

Hey, this PR has remained without updates for four weeks now.  I'll close it now, but feel free to re-open if you find time to contribute! 😄


Prompt to confirm location place

Hmm the prompt should probably be disabled by default to not block cronjob executions etc
What do you think of a -i flag (interactive) to enable it?

 You should sign our Contributor License Agreement in order to get your pull request merged.Fabrice Laporte seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account ([for further information, click here] (https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user)).

Still interested in this. I haven't had time to try moving it out into elodie.py but once it's there and the tests pass I think it's a big improvement.


What is the experiments branch doing?

Hi! Cool project,
but what is the experiment branch doing?

The experiment branch currently fixes a couple of bugs with sections and bindings, you're able to access the contents of a section via the bindings now. We have some other plans for this branch too but haven't had much time yet. We'll likely do our changes to Nucleus, get our intended use case working and then release a blog post.


Check for mis-matched relationships

Check OrgBook for mis-matched relationships (one company has a relationship to another but there is no corresponding relationship back).

This PR is good to go.  There are still a few outstanding issues in OrgBook (which I think are data issues) that I'm following up ...

@ianco, The changes have been deployed.  We'll see the results in the morning.


Fragments part of Mirage factories

I have a model with fragments, i want to create a ember-cli-mirage factory for the same model. I am not having any clue how can i make fragment part of the factory, because the fragment data is not populated in the model in my Acceptance tests but in development it's working fine.
Any help would be much appreciated!

It would be great to get first-class Model Fragments support in Mirage, but for the time being you can make it work like this:

Make each model fragment a model in Mirage.
Models in your app are discovered by Mirage, but Fragments aren't. All you need to do is list relationships.
Make a factory for each of this fragment models
This works just like normal factories, but instead of creating them by hand, they will always be made as part of making the fragment owner instance.
Create related Models (fake Fragments) in the afterCreate hook for the fragment owner
So if you fragment is DocumentStats and the owner is the model Document, in the afterCreate hook for the Document factory, create and associate an instance of DocumentStats.
In the Mirage serializer for a Model with fragments, embed the fragment
By default, Mirage will treat the fragment as a relationship and only include the id. To get around this, use embed: true and something like include: [ 'document_stats' ].

You can see this all in a real world app over here: https://github.com/hashicorp/nomad/tree/master/ui/mirage/factories

You could also use  ember-data-factory-guy instead of mirage which supports fragments with no extra work at all.


Error to use "authenticate" method. Error 2: parseFailed

I'm using a Odoo service. When I trying log in, I receive the follow errror:
Auth Error
error The operation couldn’t be completed. (AlamofireXMLRPC.XMLRPCError error 2.)
Looking the error, of XMLRPCError. The error is: "parseFailed". But I don't know where I'am going wrong.
AlamofireXMLRPC.request(self.host, methodName: "authenticate", parameters: paramsAuth).responseXMLRPC { (response: DataResponse<XMLRPCNode>) -> Void in                 switch response.result {                 case .success(let value):                     print("Auth Success")                     var str = String(data: response.data!, encoding: String.Encoding.utf8) as String!                     print(str)                     break                 case .failure(let error):                     print("Auth Error")                     print("error \(error.localizedDescription)")                     break                 }
The other methods of API odoo works fine: https://www.odoo.com/documentation/11.0/webservices/odoo.html.

if you handled that problem, could you please give advice? @augustocadini


Add option to show only the alias for a field

I'm loading the application configuration from a yaml file and want to use autodoc-pydantic to document the available settings.
It's really great that there are so many configuration options so everything can be tailored to ones needs.
However I'm missing one more thing:
Since I load from file I load the corresponding values by alias and not by name.
Would it be possible to add a configuration option which shows the alias instead of the field name?
My users have to enter the alias in the configuration file - the field name is of no use for them and might be confusing.
Example:
class General(BaseModel):
    listen_only: bool = Field(False, alias='listen only')

Valid entry in yaml file
listen only: True

Hi @spacemanspiff2007,
thanks for sharing your feature request! I think it is a reasonable proposal regarding your use case. However, I believe this use case is rather infrequent and narrow. The tradeoff between introduced complexity and gained functionality might be rather unbalanced towards the former.
I'm not rejecting your request in any way. Rather, please help me justify it ;-). Can you think of other use cases? Or perhaps, if we provide a skeleton example of how an application configuration is loaded from a yaml file and used with autodoc-pydantic to be documented, it would be of use for others too.

Thanks for your reply.
I've been playing around with easyconfig, a very convenient wrapper that allows to

load data from yaml files
create a yaml file with defaults and comments

and validates everything with pydantic.
It took some iterations but I think now it's quite convenient (if you like yaml files).
The docs are still a bit lacking, I think I'll have to switch to rtd soon.
The general idea is that you define your configuration in pydantic.
If you want to you can add a class Mixin so you get type hints for the easyconfig functions but that is completely optional.
You than pass the model instance into a function which will create a mutable object from it.
If you then load values from a file the values from the object and subobjects mutate in place.
from pydantic import BaseModel, Field
from easyconfig import AppConfigMixin, create_app_config

class MySimpleAppConfig(BaseModel, AppConfigMixin):  # <-- AppConfigMixin is optional
    retries: int = Field(5, description='Amount of retries on error')
    url: str = 'localhost'
    port: int = 443

# Create a global variable which then can be used throughout your code
# It implements the file loader, yaml logic and optional callbacks in case of value change.
CONFIG = create_app_config(MySimpleAppConfig())

# Use with type hints and auto complete
print(CONFIG.port)

# Load configuration file from disk.
# If the file does not exist it will be created
# Loading will also change all values of CONFIG accordingly
CONFIG.load_config_file('/my/configuration/file.yml')

Created yaml file
retries: 5  # Amount of retries on error
url: localhost
port: 443

Since this is depended on another library I'm not sure if you want it in your docs.
If you do, I'll gladly provide a pr that adds something in examples.

For clarification: let's assume the alias is shown instead of the original attribute name. Does the original attribute name appear anywhere (e.g. where the alias was shown previously)?
I suggest autodoc_pydantic_field_replace_name_with_alias as a configuration property.

Yes - my first idea would be to not show the name at all.
However if we just add a switch to swap name and alias then we have all use cases covered (e.g. autodoc_pydantic_field_swap_name_and_alias or autodoc_pydantic_field_swap_name_with_alias). The showing of the name would then be controlled by autodoc_pydantic_field_show_alias.
e.g.:
field: int = Field(1, alias="field2")

Config switch
output

show_alias
attribute field: int (alias 'field2')

not show_alias and swap_name_and_alias
attribute field2: int

show_alias and swap_name_and_alias
attribute field2: int (alias 'field') or attribute field2: int (name 'field') since alias is misleading

I currently can't think of a use case where one would show name and alias in switched order so both is fine for me.

This looks good to me - I agree with autodoc_pydantic_field_swap_name_and_alias.
We have to keep in mind, that field summary list needs to be modified to if name and alias are swapped. Otherwise we would have an inconsistency between the field summary in the model's header and the actual field names.

@spacemanspiff2007 This is accomplished by #119.

Documentation on the new configuration property autodoc_pydantic_field_swap_name_and_alias: click
Updated documentation on the example for swapped field name/alias: click

Before merging the related PR, it would be great if you could test the behavior on your site. To do so, please install the current dev release in your doc-building-environment via pip install<EMAIL_ADDRESS>and rebuild your docs.
The actual implementation was more complex because of interactions with other configurations (model-show-field-summary, model-show-validator-summary, validator-replace-signature, validator-list-fields) that require a replacement of field name with field alias for consistency reasons. Otherwise, we would show the field alias in one place but the the field name elsewhere.

Thank you very much for the implementation!
I've tested it and it works as desired:
thread_pool: ThreadPoolConfig = Field(default_factory=ThreadPoolConfig, alias='thread pool')

generates

This is included in v1.7.0 (released just few minutes ago).


Add small test exposing issue from #7794 and suggestion for _wrap_numpy_scalars fix

_wrap_numpy_scalars relies on np.isscalar, which incorrectly labels a single cftime object as not a scalar.
import cftime
import numpy as np

c = cftime.datetime(2000, 1, 1, calendar='360_day')
np.isscalar(c)  # False

The PR adds logic to handle non-numpy objects using the np.ndim function. The logic for built-ins and numpy objects should remain the same.
The function logic could possibly be rewritten more clearly as

    if hasattr(array, "dtype"):
        if np.isscalar(array):
            return np.array(array)
        else:
            return array

    if np.ndim(array) == 0:
        return np.array(array)

    return array

[x] Closes #7794
[x] Tests added
[ ] User visible changes (including notable bug fixes) are documented in whats-new.rst
[ ] New functions/methods are listed in api.rst

It was rather to avoid casting 0-dimensional non-scalar numpy objects.
>>> a = np.array("abc")
>>> np.isscalar(a)
False
np.ndim(a)
0

Hi there, I have a library that could benefit from this fix, any updates here?


Settings Sync Button not clickable

Settings Sync Button not clickable
Connect to any codespace and try to click the button
Settings cannot be synced
Logged in to my Jetbrains Account for the License in Gateway so this is working, but the Sync cannot be enabled in the PHPStorm client
OS: Windows 10
OS Version: 10.0
OS Architecture: amd64
Java Version: 17.0.5
Java Runtime Version: 17.0.5+1-b653.14
Java Vendor: JetBrains s.r.o.
Available CPUs: 16
Max Memory: 536870912
Free Memory: 66056416
Total Memory: 175112192
IDE Version: 2022.3
IDE: JetBrains Gateway 2022.3
Plugin Version: <IP_ADDRESS>1
Plugin path: C:\Users\basti\AppData\Roaming\JetBrains\JetBrainsGateway2022.3\plugins\github-codespaces-gateway
Plugin ID: com.github.codespaces.jetbrains.gateway

JetBrains is working on adding this functionality. Here's their tracking ticket so that you can keep an eye on it


Correction for raw affiliation Infectious Diseases and Intensive Care Unit, Pontchaillou University Hospital, Rennes Cedex 9, France; UMR_S1230 BRM, Inserm, University of Rennes, Rennes, France

Correction needed for raw affiliation Infectious Diseases and Intensive Care Unit, Pontchaillou University Hospital, Rennes Cedex 9, France; UMR_S1230 BRM, Inserm, University of Rennes, Rennes, France
raw_affiliation_name: Infectious Diseases and Intensive Care Unit, Pontchaillou University Hospital, Rennes Cedex 9, France; UMR_S1230 BRM, Inserm, University of Rennes, Rennes, France
new_rors: 02r25sw81;015m7wh34;02vjkv261;031y0x195
previous_rors: 02r25sw81;015m7wh34;02vjkv261
works_examples: W4386847676
contact: e95f23c9a99c705ff2a8577e6c6a97aa:bb11817ec4271f077188e803193e206b @ univ-rennes.fr

This issue was accepted and ingested by the OpenAlex team on 2024-10-10. The new affiliations should be visible within the next 7 days.