doc: define the first class ports

build.golang.org links to "First Class Ports":
https://github.com/golang/go/wiki/PortingPolicy
But that doesn't say which ports are the first class ones.
Further, the checkbox on https://build.golang.org to show only first class ports seems to only filter by GOOS, not (GOOS,GOARCH), so it shows things like linux-mips64le and linux-ppc64 as being first class, which I don't think is true. We don't even have linux-ppc64 big-endian builders at the moment.
Let's clarify.

I'm pretty sure about these ones:

OS
arch

Windows
386, amd64

Linux
386, amd64, armv6l

Darwin
386, amd64

Any others, someone will have to make an argument for.
FreeBSD? The runtime is not considered stable, so I'd make a case for it not being considered first-class until these issues are resolved.

/cc @mdempsky @adg @ianlancetaylor @robpike @griesemer @quentinmit @rsc

See also #14612.

My vague understanding is that the first class ports are the ones for which we provide a binary download.  According to https://golang.org/doc/install.html that is "FreeBSD (release 8-STABLE and above), Linux, Mac OS X (10.8 and above), and Windows operating systems and the 32-bit (386) and 64-bit (amd64) x86 processor architectures."  According to the downloads page, that is darwin/amd64, freebsd/386, freebsd/amd64, linux/386, linux/amd64, linux/arm, linux/s390, windows/386, windows/amd64.

@ianlancetaylor, that's necessary but not sufficient. That's one of the three conditions listed at https://github.com/golang/go/wiki/PortingPolicy#first-class-ports
We now distribute binaries for s390x, even though the majority of Go contributors are unable to contribute fixes to it.
We also ship binaries for FreeBSD, despite instability, and we didn't stop the Go 1.7 release for it. If we had runtime crashing bugs for Linux (or even Windows), we certainly would've debugged more before shipping. That shows that FreeBSD is not a first class port.

We had a discussion about including ppc64le as a first class port so its binary would be included on the dl page here https://groups.google.com/forum/#!topic/golang-dev/D1-F7mDP65Y
I would like to request ppc64le be included as a first class port.

@laboger, those are two different things. What you actually want are binary downloads. We did that for FreeBSD and s390x, even though I argue neither of those is a first class port. It's possible we could host ppc64{,le} binaries, but I don't think we're ready to make ppc64 a first-class port just yet. I'll let @ianlancetaylor, @dr2chase, et al chime in.

Also, even if a port meets the three conditions on the PortingPolicy page, it doesn't automatically become a first-class port.
That's why we need a page that explicitly lists the first-class ports.

A first-class port by definition is one we deem to be so. List them (which we do) and the question is answered.
A separate question is the set of criteria for deciding when a port is first-class, or no longer first-class. I don't believe those criteria need to be rigid. We can use judgment.

PortingPolicy says

A first class port has these properties:

Broken builds block releases
Official binaries are provided
Installation is documented at http://golang.org/doc/install

Those are supposed to be all true or all not, for each port. More specifically, I believe the list on /doc/install under supported systems is the master list of first-class ports. I have certainly edited that list in the past with that in mind.
We have in the past agreed to put up binaries for other ports, but we should do a better job of clarifying them on the download page as not officially supported.

We need to decide how to label these binaries-but-not-first-class downloads. "2nd-class" sounds bad. "Community" isn't quite right. "Preview" also doesn't entirely correct.
I don't want a label that suggests "Flaky" or "Not so good".

Unsupported?

Unofficial?

Except we do support them, and they come from us, so they're kinda official?

If it is just for website copy, maybe First Class ports and Other ports, and allow conversational implicature to do the rest.

"Silver ports"

Incomplete

@josharian, agreed. That's effectively what we have now with "Featured Downloads" and then the table.
We can make the table split into two sections:

Primary Ports
Other Ports

(I don't like using the word "class" too prominently.)
SGTY, @broady?

SGTM. Will send a CL this week.

I've updated the wiki to match @cbro's split of the download page binaries.
The wiki at https://github.com/golang/go/wiki/PortingPolicy#first-class-ports now says:
The current first class ports are:

linux/amd64
linux/386
linux/arm
darwin/amd64
windows/amd64
windows/386

We distribute binaries for other GOOS/GOARCH pairs (other "ports"), but they are not "first class" by this definition.


Selection broken in core-selection when the selected list is updated with same elements but different order

I'm updating the selected list passed to core-selector with the same elements but in reverse order, this cause some elements change his state to un-selected.

Using JsArray for selected list avoid the issue.

Yes, that is unfortunately expected behavior. The only supported way currently of selecting and unselecting items  are the selectItem and setItemSelected methods. I didn't realize that it could work to simply modify the list if its a JsArray, but that makes sense. The actual reason this doesn't work is because the js proxies for the items change each time we call jsify, but that is a no-op if its already a JsArray.

This has come up a few times so I think I will leave this bug open as a reference for people.
I think there is a bug somewhere to use the same instance of the js proxy for a dart object if you call jsify on it multiple times, so once that is fixed then this will no longer be an issue.


Build system for VSCode extension

I added some code proposal related to vscode plugin building.
After logging in to travis online build system via github account, there is a need to:

add  GITHUB_TOKEN as secret variable (not shown in build)
enable building this repo (slider)

After extension is in some shape, there is a way to also deploy to VSCode store (sample for properly named git tags):
https://github.com/rogalmic/vscode-bash-debug/blob/master/.travis.yml

BTW, what's the plan for shipping the C# part of the extension? I was thinking about a nuget package with the language server and some bogus csproj file. Something like:
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
      <PackageReference Include="Avalonia.Ide.LanguageServer" Version="1.2.3" />
  </ItemGroup>
</Project>

    class Program
    {
        static void Main(string[] args)  => Avalonia.Ide.LanguageServer.Program.Main(args);
    }

That way we only need to target netstandard and could restore for available target runtime on user's machine.

With this change, C# binaries are included in vsix package.
I just build the C# part together with VSCode extension:
.travis.yml (pack -> prepack is called here, which will copy output files via preparescript.js)
      - cd $TRAVIS_BUILD_DIR/src/Avalonia.Ide.LanguageServer/ ; dotnet restore ; dotnet build --configuration Release
      - cd $TRAVIS_BUILD_DIR/vscode-extension/ ; npm install ; npm pack ; vsce package

then include in package:
package.json:
        "prepack": "node ./out/preparescript.js",
        "pack": "vsce package",

preparescript.ts
https://raw.githubusercontent.com/rogalmic/Avalonia.Ide/master/vscode-extension/src/preparescript.ts
To filter some of output file, we can change preparescript.ts or modify .vscodeignore

Seems i have not added latest changes to pull request, I will rebase the newest changes and make new PR.

dotnet build doesn't produce a runnable build of the application, unfortunately. We need to either run dotnet publish for all three platforms or ship binaries via nuget.

You haven't included .travis.yml into the PR. If you did I would probably not merge it. We are using Cake/Nuke for actual building on local/CI machines and Azure Pipelines for CI.

Now I see what you mean.
So we would require netcore SDK installed on users PC, but i guess this is ok for IDE extension anyway. This should make deployment easier as well.

If we manage to avoid native binaries we should be able to run the app using the shared runtime, but it has to be exactly same version (e. g. 2.1.6) that's referenced in deps.json generated by the build.

For reference:
https://github.com/kekekeks/Avalonia.Ide/pull/18


Search and replace goes into all modules in site-packages

Visual Studio 2022
When using search and replace in a project with a python virtual environment it goes into the installed modules.
Steps to Reproduce

Create a virtual environment
Install some modules
Make a folder in site-packages for your own package you are working on.
Use search and replace and it will go into every package under site-packages  (using replace all is then a disaster)

Expected behavior
I expect search and replace to work only on source code that is actually part of my project
disclaimer
I don't recall having this issue in 2017 or 2019 but not sure I ever made my own module in site-packages in a virtual environment as part of my project.
Thanks

Hi there, the File types textbox can exclude files. Any path or file type prefixed with the “!” character will be excluded from the search. For instance, you can add !*\site_package* to the file types list to exclude any files in a site_package folder. Could you give it a try and let us know if that works? Thanks!

This project is a python package so to test while coding it I need it in the site-packages of the virtual environment.  Using a filter means I would have to exclude every other package in installed.  If I filter site-packages it would ignore my code then.
Is there some other setting so it only searches files that are actually part of your project ?  This should be doable since all files part of the project are listed in the VS project file.
Thanks

Hi @therealzoomgod, unfortunately, I don’t think we have that capability. That would be a new feature. But thanks for bringing this up! 😊 The walkaround for now is probably do the search and replace twice, one in the folder you made in the site-package, and do another search to exclude the site package folder.


Update grunt-karma.js

Fix for bug: arguments to path.resolve must be strings #142
I changed the grunt-karma.js file by adding data.files =_.flatten(data.files); to line 85.  The _.flatten used to be there in the 0.9 version and the [].concat is not flattening like it should on my machine.
To test it pass files: [['a.js','b.js','c.js'],'d.js','e.js'] under karma -> options -> files in the config and it will break then add the line of code and it will work.

Thanks, could you change the commit message to something following http://karma-runner.github.io/0.12/dev/git-commit-msg.html e.g.
fix: Flatten files array.

Closes #142


The Go back button in the project list misaligned

If you hover of the <- Go back button in the My projects screen:

You can see that the text is misaligned. This is more prominent in high contrast mode:

P3 won't fix.


Treating several alternative TS definition

Currently the tool fails if several alternative ts definitions are present.

@olejandro Does VEDA support several alternative ts definitions? I didn't know that; Is there an example of using such somewhere?  I know scenario-specific ~Timeslices tables, but I think only one table should be included in any model run?

Thanks @Antti-L. Yes, I believe we are writing about the same issue. Tbh, I don't know what Veda would do if several  scenario files each with it's own ts definition were included in a scenario group...
The tool requires only one such definition to be present; it fails when there is more than one.
The tool already accepts passing a list of files to be processed (as an alternative to processing all the files in a folder). So maybe the tool should advise the use to use this functionality to include a single ts definition?

Yes, agree, I think it should advice the user about that funcionality if such an error occurs.

On the other hand, it really depends on the use case. What I write above probably makes sense, if the user intends to run the model. It doesn't make sense if the intention of the user is to use the data in another UI, e.g. TIMES MIRO App that has scenario management capabilities. 🤔


Explicit effect types

This addresses https://github.com/Philippus/elastic4s/issues/2379.
Overall I deleted more code than I've added which is a good sign.

AkkaHttpClient and PekkoHttpClient were wrapping a lot of Future's under the hood – this is now removed and looks much cleaner.
JavaClient now uses Scala Promise/Future mechanism that doesn't require any 3rd-party libraries and that was created to replace callback mechanisms, I think it is better this way
SttpRequestHttpClient was a wrapper around Future monad's Sttp implementation – now allows any monads that are supported by Sttp, feels like a proper way to use it.
Testkit now explicitly define that Future effect is used, which was used under the hood before as well, just not explicitly shown.
After the change Executor's became empty since all handling is now performed on the Client's level. I left them just to show that they are now obsolete, will be happy to remove them as well.
After removing Executors, I tend to think that effect-zio, effect-zio-1, effect-cats, effect-cats-2, effect-monix, effect-scalaz modules can be also removed as a future improvement (not sure about that, this may require cats dependency to reuse Functor that is now defined manually in elastic4s-core and that those modules implement).
ZIO tests are not compiling now because I don't know which ZIO client to use. But it doesn't make sense for me to have ZIO implementation without ZIO-based http clients, not sure what to do here.

I would add that the way the callback mechanism was defined and used looked like a big hack for me, that was maybe historically implemented because library started with only JavaClient? I didn't check this assumption, but overall, everything that Executor's and Client's were doing, is mapping from K[_] monad implemented by 3rd-party clients, through (Either[Throwable, A]) => Unit callback, to F[_] monad used on the top-level. So there was this clunky 3-step transformation that hidden a lot of stuff.

To fix cats-effect tests, this PR https://github.com/Philippus/elastic4s/pull/3118 needs to be merged first and then http4s client needs to be used which supports attributary effects

Tests are now fixed. I used sttp ZIO backends to test ZIO implementations.

After this change, sttpFutureBackend can be marked as Provided in build.sbt, since the library now supports multiple Sttp backends, there is no reason anymore to depend on a future backend (maybe we can create a separate issue for this)

After this change, sttpFutureBackend can be marked as Provided in build.sbt, since the library now supports multiple Sttp backends, there is no reason anymore to depend on a future backend (maybe we can create a separate issue for this)

I think this is a big change, We only can release this in a major version bump (hopefully 9). So, I guess We should rip the band-aid by removing Executor and clean up things like this in subsequent prs. I could help if needed.

@lenguyenthanh yes backwards compatibility went sideways with this PR. Still, I think it's a change long needed. In the last commit custom executors were replaced with a single generic Executor, that kinda does the same. Still Executors are used in tests, where they accomplish a role of overriding ElasticRequest and adding some headers in the request lifecycle. Maybe someone uses them this way? 🤔

Still Executors are used in tests, where they accomplish a role of overriding ElasticRequest and adding some headers in the request lifecycle. Maybe someone uses them this way? 🤔

I think We can achieve the same functionality with HttpClient[F] => HttpClient[F] 🤔. So, We can mention that what used to do with Executor now can achieve with HttpClient.

Yeah, I can think this can be achieved with ElasticRequest => ElasticRequest method even

Indeed this will not be a change that can be merged without a major version bump. I can make a RC release or something like that if that is handy for testing.

Indeed this will not be a change that can be merged without a major version bump. I can make an RC release or something like that if that is handy for testing.

An RC is great, thanks! I guess We can have this and #3118 and maybe another pr to removing Executor (as it is obsolete) for the new major release.

I think we will also need to change the docs in that case, and can add removal of Sttp Future backend as a default dependency for the Sttp client. I've been also thinking how to get rid of elastic4s-effect-* modules, since they now only define a Functor, but it doesn't look like they can be easily removed.

I think we will also need to change the docs in that case, and can add removal of Sttp Future backend as a default dependency for the Sttp client.

yes, We definitely need docs and a proper change log for this.

I've been also thinking how to get rid of elastic4s-effect-* modules, since they now only define a Functor, but it doesn't look like they can be easily removed.

I think the decision We need to make here is do We want to pull cats dependencies to core module for cats.Functor or not. If We don't, We need to keep these modules.
I prefer to user cats.Functor directly as I believe it's quite ubiquitous in Scala world at this point and it keeps binary compatibility for last several years.

@lenguyenthanh the problem with cats.Functor is that it will be hard to make it compatible with cats-effect-1. I doubt if people still use it tho. As well as scalaz, monix, cats-1. Maybe those modules should be removed, I don't know?

IMHO, I think We can and We should remove all elastic4s-effect-* module as you mentioned earlier. With version 9, it'll be a big breaking change but We can keep maintain version 8 for like another 6 months (back port all bug and security fixes). I can help on that if needed as well.
But this is ultimately @Philippus's decision.

this looks great, thanks @igor-vovk for your work!
I think We should create a branch (something like v8.0.0) to merge all @igor-vovk's prs and then publish a RC, what do you think @Philippus ?

@Philippus We would very appreciate, if you can comment on how to proceed this PR (and other related pre as well) 🙏
I think this is a great improvement as it's simplify the code base a lot, remove many concepts and that leads to less allocations, better ergonomic code. It is especially helpful for cats users as We can use async IO from the top to bottom without any intermediate layers.

Hi @Philippus sorry to ping you again and again. But I really love to try this other PRs that @igor-vovk's spend time to work on.
Could you have some word about these prs?
It's fine if you don't think this is the way forward but please tell us so.

I will try to look into it soon, have to find some time.

thanks @Philippus, much appreciated 🙏


Fix NMS setting of kitti_models/second_multihead for evaluation / postprocessing

If MULTI_CLASSES_NMS is set to False, the evaluation of the model based on the config
tools/cfgs/kitti_models/second_multihead.yaml will crash with the output below.
If MULTI_CLASSES_NMS is set to True, the evaluation runs as expected.
2020-09-02 12:54:51,403   INFO  *************** EPOCH 1 EVALUATION *****************

eval:   0%|          | 0/943 [00:00<?, ?it/s]Traceback (most recent call last):
  File "train.py", line 217, in <module>
    main()
  File "train.py", line 211, in main
    dist_test=dist_train
  File "/scratch_net/hox/mhahner/repositories/OpenPCDet/tools/test.py", line 121, in repeat_eval_ckpt
    result_dir=cur_result_dir, save_to_file=args.save_to_file
  File "/scratch_net/hox/mhahner/repositories/OpenPCDet/tools/eval_utils/eval_utils.py", line 56, in eval_one_epoch
    pred_dicts, ret_dict = model(batch_dict)
  File "/home/mhahner/scratch/apps/anaconda3/envs/PCDet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/mhahner/scratch/apps/anaconda3/envs/PCDet/lib/python3.6/site-packages/torch/nn/parallel/distributed.py", line 376, in forward
    output = self.module(*inputs[0], **kwargs[0])
  File "/home/mhahner/scratch/apps/anaconda3/envs/PCDet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 493, in __call__
    result = self.forward(*input, **kwargs)
  File "/scratch_net/hox/mhahner/repositories/OpenPCDet/pcdet/models/detectors/second_net.py", line 21, in forward
    pred_dicts, recall_dicts = self.post_processing(batch_dict)
  File "/scratch_net/hox/mhahner/repositories/OpenPCDet/pcdet/models/detectors/detector3d_template.py", line 241, in post_processing
    cls_preds, label_preds = torch.max(cls_preds, dim=-1)
TypeError: max() received an invalid combination of arguments - got (list, dim=int), but expected one of:
 * (Tensor input)
 * (Tensor input, Tensor other, Tensor out)
 * (Tensor input, int dim, bool keepdim, tuple of Tensors out)

The solution works!


⚠ Fortnite has degraded performance

In cc377eb, Fortnite (https://fortnite.com) experienced degraded performance:

HTTP code: 200
Response time: 1628 ms

Resolved: Fortnite performance has improved in 6ef4759.


Improve the limits between ’autoplay‘,’ loop‘, and ’centeredSlides‘ in the configuration.

Clear and concise description of the problem
When I want to add the view to auto-center in an autoplay and looping carousel graph, the carousel will have the problem of ignoring certain images and skipping to continue the carousel.
e.g：（vue3 & Let's say I give six pictures & "swiper": "^9.1.0"）

... ...
When I configure it this way, the order of the carousel is played directly from the first image to the fourth image by ignoring the last two images.
At the same time, when the last image is about to play to the first image, a gap appears to the left of the carousel container.
However, when I remove the desired centering configuration, the carousel does not have these two problems.
Removing this requirement will be a little uncomfortable.
I hope the limitations between this configuration will be resolved. If solved, it will immediately implement the desired needs at the time of configuration.
Suggested solution
Sorry, I'm afraid not
Alternative
No response
Additional context

Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this feature?

[ ] I'm willing to open a PR

<template> <Swiper loop :speed="800" :slidesPerView="'auto'" :autoplay="{ delay: 3000, disableOnInteraction: false }" :spaceBetween="28" pagination>             <SwiperSlide v-for="(image, index) in images" :key="index" class="embla__slide">                             <img :src="image.src" :alt="image.alt" />             </SwiperSlide>         </Swiper> </template>
The blank space above is this paragraph

https://codesandbox.io/p/sandbox/gallant-tree-mb4tf2?file=%2Fsrc%2Fcomponents%2FHelloWorld.vue&selection=%5B%7B%22endColumn%22%3A12%2C%22endLineNumber%22%3A31%2C%22startColumn%22%3A12%2C%22startLineNumber%22%3A31%7D%5D
this is the demo.
Sorry, I don't know much about the codesandbox. So, I put all the relevant code in.

你好@Ljry依依。请通过代码沙盒或最小的 GitHub 存储库提供在线复制。您可以在代码沙盒中分叉我们的一个演示以开始使用。如果 3 天内没有活动，则标记 者 的问题将被关闭。missing demo

20230302_165732.mp4
https://www.aliyundrive.com/s/3mt67Uwijvd
Here is a screen recording of the demo

[ DONE ] When I configure it this way, the order of the carousel is played directly from the first image to the fourth image by ignoring the last two images.
[ NO ] At the same time, when the last image is about to play to the first image, a gap appears to the left of the carousel container.
[ NO ] When I do a refresh, the picture interval set by 【:spaceBetween="xx"】  changes to no. The result you see is that when the page is refreshed, the carousel flashes a style with no gaps.

[ DONE ] When I configure it this way, the order of the carousel is played directly from the first image to the fourth image by ignoring the last two images. --->The style part I set conflicts with its own style.
[ NO ] At the same time, when the last image is about to play to the first image, a gap appears to the left of the carousel container.
[ NO ] When I do a refresh, the picture interval set by 【:spaceBetween="xx"】 changes to no. The result you see is that when the page is refreshed, the carousel flashes a style with no gaps.

Swiper v11 comes with reworked and update loop mode. If your issue is replicated with v11, create a new one


Fix missing env in docker context generator task

Patch for 0.9.13.
This PR is only for approval purposes and shouldn't be merged with master. Only 9e658d2 needs to be reviewed, the rest is from the v0.9.12-gradle tag.

@chanseokoh Yeah, going to fix maven in a different branch.

Closing and releasing: https://github.com/GoogleContainerTools/jib/pull/1150


language client latest version 6.6.1, webpack build doesn't work.

It produces the above error when building with webpack with latest version languageclient.
the same error can be produced in the example project.
cc @kaisalmen

Hi @OliverwengFiltered this seems to be a not tree-mended version of monaco-editor. Try clean node_modules and see if you have mismatching monaco-editor versions in your dependency list. If you have a workspace and two different versions you may also end-up with a not tree-mended one.
We need to fins a solution for: https://github.com/TypeFox/monaco-languageclient/issues/550

The patch changes in the last version of monaco-vscode-api, removing files that were kept before, without changing the editor version, and it can produce that error. The solution is indeed to reapply the treemending (running npm ci should be enough)

@kaisalmen @CGNonofr
both monaco-editor and vscode version is matching the instructions. monaco-editor is 0.44.0, and vscode is 1.83.3.
did npm ci , also tried removing the whole node_module and package-lock.json, it still reproduces the same error (standaloneGotoLineQuickAccess module not found on webpack build).
https://github.com/OliverwengFiltered/monaco-test
you can reproduce by using the above repo.

Ok that's because monaco-editor-webpack-plugin relies on the monaco-editor metadata and we didn't update it
You can configure the plugin as follow:
            new MonacoWebpackPlugin({
                features: ['!gotoLine', '!inspectTokens', '!quickCommand', '!quickHelp', '!quickOutline', '!referenceSearch', '!toggleHighContrast']
            })

@CGNonofr
the configuration looks like disabling a few features so they won't be built with webpack. Wonder if there is an alternative to solve the problem instead of disabling features.

It should be disabled because they are replaced by the vscode version of the feature

@CGNonofr  confirmed the above configuration for monaco-editor-webpack-plugin works, thank you!


refactor: Remove context from resolving

Closes https://github.com/prql/prql/issues/1041

While these are small, I actually think they're reasonable issues, particularly for people who are new to the whole codebase. So if we can leave some for folks, and they get traction, great (and if not then we can either leave them longer or do them ourselves...)


Make it easier for the UTxO selection algorithm to split up unrelated assets.

Summary
This PR adjusts the UTxO selection algorithm so that when selecting for a given non-ada asset under the optimal selection strategy, we no longer prioritise the selection of UTxOs with fewer numbers of unique assets.
(In contrast, when selecting for ada, we preserve the existing behaviour of always prioritising the selection of pure-ada UTxOs over UTxOs with other assets.)
Motivation
This PR assumes the desirability of the following properties:

assets that are frequently spent together should, over time, become bundled together within the UTxO set.
assets that are frequently spent separately should, over time, become located separately within the UTxO set.

One intuitive reason for this is that if a user commonly attempts to create transactions that spend some asset a, then we would like to reduce the (amortised) probability that the user is also forced to spend assets that are unrelated to the transaction, assets that can only be returned as change (which increases the amortised size and cost of transactions).
Furthermore, for a given pair of assets a and b, if the user shifts their spending pattern from one where a and b are typically spent together to a pattern where a and b are typically spent separately, then we ideally want the UTxO selection algorithm, when repeatedly applied over time, to cause the UTxO set to evolve away from a distribution where a and b are typically bundled together toward a distribution where a and b are usually separate.
By removing the bias toward selecting smaller UTxOs over larger UTxOs, we make the following evolutionary changes equally easy:

Evolution type 1: separation of assets
Evolving from a distribution where assets a  and b are typically bundled together to a distribution where a and b are usually separate.
Evolution type 2: colocation of assets
Evolving from a distribution where assets a  and b are usually separate to a distribution where a and b are typically bundled together.

Without this PR, the former type of evolution is more difficult than the latter, for no good reason.
Context
When the multi-asset UTxO selection algorithm was first written, there was no explicit choice of selection strategy. In order to maximise the chance that a given selection would not exceed transaction size and cost limits, the algorithm used the following fixed strategy when selecting for a given asset a:

First, attempt to find a UTxO that contain a and no other assets.
Then attempt to find a UTxO that contains a and just one another asset.
Finally, attempt to find a UTxO that contains a and any number of additional assets.

However, since then:

the UTxO selection algorithm was upgraded to accept a SelectionStrategy parameter, with two possibilities:

SelectionStrategyOptimal: attempt to select around twice the minimum possible amount of each asset from the UTxO set, making it possible to generate change outputs that are  roughly the same sizes and shapes as the user-specified outputs.
SelectionStrategyMinimal: attempt to only select just enough of each asset from the available UTxO set to meet the minimum amount, terminating selection as soon as the minimum amount of each asset has been covered.

the balanceTx function was upgraded to use SelectionStrategyOptimal by default, and then fall back to SelectionStrategyMinimal in the event that the optimal strategy fails.

Given that we always have the safe option of falling back to the minimal strategy, it's no longer necessary to artificially constrain the optimal strategy so that it prioritises the selection of UTxOs with fewer assets.

Closing after discussion with the HAL team.


decryption

how would program know about the end of the secret message....please help needed

https://github.com/MasonEdgar/DCT-Image-Steganography/blob/a4eee691cc413117952f97f910537956abf4e439/extract_stego_image.py#L41

won't it decode total dct blocks


Proto pollution vulnerability when using z.record(z.object())

Hello,
I've found a minor security vulnerability when using z.record(z.object()) with proto pollution. Consider the following example:
  const schema = z.record(
    z.object({
      b: z.string(),
    })
  );

  const data = JSON.parse(`{
    "c": {
      "b": "world"
    },
  "__proto__": {
    "b": "world2"
  }
}`);

  const result = schema.parse(data);

  console.log(result.b); // world2

I would assume result.b should be undefined after the parsing, but instead the data in __proto__ is polluted to the object, i.e accessing result.b gives me world2

Fixed in https://github.com/colinhacks/zod/pull/2239


usage docs

Can u write a doc specifying how to use this panel. I know it's in development but i want to use it.

Usage is shown on the homepage: https://emojipanel.js.org
There's a big warning on the readme because you can't currently use it to write emojis to an input.


🐛 Schema for 1.8.0 missing

Environment information
CLI:
  Version:                      1.8.0
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v21.7.1"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.7.0"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

npx @biomejs/biome init generates this biome.json:{
    "$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
    "organizeImports": {
 	   "enabled": true
    },
    "linter": {
 	   "enabled": true,
 	   "rules": {
 		   "recommended": true
 	   }
    }
}

The advertised schema links to a 404 page.

Expected result
The schema should be available at the URL generated by npx @biomejs/biome init
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

Working on it


Types/Functions for library export based on model

Two items of focus I wanted to call out here:

Enhance the ability for users of the models via imports into other logic/projects based on version. Make it easy to select and important 1 -> N versions of the models easily.

Create generic object creation functions such that consumers do not need to account for the complexity of versions or models. Given an OSCAL file ([]bytes?) return the applicable versioned model. We can likely break this down by model.

CC: @mike-winberry

Follow on to #29

The problem with two, is that the return value will always have to be generic ie interface{} so anywhere it is consumed the implementor will have to be aware of the type(version) that is being returned in order to properly cast it and access fields, otherwise go won't know how to access any of the fields.
The solution I can see for pipeline things is abstracting the functions against the map[string]interface{} that the validator implements, but that is pretty computationally inefficient as it requires a bunch of iteration and type casting, or recursion and typecasting.
Otherwise we will likely need to version our types in a way that is coherent to consumers. And then add some logic that at least Marshalls and unmarshalls into the correct versions struct and returns as interface{} for them to type cast once for the version they are expecting.

This is avoided if they just pull the type file they want from the go-oscal library and they are only worried about one version, but that adds developer maintenance and complexity that would likely lead to dead code and not having version purity with our tools, which I think would good to avoid, Im not sure how it is currently being used and wether to attempt to steer users into consistency and automation early by versioning our types explicitly.

I think 1 and 2 are very easily implemented, I think the main set backs are going to be documentation and identifying the persona we want to target:

Pipeline users

We should abstract all use of the typing away from the pipeline users and focus on I/o compatibility so they only really need to focus on "piping" commands or finding and diagnosing problems early and in a simple consumable way.

Go developers

I would have an expectation that go devs are at least familiar with versioned types and Golangs static typing/inflexibility of the Struct type.

Good point - Item 1 is valuable in its own right - allowing go developers to consume explicit versions.
2 is certainly more tricky. In lula for example we may not know what the version of the component-definition really is until parsing (nor does lula really care at this point in time to be honest - until a change in the component-definition schema impacts implemented-requirements). As you noted - handing this off to go-oscal does not solve the problem as the returned interface{} still has to be type cast...
Persona here (in my opinion) is go developers. I believe we'll see consumers writing functionality with go-oscal that are ultimately included in tools that a run in pipelines.

Closing
Handled in #44


Update JenkinsPipelineUnit to 1.7

Related to https://github.com/AbletonAppDev/devtools/issues/2999

@ablbot rebase

Unassigning @dgl-ableton since she is on holidays.


Cannot delete the project

Details

Read the Docs project URL:
https://readthedocs.org/projects/tregexpr/

Build URL (if applicable):
https://readthedocs.org/dashboard/tregexpr/delete/

Read the Docs username (if applicable):
masterAndrey

Expected Result
Project deleted
Actual Result
https://readthedocs.org/dashboard/tregexpr/delete/
Fail.  Check back in a bit!

Similar issue
https://github.com/rtfd/readthedocs.org/issues/3866

Ups - I tried may be a 10 times and at last it's deleted


added SkylineBatch to Skyline admin installer

fixed SkylineBatchTest to work from Skyline's build directory as well as its own build dir (i.e. when it's run from IDE)

@alinmarsh @brendanx67 The build agent doesn't have R installed. But Skyline has an RInstaller class. Why doesn't SkylineBatch use that?

@alinmarsh @brendanx67 The build agent doesn't have R installed. But Skyline has an RInstaller class. Why doesn't SkylineBatch use that?

@alinmarsh @brendanx67 The build agent doesn't have R installed. But Skyline has an RInstaller class. Why doesn't SkylineBatch use that?

My understanding is RInstaller is more set up for finding and installing a specific version of R. SkylineBatch finds all installed versions of R to allow the user to customize the version they want to use for each individual script. However, SkylineBatch will display an error if there are no R installations so maybe I could use RInstaller in this case?

Ali is right. In this case, we assume that the user of SkylineBatch has set up their own R with whatever script they want to run and they just want to point SkylineBatch at the right location to run it. We are not trying to offer R installation help, as we do with external tools. This is supposed to be a replacement for a set of batch scripts (*.bat files) that I have used a lot and even posted with webinars on the Skyline website. I have generally worked with my own R scripts in R Studio while working with these batch scripts.

This is ready to review/merge then. The SkylineBatchTest has a bjam target but it isn't run by default or on TeamCity.

This is ready to review/merge then. The SkylineBatchTest has a bjam target but it isn't run by default or on TeamCity.


Problem with shunt capacitance to ground

While drawing a flux tunable two island transmon I was not able to implement correctly the shunt capacitance to ground of left and right island.
graph = nx.MultiGraph()
graph.add_edge(1, 2, element='C')
graph.add_edge(1, 2, element='J')
graph.add_edge(1, 2, element='J')
# shunt capacitances to ground
graph.add_edge(0, 1, element='C')
graph.add_edge(2, 3, element='C')

circuit = cq.CircuitQ(graph, ground_nodes= [0,3])
circuit.h

where the error is
Exception: Specified ground node 0 is not an active node.
It seems this error is present in also more complex structures, whenever a ground node is not terminated at some qubit node. One could terminate all the ground nodes of a complex circuit to the same qubit ground node for example, although the graph get a bit confusing and makes the ground_nodes= parameter useless, and I am not sure if it is interpreted correctly since both C will be called C01

Hi Alessandro,
thank you for your issue and food for thought :)
For the quantization of a circuit, circuitq follows the procedure outlined by Vool and Devoret. They demand that any ground node, should be an active node, where an active node is a node to which at least one inductive element is connected. If I am not mistaken, the reason for this is the construction of the spanning-tree which is used as a gauge to define the flux variables of the inductive branches. That's the reason you get the exception, which is a design choice.
Furthermore, in your above example, setting the 0 and 3 node as ground nodes merges those nodes to one node with the 0 potential level. This merged node is solely connected to capacitors, which means it will only appear in the kinetic, but not in the potential part of the Hamiltonian. Those completely capacitive nodes are not supported in circuitq. If there are good reasons for it, we could consider adding such nodes - however merging serial capacitors (which is automatically done by circuitq) resolves this problem most of the time.
Do you really need the shunt capacitances to ground? I understand that they are there coming from a manufacturing point of view, but if you only want to study a tunable transmon, using
graph = nx.MultiGraph()
graph.add_edge(1, 2, element='C')
graph.add_edge(1, 2, element='J')
graph.add_edge(1, 2, element='J')

will be enough to otbain the relevant physics. (circuitq will automatically ground one of the two nodes - which you can also specify of course).
In general - if you compare circuitq with a toolbox like KQCircuits, which is an application that is really close to the real physical superconducting device, circuitq is more meant to study the fundamental physics in the lumped element regime without the implementation oriented focus like KQCircuits. Therefore it's always a good idea to simplify the circuit to the most fundamental part, which really does the physics - if that makes sense.

Hi Philipp,
thanks for the explanation! Somehow that is what I was expecting. circuitq is very good and easy to use when you have a network which uses only effective capacitive/inductive networks, meaning that a theorist simplified the model for me to an effective model. However people like me (I am among KQC authors :) ), who draws actual circuits, encounter many parasitic capacitances which are usually modeled as purely capacitive nodes to ground and they play a role in the kinetic part of the Hamiltonian (for example the qubit charging energy, which is not always trivial due to these extra ground capacitances). These nodes play an incredible role in the behavior of the chip performance, since the shunt capacitance often exceed the direct capacitance. I agree this is mainly an engineering concept, but it would be cool if at some point the tool could handle them. Just to mention another example, if one has two qubits coupled but a superconducting island bus, there would be very necessary to model the shunt capacitance of the island.  Hope I clarified a bit.

Adding such purely capacitive nodes will certainly broaden the scope of circuitq to a more implementation oriented way of modelling circuits. This will certainly be helpful and we should treat your issue as a feature request - as it's not a problem with the code itself but simply a residue of the design choices made when developing the toolbox. However, this would be a major revision, as the current numerical implementation relies on the fact, that any charge node has a corresponding flux node appearing in the Hamiltonian. For that reason, I am not sure how soon such a feature will be implemented - however we are of course always open for pull requests :)


Needed extra steps to get everything working on Ubuntu 16.04

I started off with a clean Ubuntu 16.04 install and I tried to follow the steps for PHP 7. I didn't run into any issues during these steps but at the end of them I still couldn't open a test php file that tried to make a connection. I had to do the following additional steps:
sudo a2enmod php7.0
sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
sudo apache2ctl restart
I'm not sure if anyone else had these issues but if so maybe these additional steps can be added to the guide?

Can you follow install instructions on README? What is the error message you are receiving? also what is the driver you are using?

I followed the install instructions in this readme https://github.com/Microsoft/msphpsql/blob/PHP-7.0-Linux/README.md
The steps I followed were for ubuntu 16.04 and php 7.0 these are also the versions I'm using.
The first 6 steps went fine without any problems. At step 7, testing a php script my source code was just shown on screen rather then parsed. this is when I did:
sudo a2enmod php7.0
sudo apache2ctl restart
I tried again and I got the following error:
Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe.  You need to recompile PHP
I solved this by doing:
sudo a2dismod mpm_event
sudo a2enmod mpm_prefork
sudo apache2ctl restart
In my test script I was using the PDO sqlsrv driver /usr/lib/php/20151012/pdo_sqlsrv.so
I have to say that I've never before had the problem of installing apache and php and not having the module activated automatically. But usually I install them all together and not as spread out as I did following the steps in the readme.

@koennys you're receiving "Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP", because you are using non-thread safe PHP on thread safe apache, and you had to disable the thread safety. Note that  PHP installed using package manager is non-thread safe (NTS) and you must use NTS apache and NTS PDO_SQLSRV. Do you still have any problem getting your script working?

Yes I was able to get everything working with the extra steps I listed.

@koennys How did you install apache? Did you use apt-get or build it from source?

@meet-bhagdev I used apt-get to install it. this is the list of steps I took for the configuration
sudo su
apt-get -y install php7.0 mcrypt php7.0-mcrypt php-mbstring php-pear php7.0-dev php7.0-xml
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install msodbcsql mssql-tools
apt-get install unixodbc-dev
apt-get install libapache2-mod-php7.0
apt-get install apache2
pecl install sqlsrv
pecl install pdo_sqlsrv
echo "extension=/usr/lib/php/20151012/sqlsrv.so" >> /etc/php/apache2/php.ini
echo "extension=/usr/lib/php/20151012/sqlsrv.so" >> /etc/php/7.0/apache2/php.ini
echo "extension=/usr/lib/php/20151012/pdo_sqlsrv.so" >> /etc/php/7.0/apache2/php.ini
echo "extension=/usr/lib/php/20151012/sqlsrv.so" >> /etc/php/7.0/cli/php.ini
echo "extension=/usr/lib/php/20151012/pdo_sqlsrv.so" >> /etc/php/7.0/cli/php.ini
service apache2 restart
--extra steps start here--
a2enmod php7.0
service apache2 restart
a2dismod mpm_event
a2enmod mpm_prefork
service apache2 restart
I needed the extra steps because php wasn't active in apache following the exact steps from the tutorial, I've never had this problem before I usually install php and apache in the same apt-get step so maybe it's related to the order or seperation of steps in the readme.

@koennys I installed PHP 7.0, odbc, and apache on clean machine as it is stated on README. When I installed  apache using apt-get, mpm_event is disabled and mpm_prefork is enabled, below is the snippet of installation log:
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
and by running the extra steps you mentioned I got these messages:
sudo a2dismod mpm_event
Module mpm_event already disabled
sudo a2enmod mpm_prefork
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled


Release: Bump 0.8.0

Summary
Release: Bump 0.8.0
Checklist
Delete items not relevant to your PR:

[ ] Unit and integration tests covering the common scenarios were added
[ ] A human-readable description of the changes was provided to include in CHANGELOG
[ ] For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

This branch doesn't need to merge, can be closed now.


Hide column filter(search) input box

How to achieve hiding the column filter(initially) and show it only on mouse over(or show some image) on column header?

I think u can use custom filter because we dont have this feature now and it's not worth to support it, check https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/column-filter/custom-filter.js to learn how to custom it.
Let me know if you got any questions, thanks

Alright, but how do I handle the filter with the table data's. Is there any method specified in the Docs so that I can write my own filter?

Or can you give an example for input box for custom filter?

just in the example I mentioned above, https://github.com/AllenFang/react-bootstrap-table/blob/master/examples/js/column-filter/custom-filter.js#L34  line 34

Thanks for pointing out the line. I have achieved as a custom filter now. Just wanted to share this, the input text box value can be accessed with the refs as this.refs.filterBox.value.
Thanks a lot for this project, it helped a lot. Will share this custom textbox filter as one of the example if it's fine?

thanks your sharing 👍


Blinking text cursor in bottom-left corner; mouse pointer always displayed as CURSOR_TEXT on Mac OS X.

Describe the bug
Whenever pyglet opens a window on my machine, a text cursor flashes in the bottom-left of the window, as though the entire window is a text input box. Additionally, my mouse pointer assumes the CURSOR_TEXT icon when in the window, as long as the window is in focus - with exception below.
If the mouse pointer is hovering over the window as it gains focus, the pointer assumes the icon selected by pyglet until mouse movement. Additionally, when moving the pointer into the window from the top, there's a small boundary (between the window rect and the window bar) within which the pointer assumes the pyglet-chosen icon.
In short, pyglet windows visibly act as textboxes on my (2 week old) machine.

This behavior first appears for me after commit 74b6bc05. pyglet 2.0.7 has no such behavior, while pyglet 2.0.8-2.0.10 does.
This seems like it may be related to this comment in cocoa/pyglet-view.py:
# Create an instance of PygletTextView to handle text events.
# We must do this because NSOpenGLView doesn't conform to the
# NSTextInputClient protocol by default, and the insertText: method will
# not do the right thing with respect to translating key sequences like
# "Option-e", "e" if the protocol isn't implemented.  So the easiest
# thing to do is to subclass NSTextView which *does* implement the
# protocol and let it handle text input.
self._textview = PygletTextView.alloc().initWithCocoaWindow_(window)
# Add text view to the responder chain.
self.addSubview_(self._textview)

FWIW, removing the self.addSubview_(self._textview) line resolves the visual bug for me but breaks text editing in any textboxes in the window. Same with setting acceptsFirstResponder again (reversing part of the commit). This too removes the visual bug, but prevents textboxes from being edited.
@PygletView.method('B')
    def acceptsFirstResponder (self):
        return True

All this to say, I suspect this bug is a side-effect of subclassing NSTextView. If we can figure out how to replicate this bug, it might warrant a successor to the 'easy' solution in the comments above.
System Information:

pyglet.info
Apple M2
OS X Sonoma 14.2.1

How To Reproduce
After speaking with Benjamin on Discord (thread here), I hear he's unable to replicate on his M1 macbook with Sonoma 14.2.1.
This is the code I used to test:
import pyglet

SCREEN_WIDTH = 350
SCREEN_HEIGHT = 350

def main():

    win = pyglet.window.Window(SCREEN_WIDTH, SCREEN_HEIGHT, 'test')
    cursor = win.get_system_mouse_cursor(win.CURSOR_CROSSHAIR)
    win.set_mouse_cursor(cursor)
    pyglet.app.run()

if __name__ == "__main__":
    main()

I also tested textbox functionality with examples/text_input.py

If anyone has an M1/M2 Mac and can replicate this issue, please let us know.

I couldn't replicate this on a VM unfortunately.
However, NSTextView is deprecated according to the Mac notes, so it's possible there may be some weird behavior with it in newer Mac versions. NSTextInputClient is the replacement to it according to the docs, but I do see that issue in the comments regarding Option E. I wouldn't think that bug that's described in the comment text would still be relevant if the old one was deprecated? I looked at other windowing libraries and they all seem to implement NSTextInputClient, so that may be the route to go.

After a few days of investigation, I've discovered that we can't remove the NSTextView and implement the NSTextIntputClient. Essentially ctypes does not support callbacks with Structures. It can do pointers to Structures, just not the Structures themselves
Structure returns are required for these instance methods:
https://developer.apple.com/documentation/appkit/nstextinputclient/1438242-selectedrange?language=objc
https://developer.apple.com/documentation/appkit/nstextinputclient/1438250-markedrange?language=objc
https://developer.apple.com/documentation/appkit/nstextinputclient/1438240-firstrectforcharacterrange?language=objc
I did find some information from a bug/request 15 years ago: https://github.com/python/cpython/issues/49960
The only fix seems to be a ctypes patch from another project, but it involves overwriting internal ctypes calls, which are subject to change. Licensing aside, not sure that'd be the route to go.
At this point we can assume it probably won't be patched or implemented. So we will have to try to hang onto the NSTextView as long as we can.
@ciraben
The only other solution I can think of would be a work around. Maybe explicitly set the built in Window caret to be invisible and the NSTextView to not invoke the cursor change?  Unfortunately I can't really test this behavior myself, but if I did make a test branch with a couple changes to see if it would do anything.
Could you try it out and let me know if this changes anything? Thanks
https://github.com/caffeinepills/pyglet/tree/macos_nstextview

Thanks for taking the time to look into this! I know it's not your fave topic and I appreciate the dedication.
Testing your workaround, it hides the text caret as expected. My mouse pointer still behaves as before, switching to the CURSOR_TEXT icon on movement in the window when the window has focus. I found this SO thread which was a bit over my head, but looks like it has some ideas for what might be going on.
I'm not personally in need of a workaround (2.0.7 works for my needs, and I don't have any active pyglet project ATM) - but maybe the above is useful to someone anyway!
FWIW, I'm getting a message that examples/text_input.py isn't migrated to pyglet 2.0 yet (relies on batch.add_indexed), so I tested your workaround with examples/timer.py and examples/image_display.py instead.

Appreciate you checking on that. Bummer about the cursor at least.
There are still a few more tricks to try.
Could you try adding this. It's supposed to set the view as uneditable, hopefully that includes the invisible selection area:

self.setEditable_(False) in this area?
https://github.com/caffeinepills/pyglet/blob/65fda4fd0cf85a46f17d5b66755893b2103db8f4/pyglet/window/cocoa/pyglet_textview.py#L29

If it is indeed the mouse motions, you can also try adding this:

    @PygletTextView.method('v@')
    def mouseMoved_(self, nsevent):
        send_super(self, 'mouseMoved:', nsevent)

Which should capture the mouse moved from the Text view and pass it to the regular view, hopefully that intercepts any cursor change stuff going on.
See if any of those change anything. I think the first option might work, but try the second to see if anything changes if not. I'd like to narrow down the issue whenever you have time.

If anyone has an M1/M2 Mac and can replicate this issue, please let us know.

I have the exact same issue on a 2020 M1 MacBook pro running macOS Sonoma 14.3.1, python 3.12.2 and pyglet 2.0.14
steps to reproduce :

Create a new virtual environment
Run python3.12 -m pip install --upgrade pip pyglet
Enter the minimal boilerplate to get a window to show up :

import pyglet
window = pyglet.window.Window()
pyglet.app.run()

You can see a small blue line in the bottom-left corner of the screen. It's blinking at ~1Hz.
The mouse cursor is changed to the text cursor icon as well.
It's my first time ever trying Pyglet, so I think I might simply downgrade until this bug is fixed, but I can totally share more details about my configuration if needed.

I have some news ! I'm not sure exactly what happened, but I reinstalled Pyglet using pip in my environment, and I can't seem to reproduce the issue anymore !
It's really weird as the Pyglet version is the exact same, and nothing in my configuration has changed. Maybe Apple did an update of its own ?
Anyways, I'll let you know if I manage to reproduce this bug again. It's now time to learn how to use the library !

Thanks for the feedback @HerbeMalveillante.
We did push one small bugfix in the latest point release. If you're curious to try, you might compare with previous releases to confirm if that was it.

Updated to master, still the same :/

Adding this code to the PygletTextView_Implementation class fixes the blinking cursor.
    @PygletTextView.method("v")
    def drawRect_(self):
        pass

Following the documentation of AppKit
It looks like we could change the cursor behaviour. The cursor API seems to be legacy following the information from trackingAreas.

Just updated to 14.4.1 and everything works again as expected <3

I'm still seeing the blinking cursor at the bottom right of the window. macOS 14.4.1 (23E224), pyglet ==2.0.15 and python3.12

You are right, it was only one time, it was not shown :/ not sure why.

I had the same issue - a blinking cursor in the bottom left corner on a macOS 14.2.1 and pyglet 2.0.15.
The fix for PygletTextView_Implementation provided here worked.

Quick update here! New OS version ✨
OS 14.4.1, pyglet 2.0.15, python 3.12.3
tl;dr - blinking text cursor resolved by suggested pyglet patch above. wrong mouse cursor partly resolved by subclassing Window and setting cursor type on each mouse motion event.
I tried out eruvanos' PygletTextView_Implementation idea. This removed the bottom-left blinking text cursor for me - yay!
However, my mouse pointer is still reset to the CURSOR_TEXT icon on mouse motion (while within the window rect, while the window is in focus). I got this result by testing with HerbeMalveillante's simple code example.
I also went back and re-tested with text_input.py and I get better results now. I'm not able to replicate what I described initially back in January regarding the mouse cursor. I can't recall whether I misreported, or whether I really did see solely CURSOR_TEXT when running text_input.py back then.
Anyway, I now see the correct mouse cursor (CURSOR_DEFAULT) displayed over the widget-less regions of the window. As I move the mouse cursor across these regions, the CURSOR_TEXT cursor occasionally flickers into view for a frame (~once/sec). Over the window bar, CURSOR_TEXT is still displayed there as well.
Suspecting a race condition, I tested the following code out (based on examples/text_input.py, L69-L70):
import pyglet
from time import sleep

lag = 0
# lag = 0.05

class CoolWindow(pyglet.window.Window):
  def on_mouse_motion(self, x, y, dx, dy):
    sleep(lag)
    self.set_mouse_cursor(None)

window = CoolWindow()
pyglet.app.run()

With lag = 0, I see the same flickery mouse behavior that I see with text_input.py. With lag = 0.05, the cursor is solidly CURSOR_TEXT until mouse motion stops. The CURSOR_DEFAULT to CURSOR_TEXT frame ratio increases predictably as lag approaches 0.
So I think we can safely conclude that the OS and pyglet are racing to set cursor type on mouse motion, with varying results. Maybe this is why people above were seeing different results from day to day; and why I can't replicate my January results.
I wonder whether this race condition arises in each mouse motion event, or only when many events are triggered in quick succession.

Following up on caffeinepills' original suggestions specifically -
Adding self.setEditable_(False) removes the bottom-left blinking text cursor.
Adding the suggested mouseMoved_ function has no visible effect.

Anything I could support with? it would be great to have this solved somehow.

I'm still unclear on if this is still relevant. Other people have said this issue goes away after the first run of Pyglet, then subsequent runs don't have the issue. Others said it went away after an update on Mac. So this still needs more information.

I see, so just to give the information about my setup, which always shows the mentioned artefacts:
vendor: Apple
renderer: Apple M1 Max
MacOS: 14.5
version: (4, 1)
python: 3.9.18 (main, Feb 25 2024, 04:29:12)
[Clang 17.0.6 ]
platform: darwin
pyglet version: 2.1.dev2
PIL version: 10.2.0

@ciraben  A fix was deployed in master branch after testing with @eruvanos.
If you can also confirm this fixes the cursor frame being changes to caret as well as the blinking cursor issue? Thanks!

Looks good!

Resolved as of 2.0.16


why is 50.0/60.0

import eulerian_magnification as em
vid, fps = load_video_float(source_path)
em.eulerian_magnification(vid, fps,
freq_min=50.0 / 60.0,
freq_max=1.0,
amplification=50,
pyramid_levels=3
)

Have you solved this problem? freq_min, how freq_max parameters should be determined


Monitor detection cache issues

This is probably related to my earlier comment in the last issue #73 where the display was not detected.
Here's today's output:

I don't think reading from cache is useful when detecting monitors...

I implemented caching for resolution, because it a typical workflow monitors aren't changed too often and detection was time expensive. In the current state however, i managed to get some decent performance (especially since XWayland is never used), so i will remove caching for it in the next commit.


macros are very whitespace-sensitive when defining functions with type parameters

It's unclear how much of this is the fault of nom vs rust's macro system, but it has tripped me up a couple times, especially since the error message is very misleading:
#[macro_use]
extern crate nom;

pub mod foo {
    pub struct Command<T> { t: T }
    named!(
        // this will error unless there is a space between the >s
        my_tag<Command<u8>>,
        map!(tag!("foo"), |_| { Command { t: 0 } })
    );

    pub fn regex_test() {
        let _ = my_tag(b"foo");
    }
}

gives
src/lib.rs:8:16: 8:23 error: expected an item keyword
src/lib.rs:8         my_tag<Command<u8>>,
                            ^~~~~~~

This comes from Rust's macro parser. Unfortunately, I cannot do anything about it. If you insert a space, like this:  my_tag<Command<u8> >, it will work.
The only thing I can do for now is documenting it in the README for future users ( cf 038190e ).

This is the upstream rust bug, which looks like it might be getting fixed soon. https://github.com/rust-lang/rust/issues/25274


particles2d material angle property is not "initial"

Godot version:

3.1
OS/device including version:

any
Issue description:

ParticleMaterials Angle property claims to determine the initial angle of an emitted particle. However this is not the case. https://cdn.discordapp.com/attachments/540803169374961664/564662350213283851/unknown.png
This makes many particle effects in Top Down quite difficult to achieve. For example footprints, which need to point in the direction the actor is moving.
Steps to reproduce:
Create a script that manually changes the angle of a ParticleMaterial (like following the rotation of its parent.) All currently active particles will copy this rotation, instead of simply deriving their initial rotation from it.
tool
extends Position2D

onready var right: ParticlesMaterial = $Right.process_material
onready var left: ParticlesMaterial = $Right.process_material

func _ready():
	print("hey")

func _process(delta) -> void:
	right.angle = -global_rotation_degrees
	left.angle = -global_rotation_degrees

Minimal reproduction project:

I guess the description should be updated. Initial in this context doesn't mean "when the particle is emitted" it means "angle before other rotations are applied". It is actually used to set "base_angle" in the ParticlesMaterial.
The line is found here:
https://github.com/godotengine/godot/blob/f52c294a748e4bc4e561fb497480560aacda2d59/scene/resources/particles_material.cpp#L467
Keep in mind that uniforms to shaders apply to all particles at once.
I think the best way to achieve your effect is to turn local_coords off and then make your particle system a child of the thing you want it to follow, or at least set the Particles2D node's position and rotation to what you want.

Yes, rewording the description seems apt then.

I think the best way to achieve your effect is to turn local_coords off and then make your particle system a child of the thing you want it to follow, or at least set the Particles2D node's position and rotation to what you want.

Unfortunately this is not a viable solution for trails that need each individual particle to keep pointing in the correct direction. Particles in general do not inherit their emitters rotation. (In local coords they simply orbit their parent.)

Lets close this in favor of https://github.com/godotengine/godot/issues/27878 and https://github.com/godotengine/godot-docs/issues/2359


Call recording and now playing doesn't work.

Hi, like in topic.
Device: Galaxy S10
ROM: PE12

Now playing is stuck like this, and doesn't detect songs.

Okay, can you tell me your country?
for now playing it only works on pixel devices

Okay, can you tell me your country?
for now playing it only works on pixel devices

Poland

Now playing wont work, it only works on pixel devices. Call recording should be now fixed

Where can you find the now playing settings? I want to disable it to fix laggy media but I can't find it anywhere.


utilize object size caching to reduce storage HEAD requests

Developer's Certificate of Origin 1.1
   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@guyGerson it certainly great idea to use caching instead of doing HEAD all the time. But we need to be sure that all the components will benefit from it. Can you please create some class, call it like SwiftCache or something and add the HashMap there? Expose some methods, add to cache, remove,  check. I also think that "length" is not enough, why not to keep some SwiftCacheEntry object with "length", "isSparkOrigin", etc? This way it will be more useful by other functions
Thanks

@gilv since caches have a relatively large memory print i suggest we should avoid redundancy in them and make them as small and efficient as possible. For example, isSparkOrigin data lifetime is scoped to the list function since realistically an object would be listed once (so as a side note: why is the caching needed?), while file status data lifetime is the whole runtime of the app. Perhaps we should be more selective in what data should go to which cache, and not use a "one-cache-fits-all" approach. If we do have data with the same scope of the "content-length" that would require caching, or we would decide on a less naive eviction policy then of course is should be consolidated to a new cache class accordingly.
Thanks for your comment,
Guy

@guyGerson In addition to my 2 other comments: what happens if someone does getObjectMetadata without doing list? This way it will not work.
I would prefer to make some cache checkup. Just add some method around cachedStoredObjectSize, so that if object is not present it will perform HEAD and fill the cache.
This way we will cover all the cases.. i guess this change need to adapt few code parts.

@guyGerson thanks.
For the record:
This pull request introduce many complexity that we need further investigate.
For example: create "foo/a.txt", delete "foo/a.txt", create "foo/a.txt" will fail, since "cache" will report that object already exists, even it was deleted.
To resolve this i added remove from cache on object delete.
This patch also breaks eco-system. If some other process will delete object without using stocator - cache will not be updated.
However this patch provides valuable performance boost, since it greatly reduces number of HEAD requests.
I assume we need a configuration key to enable / disable cache.


Performance tests on series methods in workload

Hello @akharche! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file sdc/tests/tests_perf/test_perf_series.py:

Line 425:1: W391 blank line at end of file


Sapi injectability -- better testability

Right now, @Model and @Routable take an instance of SakuraApi(sapi) in the declaration. While this is find for running code, it makes it difficult to test since the decorators are setup before the tests run and they persist sapi for their entire life... for testing purposes, you may need to change out sapi from test to test.
Also, https://github.com/sakuraapi/auth-native-authority has to wrap its models in functions to allow sapi to be passed in after Sapi has been declared. That's probably not an issue since those models aren't meant to be used by the integrator, but there may be circumstances where it won't be ok.
Possibilities:

Allow the decorators to take an instance of Sapi or a function that returns an instance of Sapi so that the instance can change after boostrapping.
Add methods to change the reference of the sapi object that's injected

@Model and @Routable now have changeSapi static methods injected.

this was resolved in #83


nixosTests.cockroachdb: Port to python

Motivation for this change
#72828
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

I missed that @flokli implemented this in #73934 already. For some reason this works for me on one machine but not the other, i will investigate and maybe reopen.


Basic Docker support

Support production deployment to docker host
Support localhost DX (incremental builds/server restarts on TS file changes)

http://mherman.org/blog/2017/05/11/developing-microservices-node-react-docker/?utm_source=reactnl&utm_medium=email#.WWY4sIWxWEf

https://www.sitepoint.com/kubernetes-deploy-node-js-docker-app/

https://node.university/blog/956834/dockerized-node

https://github.com/BretFisher/node-docker-good-defaults

https://github.com/inakianduaga/node-express-boilerplate

https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

https://codefresh.io/blog/node_docker_multistage/

https://github.com/ellerbrock/typescript-docker

https://github.com/aherve/typescript-express-docker


Variable Mapping

I am suggesting this addition to Snail. This allows to map a Unique<T> into a Unique<U> that will receive the same notifications, with the value transformed from its initial type T to the expected new type U.
This is useful for me here when I use:
public enum ValidationField {
    case binding(Variable<String?>) // expects a Variable of type <String?>
    // ...
}

But in my case, I need to bind viewModel.showingAgent which is of type Unique<FullContact?>. I don't want to create a new enumeration member taking that type specifically. I prefer to reuse that existing enumeration member and map viewModel.showingAgent into a Unique<String?>.
I think this could be useful in multiple places as well along the way 👍

Note: another suggestion of enhancement could be to support the Swift error handling system by adding the following:
func map<U>(transform: @escaping (T) throws -> U) rethrows -> Unique<U>

This would allow to handle throwing from the map closure, and would be consistent with the native map signature implemented by Foundation on the Collection protocol:
func map<T>(_ transform: (Element) throws -> T) rethrows -> [T]

This change will require to make onNext, onError and onDone support throws. I gave it a quick try and it seems like it will be quite an extensive change. Will keep that for the future, in another Pull Request 👍

Codecov Report

Merging #95 into master will decrease coverage by 2.43%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage     100%   97.56%   -2.44%
==========================================
  Files           7        7
  Lines         160      164       +4
==========================================
  Hits          160      160
- Misses          0        4       +4

Impacted Files
Coverage Δ

Snail/Variable.swift
80.95% <0%> (-19.05%)
:arrow_down:

Continue to review full report at Codecov.

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


Proposal: Add host option to override node fs and path modules

Hi,
I have a use-case that requires me to serve files from memory in my tests.
Currently, I use express.static() from serve-static which uses this package. Now, I want to keep the same API but enable passing an option to override the default host file-system and path resolution.
There is an issue in express-static that requests the same thing but hasn't seen much activity.
About the tests missing from this pull request.
Since there is no changed behavior, all of the current tests are passing. What I would really want to do is wrap all the existing test-cases in a factory and re-run them using an external host.
Would you have any objections to this test plan? Would love to get this in.

Sorry, this is not the correct implementation for all the reasons from the previously closed PRs and issues on this.
Please move the discussion/proposal to https://github.com/pillarjs/send/issues/160 . If someone can provide a proposal that addresses these, that would be the way to move forward.
I'm actually working on a security fix currently that would complete rewrite which fs methods are called, even apart from the changes PR #125 makes. This PR would make those types of changes no longer backwards compatible as our exact usage of the internal fs becomes public as folks will end up only passing in the bare minimum to make their use case work.
See past discussion #149 as well.


HelmMD generator improvements

Is there a related GitHub Issue?
No, but helmdoc generator fails

What is this change about?

Support array or string for type
Support objects without properties
run the MD generator to update the readme

Tag your pair, your PM, and/or team
@georgethebeatle

Merged as part of https://github.com/cloudfoundry/korifi/pull/3515


macos opt/tcp_client_posix_test fails

https://grpc-testing.appspot.com/job/gRPC_master/7774/config=opt,language=c,platform=macos/console
D1001 11:48:37.080791000<PHONE_NUMBER>04640 test_config.c:155] test slowdown: machine=1.000000 build=1.000000 total=1.000000
D1001 11:48:37.081419000<PHONE_NUMBER>04640 tcp_client_posix_test.c:90] test_succeeds
E1001 11:48:37.081796000<PHONE_NUMBER>04640 tcp_client_posix_test.c:274] End of first test
D1001 11:48:37.081807000<PHONE_NUMBER>04640 tcp_client_posix_test.c:142] test_fails
E1001 11:48:37.081840000<PHONE_NUMBER>04640 tcp_client_posix.c:261] connect error to 'ipv4:<IP_ADDRESS>:0': Can't assign requested address
D1001 11:48:38.089281000<PHONE_NUMBER>04640 tcp_client_posix_test.c:185] test_times_out
D1001 11:48:38.091947000<PHONE_NUMBER>04640 tcp_client_posix_test.c:237] now=1.010561550 connect_deadline=2.010502930
E1001 11:48:38.092143000<PHONE_NUMBER>04640 tcp_client_posix_test.c:76] assertion failed: g_connecting == NULL

*******************************
Caught signal 6
  no backtrace

FAILED: bins/opt/tcp_client_posix_test [ret=-6, pid=66205]

Seen again: https://grpc-testing.appspot.com/job/gRPC_master/7965/config=opt,language=c,platform=macos/console

Seen again: https://grpc-testing.appspot.com/job/gRPC_master/lastCompletedBuild/config=opt,language=c,platform=macos/console

Like a photogenic yeti: https://grpc-testing.appspot.com/job/gRPC_master/lastCompletedBuild/config=opt,language=c,platform=macos/testReport/(root)/tests/bins_opt_tcp_client_posix_test/

And again: https://grpc-testing.appspot.com/job/gRPC_master/13042/config=opt,language=c,platform=macos/testReport/junit/(root)/tests/bins_opt_tcp_client_posix_test/

Another instance: https://grpc-testing.appspot.com/job/gRPC_master/13564/config=opt,language=c,platform=macos/testReport/junit/(root)/tests/bins_opt_tcp_client_posix_test/

And again: https://grpc-testing.appspot.com/job/gRPC_master/15215/config=dbg,language=c,platform=macos/consoleText

Still happening..
https://grpc-testing.appspot.com/job/gRPC_master/15481/config=opt,language=c,platform=macos/


[objc][processor] Set the 'end' state when all (not any) assemblies are processed

also don't create an additional ProcessedAssembly instance when adding
extraneous types

Build and tests passed.


Add viewModel searchResultCell

I can't see the searchResultCell's title... do you?

Le sam. 25 sept. 2021 à 16:41, Christian Slanzi @.***>
a écrit :

I can't see the searchResultCell's title... do you?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/CS-Development/SideProjectIMDbApp/pull/26#issuecomment-927138687,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIJU25M5YWAKW2YJQEPHLTTUDXUQ5ANCNFSM5EXVXG3Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I create a function with cellViewModel as a parameter , maybe i miss to
push something i will check when i back to home


Fix dead sessions

Idk if it's the correct way to supprot lids, but I noticed that when agent is 1, the JID is a LID

Merging on #489


Add to Sidebar option

Would you be able to add the "add to sidebar" toggle that many addons have so that it doesn't have to be done manually in the config file?

Last time I tried it didn't load properly from the sidebar due to some CORS issue, but that might be fixable. Does it work for you if you add it in the config?

I just put this in my config:
panel_iframe:
  homebridge:
    title: Homebridge
    icon: mdi:home-automation
    url: http://homeassistant.local:8581

I was going to ask about this, so I'm glad to see that I'm not the only person that would like to see it.

It’s great to have home bridge addon. I hope this project will not be abandoned

It's not abandoned, but it's not something I actively work on unless it needs updating. For this specific issue, the right answer is likely to use the new Ingress stuff in Home Assistant. If someone wants to test that and send a PR, that'd be appreciated. Otherwise I'll probably get around it the next time I catch it up to the latest Homebridge release.

It's not abandoned, but it's not something I actively work on unless it needs updating. For this specific issue, the right answer is likely to use the new Ingress stuff in Home Assistant. If someone wants to test that and send a PR, that'd be appreciated. Otherwise I'll probably get around it the next time I catch it up to the latest Homebridge release.

Perhaps now it would be good time to fix this one: https://github.com/davide125/hassio-addons/issues/10 ?
There were some changes introduced to node.js since container was build and also quite a lot libraries has become out of date.
Theses changes are persistent across restart of container.

I gave this another shot today while working on #10. Rigging ingress up is easy:
-ports:
-  8581/tcp: 8581
-ports_description:
-  8581/tcp: Homebridge UI
-webui: http://[HOST]:[PORT:8581]
+ingress: true
+ingress_port: 8581

in config.yaml. However this doesn't actually work -- I can see HA making the request to load the Homebridge UI on the other end, but the HA fronted only displays a blank frame. I suspect there's either CORS or some javascript fuckery in play here. If someone figures it out, please comment here so we can try again :) In the meantime, panel_iframe as mentioned in https://github.com/davide125/hassio-addons/issues/8#issuecomment-1412901753 is an option for local access.

I gave this another shot today while working on #10. Rigging ingress up is easy:
-ports:
-  8581/tcp: 8581
-ports_description:
-  8581/tcp: Homebridge UI
-webui: http://[HOST]:[PORT:8581]
+ingress: true
+ingress_port: 8581

in config.yaml. However this doesn't actually work -- I can see HA making the request to load the Homebridge UI on the other end, but the HA fronted only displays a blank frame. I suspect there's either CORS or some javascript fuckery in play here. If someone figures it out, please comment here so we can try again :) In the meantime, panel_iframe as mentioned in #8 (comment) is an option for local access.

Would love to see this also 👍
Did this work: https://github.com/davide125/hassio-addons/issues/8#issuecomment-1907286762

Looking at the Pi-hole Add-On.
You need to do at least two things for ingress and sidebar:


Update CONTRIBUTING and CODE_OF_CONDUCT to match OSSF

CONTRIBUTING.md and CODE_OF_CONDUCT.md should be updated to match the contribution guidelines and code of conduct used by the OpenSSF.

Resolved


Fix casing in macro react test

What:

Why:

How:

Checklist:

[ ] Documentation
[ ] Tests
[ ] Code complete

Codecov Report

Merging #181 into master will decrease coverage by 0.83%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
- Coverage   89.08%   88.25%   -0.84%
==========================================
  Files          22       22
  Lines         843      843
  Branches      219      219
==========================================
- Hits          751      744       -7
- Misses         70       74       +4
- Partials       22       25       +3

Impacted Files
Coverage Δ

src/glamor/CSSPropertyOperations/index.js
51.72% <0%> (-12.07%)
:arrow_down:

Continue to review full report at Codecov.

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


added tests for originating contracts to local sandbox

I've merged this branch into 707-originated-contract-address-order, which will be merged via the #777 PR.


Allow a new maxepoch when resuming from a checkpoint.

I found this useful when performing hyperparameter sweeps.

Yes, this might be useful. Thanks!


Support for PEP 585, typing with standard collections

Is your feature request related to a problem? Please describe.
At the moment, if one wishes to create a list of structured models, the approach would be
from typing import List

structured_response = client.chat.completions.create(..., response_model=List[MyModel], ...)

which works as expected, but per PEP585 and Python 3.9 it is now possilbe to use typing with standard collections, e.g. List[MyModel] == list[MyModel]. At the moment, instructor does not support this case, if you intent to do that, you'll get the error

File ".../.venv/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 11, in
structured_responses[expert_name] = llm.completion(messages=structure_response_messages_,
File ".../llm.py", line 29, in completion
return instructor.from_litellm(litellm.completion).chat.completions.create(*args, response_model=response_model,
File ".../.venv/lib/python3.10/site-packages/instructor/client.py", line 116, in create
return self.create_fn(
File ".../.venv/lib/python3.10/site-packages/instructor/patch.py", line 140, in new_create_sync
response_model, new_kwargs = handle_response_model(
File ".../.venv/lib/python3.10/site-packages/instructor/process_response.py", line 226, in handle_response_model
if not issubclass(response_model, OpenAISchema):
File "/usr/local/lib/python3.10/abc.py", line 123, in subclasscheck
return _abc_subclasscheck(cls, subclass)
TypeError: issubclass() arg 1 must be a class

Describe the solution you'd like
Support for generic-collections type hints, e.g. to be able to call
structured_response = client.chat.completions.create(..., response_model=list[MyModel], ...)  # note the L is lowercase, list[MyModel]

Your above code works perfectly fine.
class User(BaseModel):
    name: str
    last_name: str

users = client.chat.completions.create(
    model="gpt-4-turbo-preview",
    messages=[
        {"role": "user", "content": "Create users"},
    ],
    response_model=list[User],
)

# print(users)
# [MyModel(name='John', last_name='Doe'),
# MyModel(name='Jane', last_name='Smith'),
# MyModel(name='Emily', last_name='Jones'),
# MyModel(name='Michael', last_name='Brown')]

how did you define your model?
what version of instructor raises this issue?

@ivanbelenky my response model is a bit more complicated, I thought I'd create a simple example but I guess the simple case does work if you tried it (I haven't)
In my use case, I have an LLM that generates objects iteratively, in batches of 5. The LLM decides when to stop by itself.
For iterative generation capabilities, I created the following utility code
class StopObjectCreation(BaseModel):
    """End the conversation, no more objects to create"""
    stop: bool = Field(..., description="No more objects to create")

def create_object_or_stop(obj: type[BaseModel] | type[list]) -> type[BaseModel]:
    """
    Creates a response model for the iterative creation of objects. Allows the LLM to choose whether it needs to
    create another object, or stop. The output of this should be used as the `response_model` for the `completion` call

    :param obj: The object to be created
    :return: The response model
    """

    class CreateObjectOrStop(BaseModel):
        """Create another object or stop"""
        response: obj | StopObjectCreation = Field(..., description="Either the object to be created, "
                                                                    "or the StopObjectCreation signal object")

    return CreateObjectOrStop

In my specific use case, I'm using response_model=create_object_or_stop(list[MyPyDanticModel]) and it failed. When I switched to response_model=create_object_or_stop(List[MyPyDanticModel]) it worked.
My instructor version is 1.4.3

I tried to replicate you error on version 1.4.3.  I failed to do so.
class StopObjectCreation(BaseModel):
    ...

def create_object_or_stop(obj: type[BaseModel] | type[list]) -> type[BaseModel]:
    ...

client = instructor.from_openai(openai.OpenAI())

class User(BaseModel):
    name: str
    age: int

client.chat.completions.create(
    model='gpt-3.5-turbo',
    response_model=create_object_or_stop(list[User]),
    messages =[{'role':'user', 'content':'Give me a couple of users'}]
)

Results are working as expected. I would suggest updating instructor, and marking this issue as closed, given that the problem does not appear to reside inside instructor. It may be a typo on your end.
The traceback you posted is quite clear, issubclass is being called with a non type argument. If you cannot or don't want to upgrade, I suggest rooting this one out via logging your current env modules and check what object is landing at the issubclass call inside instructor.function_calls. Usually doing this narrows down the ownership of the bug, either your code or instructor in this case. If it were instructor, the above action would result in enough detail for replicability and posterior hf. I encourage this practice before submitting any issues.

I don't know if it makes a difference, but I'm using instructor_client = instructor.from_litellm(litellm.completion)
I hope I'll have time this week to try upgrade and see if the error still persist, if so I'll update here.
Anyway, I have my own obligations and your tone is a bit aggresive with regards to what I should do - I do the best I can to contribute to open-source when I can, definitely was not lazy on this one

Hey @eliorc thanks for your reply and pointing out that you are using litellm. My bad for not clarifying. I saw the client you were using on the traceback, and tested as well for it. So, still not able to reproduce the error. Looking forward to your update.

Well I'm running out of options, I don't have the availability to create a fully reproducable standalone example...
The only thing I can think of that is different than your implementation is that my models are more complex than your User model, they are more complex, specifically they include reference to lists of other models for exmaple
class User(BaseModel):
    name: str
    last_name: str
    friends: list[Friend]

because in this case I also changed the list[Friends] to List[Friends]
hopefully this will uncover the bug I'm experiencing, if not I'll close this issue until I will have the availablity to create a reproducible example

CreateObjectOrStop(response=[
    User(name='Alice', last_name='Smith', friends=[
        Friend(closeness=5.0, name='Bob', last_name='Johnson'),
        Friend(closeness=3.0, name='Charlie', last_name='Brown')]
    ),
    User(name='Eve', last_name='Taylor', friends=[
        Friend(closeness=4.0, name='Grace', last_name='Davis'),
        Friend(closeness=2.0, name='Henry', last_name='Wilson')
    ])
])

Thanks @eliorc  for the clarification. Still failing to reproduce. Happy to check with more reproducible steps.
Cheers.

I'm out of idea, I'm closing this and I'll reopen next time I'll be around this


dockware/dev:latest not working properly on Apple m1 with Docker preview 3.3.2

Describe the bug
The problem is containers which are not based arm64 needs emulation on m1. Unfortunately it seems that docker containers on apple preview docker somehow having memory leaks. The solution would be if we could have a dockware container based von arm64 instead of amd64 This would be awesome!
To Reproduce
Steps to reproduce the behavior:

Running docker compose up on M1 Macbook
Container starts up normally and works so far
Try to compile or change theme via cli on container
Segfault: out of memory or problem with iconv utf-8 utf32le

Expected behavior
It should be able to use all console commands inside the container without any errors

hi
thank you
we have to look into this
do you already have experience in doing this as arm64 inside github actions?

is solved since we provide arm build additionally


Auto-build docs with Sphinx

I'm not very familiar with Sphinx, so I've not got the index file or links working right, but I think the build works now

Codecov Report

Merging #68 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #68   +/-   ##
=======================================
  Coverage   65.29%   65.29%
=======================================
  Files         117      117
  Lines        4887     4887
  Branches      280      280
=======================================
  Hits         3191     3191
  Misses       1622     1622
  Partials       74       74

Continue to review full report at Codecov.

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

Not sure why import dj_database_url is failing in the build docs stage, did it not install correctly or something ?

Ah, it's because the requirements.txt in docs/ is incomplete - probably need to use the same requirements.txt for the sphinx github action container

It doesn't appear to work here :(

It doesn't appear to work here :(

Oh no, that would probably have worked if I hadn't mentioned it.
This could either stay where it is and -
have tamato as a dependency, or maybe even something really ugly like -e .. -e ../ may work.
Or moving it to ../requirements_doc.txt might be practical.

Looks like this works now! What shall we do with the generated docs? Push them to Github Pages?

Yes, the docs will be automatically pushed to Github Pages on merge to master