text:
Question | Issues with wait_for_event in separate threads

Hi,
We are currently writing a Window Manger with your x11rb library.
We have two sources for events, over IPC and the x-events over the RustConnection.
Currently we do a poll on the ipc-channel and a poll_for_event on the x11rb-connection.
We would like to replace this with an event channel and want to let x11rb-connection to wait_for_event rather than poll.
We tried cloning of the connection and we cant share it between threads. Making two connection results in weird behavior most likely because of missing substructure redirection.
Do you maybe have an Idea on how we could implement this?
Also we saw that in the RustConnection, wait for event is just a loop with poll_for_event. Would it be better for performance to use the XCBConnection?
Thank you, Greetings Felix

If you put RustConnection in std::sync::Arc, you can share it between threads:
use std::sync::Arc;
use std::thread;

let conn = Arc::new(RustConnection::connect(None)?);
let conn2 = conn.clone();

thread::spawn(move || conn.wait_for_event());
thread::spawn(move || conn2.wait_for_event());

We would like to replace this with an event channel and want to let x11rb-connection to wait_for_event rather than poll.

I guess you need an extra thread for this. Qt does basically the same thing (but of course does not use x11rb). They start an extra thread that waits for events and sends them over a channel to the main thread.
Basically:
thread::spawn(move || loop {
  channel.send(conn.wait_for_event());
  // TODO: Figure out when to break the loop
})

If I remember correctly, Qt uses a special event type that they send themselves to indicate that the loop should quit (together with an AtomicBool? I am not sure.)
Sadly, I do not have any working example to link to.

Also we saw that in the RustConnection, wait for event is just a loop with poll_for_event.

You mean this code? https://github.com/psychon/x11rb/blob/dacfba5e2a8eef4b80df75d9bec9061c3d98d279/x11rb/src/rust_connection/mod.rs#L701-L706
The important piece of code is the call to self.read_packet_and_enqueue(inner, BlockingMode::Blocking). This function waits for the stream to become writable ("more bytes are received from the X11 server"): https://github.com/psychon/x11rb/blob/dacfba5e2a8eef4b80df75d9bec9061c3d98d279/x11rb/src/rust_connection/mod.rs#L462
So, this does not busy-loop as you seem to be implying.

Would it be better for performance to use the XCBConnection?

Feel free to measure this. My guess would be "no", but I do not know for sure. libxcb does basically the same loop: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/blob/3333d5bde8baaca8981e806ef86b74f4adb77ba7/src/xcb_in.c#L702-704
This uses the implementation for poll_for_next_event (get_event) and if that does not return an event, it waits for something to be received via the connection.

We tried cloning of the connection and we cant share it between threads.

Sorry, what? How are you cloning the connection? RustConnection does not implement Clone.

authors: FelixSchladt notgull psychon


text:
Interval propagator completion

This abstract domains lift any interval propagator over any abstract domain. So we can have a constraint such as x + y + z <= 3 where the variables x,y,z are represented by either interval, set or in an octagon, for instance.
Research

Modular Constraint Solver Cooperation via Abstract Interpretation, Talbot et al., https://doi.org/10.1017/S1471068420000162

This is implemented in the lattice-land project, in the lala-ipc repository: https://github.com/lattice-land/lala-ipc

source: gharchive/issue

repo: ptal/turbo

license_type: permissive

license_source: github-api


text:
chore(master): release butler 13.0.0

:robot: I have created a release beep boop
13.0.0 (2024-10-14)
⚠ BREAKING CHANGES

script-log: Changing config fils structure to prep for future features
config: Get rid of old typos and outdated structure in config file
ms-teams: Use MS Power Automate for sending Teams messges

Features

alert-templates: Add more template variables to email, Slack, Teams alerts (25aaa2b), closes #1250
alerts: Add arbitrary URLs to reload failed/stopped/success msgs (5e613db), closes #1220
config-vis: Show current config in web page (b53eaf7), closes #1199
config: Visualise config file in Butler hosted web page (29356ce), closes #1199
email-alert: Send email when select reload tasks finish successfully (6a0e49b), closes #1207
failed-task-alert: Make failed reload task email look the same as QS Cloud ditto (c163ad4), closes #1237
qs-cloud: Reload failed alerts to email (1d4a62d)
qs-cloud: Reload failed alerts to MS Teams (523722a)
qs-cloud: Reload failed alerts to Slack (fa35d91)
Verify that needed email alert related custom properties exist in QS (6babb0f), closes #1256

Bug Fixes

Fix error when sending successful reload email for apps and tasks with no tags associated with them (c945493)
ms-teams: Use MS Power Automate for sending Teams messges (4f46e60), closes #1239
scheduler: Fix broken "scheduler" test case (0012f6d), closes #1245
script-log: Changing config fils structure to prep for future features (e81ee39)
service-alerts: Update win service alert templates to latest look-n-feel (b2e8bab), closes #1257
slack-alert: Align Slack template for QSEoW alerts with QS Cloud ditto (2769553), closes #1238
Test case "senseapp" now works again (054faa6), closes #1244
test: Fix broken test of buterping API endpoint (39827c8)
winsvc-monitor: Making verbose logging less spammy (f8981b3), closes #1234
xml-appender: Update XML appender files to more reliably detect successful reloads (b02e6a8), closes #1259

Miscellaneous

Bump Docker build action to v6 (6793cae)
deps: Update dependencies (e18ce59)
deps: Update dependencies to stay safe and secure (16032c0)
deps: Upgrade dependencies to stay safe and secure (2960da0)
Update to use latest release-please action (d0d8a62)

Refactoring

config: Better verification of config file during startup (d1ebfaa), closes #1236
config: Get rid of old typos and outdated structure in config file (985b749), closes #1242
config: Remove support for "enabled" properties in config file, only support "enable". (b3a9a40), closes #1243

This PR was generated with Release Please. See documentation.

:robot: Created releases:

butler-v13.0.0
:sunflower:

source: gharchive/pull-request

repo: ptarmiganlabs/butler

license: MIT


text:
⚠ 广电VRBT has degraded performance

In bcfa41e, 广电VRBT (https://vrbt.10099.com.cn/#/home) experienced degraded performance:

HTTP code: 200
Response time: 8755 ms

Resolved: 广电VRBT performance has improved in c1c073a after 13 minutes.


text:
[BUG]: [Print Case is not Working]

Describe the bug
Print Case is not Working
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Hi @maruthiPhanendra , issue is resolved please find the reference
https://jam.dev/c/fb4b8cba-dfcc-4198-80ad-b23885cdc62f

Tested in UAT Env, working as expected.
Attaching jam video for reference: https://jam.dev/c/b995c7b6-9f2a-4e36-abfc-41f05e30bcf3

authors: iknoorkaur rajeshcherukumalli

repo: pucardotorg/dristi


text:
Index h3s in docs for search

I was searching for a specific piece of info about deployments, and I searched the term "dependency installation" in docs.
My search returned 0 results, and I had to ask someone on the project for details, and they linked me to this page -  https://www.pulumi.com/docs/pulumi-cloud/deployments/reference/#customizing-the-dependency-installation-step.  I was surprised that I didn't find that via search, given the phrase appears in the h3 there.

This is a good call out. According to the script that builds the index, we've explicitly chosen not to include H3s because they are "too noisy": https://github.com/pulumi/docs/blob/master/scripts/search/page.js#L54 ...
A decision should be made here. Should we include all H3s as well as H2s? (it's a simple change to the jQuery selector in that same location) Or accept that we won't include them and close this as wont-fix/by-design?
@interurban @sean1588

After some discussion, going to reopen and fix this.

authors: kimberleyamackenzie thoward

repo: pulumi/docs


text:
deprecated warning for aws.secretsmanager.get_secret

Hello!

Vote on this issue by adding a 👍 reaction
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

Calling aws.secretsmanager.get_secret(...) results in deprecated warnings for attributes of GetSecretResult even if these attributes are not accessed:
warning: rotation_enabled is deprecated: Use the aws_secretsmanager_secret_rotation data source instead
warning: rotation_lambda_arn is deprecated: Use the aws_secretsmanager_secret_rotation data source instead
warning: rotation_rules is deprecated: Use the aws_secretsmanager_secret_rotation data source instead

pulumi: 3.18.1
pulumi-aws: 4.29.0
Steps to reproduce

Create a project with:

import pulumi
import pulumi_aws as aws
secret_arn = aws.secretsmanager.get_secret(name="...").arn

Run pulumi up
Observe warnings:

warning: rotation_enabled is deprecated: Use the aws_secretsmanager_secret_rotation data source instead
warning: rotation_lambda_arn is deprecated: Use the aws_secretsmanager_secret_rotation data source instead
warning: rotation_rules is deprecated: Use the aws_secretsmanager_secret_rotation data source instead

I'm seeing this also - I believe it just started happening after upgrading from Pulumi  3.28 to 3.29.1.

Also seeing:
    warning: rotation_enabled is deprecated: Use the aws_secretsmanager_secret_rotation data source instead
    warning: rotation_lambda_arn is deprecated: Use the aws_secretsmanager_secret_rotation data source instead

about:
$ pulumi about
CLI
Version      3.44.0
Go Version   go1.19.2
Go Compiler  gc

Plugins
NAME        VERSION
aws         5.13.0
aws-native  0.22.1-alpha.1661750811
awsx        1.0.0-beta.10
docker      3.4.1
python      unknown

Host
OS       darwin
Version  12.6
Arch     x86_64

This project is written in python: executable='/Users/ericpardee/.asdf/shims/python3' version='3.10.2

This appears to be a broader Pulumi Python codegen issue.  Moving to pulumi/pulumi.

authors: ecmonsen ericpardee fujiapple852 lukehoban

repo: pulumi/pulumi-aws


text:
[Go] [Branch Protection] [Restrictions] unexpected result

While configuring the Restriction for a branch protection I have found multiple issues:
1) It is not possible to just enable the Restrictions without specifying Users, Apps or Teams. At least one user, team or app must be specified.

I would like to just put this attribute to enable the Restrictions
			Restrictions: github.BranchProtectionV3RestrictionsArgs{},

2) If I specify at least one user the Restrictions are enabled
			Restrictions: github.BranchProtectionV3RestrictionsArgs{
				Users: pulumi.StringArray{
					pulumi.String("dududko"),
				},
			},

3) If I remove the user it is removed from github restrictions list, but the Restrictions itself is still enabled. There is no way to disable restrictions with pulumi after it is enabled.

Unfortunately, it looks like this issue hasn't seen any updates in a while. If you're still encountering this problem, could you leave a quick comment to let us know so we can prioritize it?

authors: dududko mjeffryes

repo: pulumi/pulumi-github


text:
Add data disclaimer for pulumi ai

Description
This PR adds a disclaimer on the Pulumi AI project that data may be used to improve the results of Pulumi AI in the future
Fixes: https://github.com/pulumi/pulumi-ai/issues/25
Checklist:

[ ] I have reviewed the style guide.
[ ] If blogging, I have reviewed the blogging guide.
[ ] I have manually confirmed that all new links work.
[ ] I added aliases (i.e., redirects) for all filename changes.

@cnunciato want to do a follow up pr instead? @anita-trimbur has new note styles we should use.

@zchase Let me know what you think -- I just tightened the words up a bit and removed the styling to keep the note from competing with the content above and below it.

@cnunciato Looks great!! Thank you!

authors: cnunciato susanev zchase

repo: pulumi/pulumi-hugo


text:
Update terraform-provider-rke to v1.3.4

Fixes #38.
Also switches to the upstream provider directly instead of using the fork. The only real change in the fork is https://github.com/rancher/terraform-provider-rke/commit/81bf6b33632124463163e8dada32b6ddb17391ba which doesn't seem worth maintaining a fork for.

Hi! I would love to see this Pulumi provider upgrades the Terraform provider dependency to 1.4.2. The current version (1.2.2) only supports K8s versions in between 1.17 and 1.20.

Picked this up in #125 which replaces this.

authors: FollieHiyuki lukehoban viveklak

repo: pulumi/pulumi-rke


text:
Header needs to be responsive

Hello @punyakrit please assign this issue to me under gssoc 24

Hello @punyakrit i raised pr #92 for this . please check

repo: punyakrit/social-share


text:
Pull Request Template Creation

I am writing to express my interest in contributing to your repository by creating a pull request template.
I believe that having a standardized template will help streamline the contribution process, ensuring that all necessary information is included and making it easier for maintainers to review and merge pull requests.
Could you please assign me the issue under gssoc24? I am excited about the opportunity to contribute to your project and help improve the workflow for all contributors.

@punyakrit could you please add gssoc24 as well as level of difficulty labels.

Would add level depending on pr

authors: PradnyaGaitonde punyakrit


text:
Change UNMASKED_VENDOR_WEBGL and UNMASKED_RENDERER_WEBGL

There is some method to change (mask) the UNMASKED_VENDOR_WEBGL  and UNMASKED_RENDERER_WEBGL ?
https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_renderer_info

Were you able to solve the issue?

Why its closed?

repo: puppeteer/puppeteer


text:
How to skip Google recaptcha in puppeteer?

So I am trying to access https://my.outbrain.com/login URL and whenever I enter the login and press enter, it shows Google ReCaptcha:

How can I skip or bypass this ReCaptcha?

@vyomsrivastava i think you can't.
this is a behaviour of the website,
you cannot override the behaviour of the website.

@andreabisello is there any way that the website doesn't detect puppeteer as a bot ??

@vyomsrivastava try forcing user agent

browser = await puppeteer.launch()
page = await browser.newPage()
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36')

@andreabisello is there any way that the website doesn't detect puppeteer as a bot ??

please check my framework

@nicoandmee seems unavailable.

@vyomsrivastava Can you please help me that how can I skip recaptcha ?

authors: andreabisello japneetbhatia nicoandmee paulogc vyomsrivastava


text:
[Bug]: Some OOPIFs related tests are flaky

Bug description
See https://github.com/puppeteer/puppeteer/runs/5137856862?check_suite_focus=true
Puppeteer version
Latest
Node.js version
Any
npm version
Any
What operating system are you seeing the problem on?
Linux, macOS, Windows
Relevant log output
https://github.com/puppeteer/puppeteer/runs/5137856862?check_suite_focus=true

cc @jrandolf

I debugged one particular test called should support frames within OOP frames. There are two frames in the test: frame A and frame B. Frame B is a local frame inside frame A. Sometimes the backend events arrive in the following order: frame A attached, frame B attached, frame A navigated, frame B navigated. The _onFrameNavigated in FrameManager recursively removes existing child frames, thus, the frame B is removed. Since the attached event has already happened it is never re-attached and the call handling the event "frame B navigated" hits an assertion.
I think we can only solve it by rewriting the code to use setAutoAttachRelated and runIfWaitingForDebugger. Otherwise, the order of events in iframes is rather unpredictable.


text:
[Types] Improve types for evaluate and evaluateHandle on various types (and JSHandle<T>)

Currently the evaluate and evaluateHandle functions and JSHandle<T> itself are very loosely typed, for example, this is allowed:
async function demo(handle1: JSHandle<number>, handle2: JSHandle<string>) {
	const notActuallyBoolean: JSHandle<'wait what'> = await handle1.evaluateHandle<JSHandle<boolean>>(
		  (num, notActuallyNumber: number, notActuallyString: string) => 'hi', handle2, 42);
}

Problems are:

Argument types are not checked (except for the subject handle itself).
Return type is not checked for evaluateHandle.
JSHandle<A> extends JSHandle<B> for any A,B. Same for ElementHandle<E>.

Solution
This could be solved by typing the functions as follows:
type Passed<H extends SerializableOrJSHandle> = H extends JSHandle<infer U> ? U : H;
type PassedArgs<Args extends SerializableOrJSHandle[]> = { [K in keyof Args]: Passed<Args[K]> };

class JSHandle<HandleObjectType> {
  /** Make sure that not e.g. `JSHandle<string> extends `JSHandle<number>` */
  private _dummy?: HandleObjectType;

  evaluateHandle<Args extends SerializableOrJSHandle[], Return>(
      pageFunction: (subject: HandleObjectType, ...args: PassedArgs<Args>) => Return,
      ...args: Args
  ): Promise<JSHandle<Return>> { ... }

  evaluate<
      Args extends SerializableOrJSHandle[],
      Return extends Serializable | PromiseLike<Serializable> | void
  >(
      pageFunction: (subject: HandleObjectType, ...args: PassedArgs<Args>) => Return,
      ...args: Args
  ): Promise<Awaited<Return>> { ... }

  ...
}

class Frame {
  evaluateHandle<Args extends SerializableOrJSHandle[], Return>(
      pageFunction: (...args: PassedArgs<Args>) => Return,
      ...args: Args
  ): Promise<JSHandle<Return>> { ... }

  evaluate<
      Args extends SerializableOrJSHandle[],
      Return extends Serializable | PromiseLike<Serializable> | void
  >(
      pageFunction: (...args: PassedArgs<Args>) => Return,
      ...args: Args
  ): Promise<Awaited<Return>> { ... }

  ...
}

// Same idea for ExecutionContext, Page, DOMWorld

With this version, the TypeScript compiler will complain about the demo function from earlier.
Feel free to copy parts of this code if you would want to.
Note that without the _dummy field it is not just the case that we can assign any JSHandle to any other, but we also have that Passed<ElementHandle<HTMLElement>> extends unknown instead of HTMLElement.
Wrapper/workaround for current Puppeteer versions (informational)
You can already accomplish this in current versions using the following wrapper functions:
// Workaround: Need the ElementHandle case because inferring U on JSHandle gives unknown because currently JSHandle<A> extends JSHandle<B> for any A,B...
type HandleValue<H extends JSHandle> = H extends ElementHandle<infer U> ? U
	  : H extends JSHandle<infer U> ? U : never;

type Passed<H extends SerializableOrJSHandle> = H extends JSHandle ? HandleValue<H> : H;
type PassedArgs<Args extends SerializableOrJSHandle[]> = { [K in keyof Args]: Passed<Args[K]> };

type PageFunction<Target extends Frame | Page | ExecutionContext | DOMWorld | JSHandle,
	  Args extends SerializableOrJSHandle[], Return> =
	  Target extends JSHandle
			? (obj: HandleValue<Target>, ...args: PassedArgs<Args>) => Return
			: (...args: PassedArgs<Args>) => Return;

/** Typed version of {@link Frame#evaluateHandle}, {@link JSHandle#evaluateHandle}, etc. */
export async function evaluateHandle<Subject extends Frame | Page | ExecutionContext | DOMWorld | JSHandle,
	  Args extends SerializableOrJSHandle[], Return>(
	  subject: Subject, pageFunction: PageFunction<Subject, Args, Return>, ...args: Args): Promise<JSHandle<Return>> {
	// eslint-disable-next-line @typescript-eslint/ban-ts-comment
	// @ts-ignore This compiles for all Targets individually
	return await subject.evaluateHandle(pageFunction, ...args) as JSHandle<Return>;
}

/** Typed version of {@link Frame#evaluate}, {@link JSHandle#evaluate}, etc. */
export async function evaluate<Subject extends Frame | Page | ExecutionContext | DOMWorld | JSHandle,
	  Args extends SerializableOrJSHandle[], Return extends Serializable | PromiseLike<Serializable> | void>(
	  subject: Subject, pageFunction: PageFunction<Subject, Args, Return>, ...args: Args): Promise<Awaited<Return>> {
	// eslint-disable-next-line @typescript-eslint/ban-ts-comment
	// @ts-ignore This compiles for all Targets individually
	return await subject.evaluate(pageFunction as never, ...args) as Awaited<Return>;
}

Thanks for helping us improve our types! It seems you've already investigated this. Mind opening a PR?

@jrandolf nice. First a question: I think for backwards compatibility the evaluate* functions should probably retain their first generic type parameter as the type of the function passed to them? Especially since the current docs recommend specifying it.
Related to that: Should the EvaluateFn<T,U,V> and EvaluateHandleFn remain around with the same signatures for backwards compatibility? They won't really be used in the new typings anymore, but they are exported members so some people may have used them. Although, because of their use of the any type the code using them probably needs to be re-typed anyway, so maybe removal would be ok, idk.

Oh, actually: TypeScript does not support partially specifying generic parameters, so even if we keep the first parameter the same, no other parameters can be added... I'll see if that is even possible.

At some point, the types will have to be redone due to an separate issue of our types not matching the API docs. Because of this, we can work through this on a PR while we wait for this to happen :)

@jrandolf Ok! I'm struggling a bit with the types, mostly because TypeScript gets a bit confused with the function and string union, since the evaluate functions can also take a string parameter. Maybe it's not impossible, but it requires extra code and really doesn't want to work well. It would massively simplify the typing if the option to pass a string was just removed. It's usecase is covered anyway by just using something like () => <string here>. In my opinion, the string option was never useful to begin with, since it doesn't even support passing arguments.

Actually, I guess it's necessary for dynamically constructed functions... Not sure how to solve this

I created a draft PR! #8540

@jrandolf I just checked and the issue that e.g. JSHandle<number> is assignable to JSHandle<string> is not fixed yet. This is what I did with the dummy field in class JSHandle.

I think this was fixed via the branded types? cc @jrandolf

This doesn't seem to work well with xpath... I was using Page["$x"] which probably should be deprecated as Frame["$x"]? Anyway, Page["$$"] seems to accept the selector as generic but then this doesn't really help when I have xpath/... prefix... Sticking with ... as ... for now, hope this helps improve the lib, cheers!

@Maxim-Mazurok Take a look at #8579, they could try to improve the template string types for xpath query handlers.
I don't think Page#$x will be deprecated btw.

authors: Maxim-Mazurok OrKoN jrandolf stevenwdv


text:
[Bug]: Puppeteer v16 won't connect to browser servers created by Playwright

Bug description
Steps to reproduce the problem:

Launch a Chromium server with Playwright (tested on 1.23.4 and 1.24.2)

const { chromium } = require("playwright");
const getPort = require("get-port");

(async () => {
  const port = await getPort();

  chromium.launchServer({
    args: [
      `--remote-debugging-port=${port}`,
    ],
  });
  console.log(`Get wsEndpoint at ${`http://127.0.0.1:${port}/json/version`}`);
})();

Get the webSocketDebuggerUrl from the /json/version endpoint
Connect Puppeteer to the endpoint

// pptr.js
const puppeteer = require('puppeteer-core');

(async () => {
  const browser = await puppeteer.connect({
    browserWSEndpoint: "ws://127.0.0.1:53866/devtools/browser/d7975090-196a-47a1-b5fe-bd2f723bef5e"
  });
  const page = await browser.newPage();
  await page.goto("https://example.com/");
  console.log(await page.title());

  await browser.close();
})().catch(console.error);

Using Puppeteer v15.5.0 it executes as expected
>  node .\pptr.js
Example Domain

Using Puppeteer v16.0.0, it doesn't finish the connection, nor throws an exception
Puppeteer version
v16.0.0
Node.js version
v16.14, v16.15.1
npm version
v8.5.5, v8.12.2
What operating system are you seeing the problem on?
Linux, Windows
Relevant log output
No response

I am able to reproduce and I have a fix in mind but I am also curious about the use case: what's the use case behind connecting to the browsers started by Playwright using Puppeteer?

@OrKoN use case is having puppeteer start/provision chrome and use it's APIs to allow other clients to connect and do what they need. The primary failure is with playwright atm, but we also support any CDP-based libraries so I can see potential impacts there as well.

@joelgriffith thanks for the details! I think it's a bug on Puppeteer's side so it should not affect other CDP-based clients.

authors: OrKoN andyMrtnzP joelgriffith


text:
(FACT-971) Implement memory resolver for AIX

For memory, we just use the vminfo system call. For swap, we query the ODM for all devices marked as "paging", and use the swapqry system call to get information about them.
This has the same ODM implementation as #1121 (in fact the same commit). I'll be sure to rebase them as appropriate to cover any review of the ODM classes.

@MikaelSmith updated to use the PAGE_SIZE define from sys/limits.h

:+1:

@MikaelSmith underscores everywhere.
Alsoadjusted to enable perfect forwarding of the string argument in query creation. We were relying on inlining to avoid several string copies there. I'm pretty sure that'd all get inlined in an optimized build, but it was easy enough to explicitly use std::forward

Indentation fixed

authors: MikaelSmith branan

repo: puppetlabs/facter

license_source: bigquery


text:
(maint) Add internal_list key to MAINTAINERS

This change adds a reference to the Google group the maintainers are associated with.

Travis gets angry if you don't being your commit message with either a (FACT-XXXX) or (maint) or (docs).

CLA signed by all contributors.

@Magisus I've edited the commit title- will Travis pick this up again, or do we need to manually re-trigger it?

The issue is with the commit message itself, not the PR title. So if you do a commit --amend and edit the message to include the (maint) tag, then force push, Travis will retrigger. Thanks!

I'm going to close this PR in favor of https://github.com/puppetlabs/facter/pull/1436, which will make our commit format checks go green.

authors: Magisus puppetcla theshanx


text:
(FACT-834) Avoid double loading ec2 warnings

When implementing custom facter module, I usually require external dependencies. But when requiring 'facter/ec2',  I get the following warning:
Already evaluated rest at true, reevaluating anyways
Already evaluated rest at true, reevaluating anyways

This PR ensure the facter/ec2/rest.rb is only loaded once when I require 'facter/ec2' module.
Singed CLA.

CLA signed by all contributors.

I'd like to spend some time looking at the rest.rb file to figure out what's actually causing this warning. It should always be safe to require something more than once, and I'd prefer to fix the underlying issue if we can sort it out.
Do agree we should silence this warning, though

I agree on your statement. I think it's still better to avoid loading twice because this would call amazon's http endpoint multiple times. I prefer http call is executed once per facter run.

I haven't been able to track down the root cause of the warning. At this point I guess I'm :+1: on merging this in.

I have this change running in production for a few weeks now, it's working for us.

@activars it looks like you updated the title of this pull request, but could you update the commit message as well? It needs to be in the same format, referencing the ticket, i.e. (FACT-834) Avoid double loading ec2 warnings. Once that's done, we should be able to merge this pull request.

I corrected the commit message.

@activars thanks! :+1: once travis goes green

authors: activars branan melissa puppetcla whopper


text:
Fix #122

Fixed optional parameters definition
Added support for custom types
Fixed doc URL and a typo
Added and fixed tests

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@chelnak , can you please have a look at this PR and linked issue?

@tiandrey Thank you!

authors: CLAassistant chelnak tiandrey

repo: puppetlabs/puppet-lint


text:
(MAINT) Upgrade lein-ezbake

Utopic has reached EOL and we no longer build packages for it, yet our
version of ezbake was old enough that it still attempted to build
packages for it and would fail.
This commit bumps us up to a newer version of lein-ezbake which will
allow for local ezbake builds to work properly. Jenkins CI isn't failing
because we override the platforms in ci-job-configs and thus don't rely
on the default platforms defined in lein-ezbake.

@jb

Hmm...never done this before but I just closed my previous PR against master and re-opened it against stable.  My branch was forked off master though...not sure if that's going to be problematic for merges in the future or something.

:+1:

repo: puppetlabs/puppet-server


text:
(PUP-3560) Properly wrap trusted fact extensions

The X.509 spec states that all extensions should de a DER data type wrapped inside of an DER octet string. Due to a bug in the OpenSSL::X509::Extension library we were previously just stuffing them into a DER octet string as unencoded raw data. This PR updates how we handle generating and parsing certificate requests (CSR) and also how we generate the certificates themselves.

Well shoot, all comments are addressed but it looks like I have test that's broken in travis, but works on my machine. I'll need to figure this out tomorrow.

Closed in favor of https://github.com/puppetlabs/puppet/pull/3474

repo: puppetlabs/puppet


text:
(PUP-7066) return and deprecate stack trace in http server error response

In 7a765b7 and 5ae2d155 we unintentionally introduced a backwards-incompatible change, removing the "stacktrace" array from the HTTP Error object schema. We also added the stack trace information to the Puppet error log. These commits were originally released in Puppet 4.8.0. There is a request to backport the intent of these fixes, that is to remove the stack trace information from the HTTP response, to the LTS-1.7 branch. This PR first cherry-picks back the original commits introduced in the 4.8.0 series, 7a765b7 and 5ae2d155. Since we have determined some of this change was backwards-incompatible, this PR includes partial reverts of these commits - returning the stack trace as formerly constituted, except that rather than return the actual stack trace content, we return a deprecation warning. This gives notice to users in case there are systems expecting this error format that need to change. The reverts are partial in that we retain the previous addition of the stack trace to the puppet error log to avoid surprising anyone who had already begun to rely on this behavior in the 4.8 series and because with the stack trace string content removed, retaining the content for the logs will allow users to still find this information if they need it. Eventual removal of the property is ticketed as PUP-7070.

CLA signed by all contributors.

For future ref @MosesMendoza I think it's preferential to revert an entire commit and then recreate desired changes in a new commit, as it can make it easier to work with gits tooling.  It can also be tricky to find changes hidden inside of revert commits if they are edited.
Sorry I didn't catch / mention this sooner.

Makes sense @Iristyle. I was just trying to make the changes as streamlined as possible, but agree that this can obscure later reference. Thanks for the note.

authors: Iristyle MosesMendoza puppetcla


text:
(PUP-7996) Ensure that --tasks disables the Runtime3Loader

This commit ensures that the StaticLoader doesn't add any built in
resource types and that the Runtime3Loader doesn't get created and
added to the chain of loaders.
The change is necessary to:
a) Prevent that the names of built in puppet types collide with task
names.
b) Prevent that files residing under a modules 'manifests' folder are
loaded.

PR-6235 should be merged before this one.


text:
(PDB-1255) Switch tests to pick open port before bootstrapping TK

Previously tests would set Jetty's port to 0, which automatically picks
an open port on startup. The downside of that was the PuppetDB config
wouldn't be updated with the actual port chosen, so that info would have
to be pulled from the Jetty server. This patch switches to determine an
open port before starting TK, then use that port in the TK config. This
makes our test more like what users would run (specifying a port rather
than letting Jetty choose).

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/763/

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/771/

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/790/

@mullr @kbarber @rbrw Pushed up some logic to catch problems with binding to the random port and retrying

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/798/

@rbrw Switched to decrement instead of increment

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/814/

@pljenkinsro retest this please

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/822/

@pljenkinsro retest this please

authors: pljenkinsro senior wkalt

repo: puppetlabs/puppetdb


text:
Test merge 6.0.x

[facebones ignore]

Test PASSed

will reintroduce this after #2692

authors: puppetlabs-jenkins robdaemon


text:
pdksync - Update pdk-templates for gitpod and codespaces support

Update pdk-templates for gitpod and codespaces support
pdk version: 1.18.1

ignoring this for now as this module is about to be deprecated.

repo: puppetlabs/puppetlabs-dsc


text:
AWS plugin fails to load when config file doesn't exist

This happens even when the credentials file exists and has all the right information.

Oh nevermind, this is a slightly different issue. Wash requires a config file as well as credentials file, but we should probably only require at least one.

authors: MikaelSmith ekinanp

repo: puppetlabs/wash


text:
Add support for event listeners

The XMLHttpRequest object is an EventTarget and therefore supports addEventListener. The event I am most interested in is "progress". Perhaps that event handler alone could be added as an argument to the affjax function.

FWIW, I found this Gist on how to report progress via lower-level Web.XHR module: https://gist.github.com/jmackie/b6afee6e1cb628ff5a600b626026aa5c#file-upload-purs

authors: gasi michael-swan

repo: purescript-contrib/purescript-affjax


text:
Update changelog since v7.0.0

Description of the change
This PR updates the CHANGELOG in preparation for the upcoming release of this library.
Related: purescript/purescript#3985

CI is failing due to the newtype change:
[24/25 ExtraneousClassMember] .spago/strings/master/src/Data/String/Pattern.purs:26:1

  26  newtype Replacement = Replacement String
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  wrap is not a member of type class Data.Newtype.Newtype

  in type class instance

    Data.Newtype.Newtype Replacement
                         String

CI is failing due to the newtype change:
[24/25 ExtraneousClassMember] .spago/strings/master/src/Data/String/Pattern.purs:26:1

  26  newtype Replacement = Replacement String
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  wrap is not a member of type class Data.Newtype.Newtype

  in type class instance

    Data.Newtype.Newtype Replacement
                         String

I was thinking we’d merge despite the CI issue as it’s clearly unrelated; we have to circle back through all the CI files anyways at release time.

I was thinking we’d merge despite the CI issue as it’s clearly unrelated; we have to circle back through all the CI files anyways at release time.

Mm... good point.

Mm... good point.

authors: JordanMartinez thomashoneyman

repo: purescript-contrib/purescript-uri


text:
🛑 Puro.earth Registry Services API (Staging) is down

In bfa50ea, Puro.earth Registry Services API (Staging) (https://rs.api-preview.purostaging.com/$API_SERVICES_HEALT_ENDPOINT) was down:

HTTP code: 503
Response time: 386 ms

Resolved: Puro.earth Registry Services API (Staging) is back up in b6547f5.

repo: puro-earth/status


text:
Cumulative .env merging

It would be useful if dotenv could merge the variables defined in all .env files in the whole folder chain (current folder and all parents) into the environment so that variables defined in .env files overshadow variables defined in .env files in parent folders (like Rust's scope variable declaration shadowing).
It'd be useful because the applicable scope of variables defined in .env files (in terms of folders they should apply to) can be different, and the current workarounds are not very elegant: Either merge all variables required in all subfolders manually into one .env file and put it in the common ancestor folder of all, or create multiple .env files and duplicate definitions of variables with the same value across these .env files, so if a variable's value should change, you have to edit all those .env files across all these folders.
E.g. one common example is when working with workspaces, but cases with more levels of scopes also occur.

I ran into another use case where I needed merging: I needed to put some auth credentials in a .env file in the parent dir of many different projects that each have their own .env file, without having to always modify each .env file in EVERY sub dir when the auth credentials change. And the auth credentials should not be duplicated/spread across different locations, they should only be in the top dir's .env file.
It would be really useful to have merging, so that we can split up & modularize our .env files.
It would really make working with such use cases easier, where different parent dirs contain .env data for different concerns (separation of concerns).

repo: purpliminal/rust-dotenv

license: mit


text:
minDate causes duplicate react key warnings

When configuring the date-picker to use the minDate prop, multiple react warnings are produced.
This is what I am rendering:
<FormGroup validationState={this.state.validation.date}>
    <ControlLabel>Start Date</ControlLabel>
    <DatePicker
        id="formControlsStartDate"
        value={this.state.date}
        onChange={date => this.setState({ date })}
        minDate={(new Date()).toISOString()}
        showClearButton={false}
    />
    <FormControl.Feedback />
</FormGroup>

The warning produced:

Warning: flattenChildren(...): Encountered two children with the same key, 5. Child keys must be unique; when two children share a key, only the first child will be used.
in tr (created by DatePickerCalendar)
in tbody (created by DatePickerCalendar)
in table (created by DatePickerCalendar)
in DatePickerCalendar (created by DatePicker)
in div (created by Popover)
in div (created by Popover)
in Popover (created by DatePicker)
in Position (created by Overlay)
in Transition (created by Fade)
in Fade (created by Overlay)
in RootCloseWrapper (created by Overlay)

Proj. Dependencies:

"react": "^15.6.1",
"react-bootstrap": "^0.31.2",
"react-bootstrap-date-picker": "^5.1.0",

Kind regards.

I also see this:
"react": "^15.6.2",
"react-bootstrap": "^0.31.3",
"react-bootstrap-date-picker": "^5.1.0",

It the same warning is caused by the param maxDate. Anybody managed to fix it?

@adam-bubela  I was able to fix this by using @JonShort 's fork.
https://www.npmjs.com/package/jonshort-shim-react-bootstrap-date-picker

authors: adam-bubela jonesm33 osphost powellandy

repo: pushtell/react-bootstrap-date-picker


text:
🛑 Library is down

In 4bc0f37, Library (https://library.unmer.ac.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Library is back up in 2cdb9c1 after 3 minutes.

repo: pusimgit/upptime


text:
🛑 Jurnal is down

In 5a3cf7c, Jurnal (https://jurnal.unmer.ac.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Jurnal is back up in 3849a58 after 6 minutes.


text:
🛑 Eprints is down

In e070278, Eprints (https://eprints.unmer.ac.id) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Eprints is back up in f7df67a.


text:
Bug: Resolve dependencies[1.x]

Issue Description

npm audit
fossa

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

repo: pustovitDmytro/code-chronicle


text:
자료 체계화

더 좋은 의견있으면 알려주세요
현재 폴더들은 더 상위 개념들과 함께 존재합니다.
예)
수집 자료 -상위 개념
논문 - 하위 개념
데이터 파일 - 하위 개념
따라서 자료 저장이 체계적이지 못해 자료를 찾고 추가하는데, 많은 어려움이 있습니다.
그래서 폴더들의 위치를 변경하려합니다
정책자료  (국내 자료, 해외 자료)
사례          (국내 사례, 해외 사례)
기타 자료  (통계 자료 ,기타 )
참고 사이트
논문

@klavna 해당 내용 현재 진행된 상태일까요?

authors: klavna wlwhsxz


text:
참고자료.md 링크 오류

경로당 서비스 질에 따른 만족도
참고자료.md파일 404 error 뜹니다. 학술 사이트에서 제목 검색하면 뜹니다.

학술 논문 및 자료 링크 주소가 오류가 나는 경우가 종종 있는 듯 합니다. pdf 업로드 또는 학술 사이트로 하이퍼링크 함이 좋을 듯 합니다.

동의합니다.
논문 검색시 팁을 드리자면 구글 스칼라 이용하는 편이 좋습니다.
또한, 최신의 자료를 보는 편이 좋습니다.(인용 횟수도 높으면 좋음)

authors: hesuhesu pwjdgus


text:
Update sbt-sonatype to 3.9.5

Updates org.xerial.sbt:sbt-sonatype from 3.9.3 to 3.9.5.
GitHub Release Notes - Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.xerial.sbt", artifactId = "sbt-sonatype" } ]

labels: sbt-plugin-update, semver-patch

Superseded by #82.

repo: pwliwanow/fdb-pubsub


text:
unc0ver 3.6.3 - locks up and freezes entire phone

Describe the bug
So using unc0ver 3.6.3 on an iPhone 6 (a8).  Works pretty great however randomly after using the phone exiting an app and try to select the messages app or settings app and the phone locks up (freezes) the UI is not responsive at all.  Have to do a hard reset and rejailbreak.
To Reproduce
Steps to reproduce the behavior:
there are no consistent ways to reproduce this except use the phone but there are close to 95+ people having this same issue with unc0ver.
https://www.reddit.com/r/jailbreak/comments/d4opdz/
Screenshots
No screenshots applicable
Device (please complete the following information):

iOS Version: 12.4
iOS Device: iPhone 6 (A8)
unc0ver Version: 3.6.3

Place an "x" between the brackets if true:

[ ] this is a bug others will be able to reproduce
[ ] this issue is present with all tweaks uninstalled(except for default packages) or disabled
[ ] this issue is present after a rootfs restore
[x ] this issue is present on the latest version of unc0ver

Logs
If applicable, add logs or error messages here.

Adding myself to the list of folks experiencing this

This happens about 1-2 days after using the 3.6.3 jailbreak. Didn't happen with 3.5.6 release. Just the 3.5.6 release was considerably less consistent in jailbreaking.

Hello,
I am experiencing the exact same issue. Very well described btw.
I have an iPhone 8 running 12.4 and tried every version of unc0ver from 3.5.6 to 3.6.3.
Sincerely

Hi I added myself also to the group with this issue.
For me also, this happens about some time after using the 3.6.3 jailbreak.
I deinstalled some tweaks but no healing. The GUI stuck some time after use and also a respring, reboot, renewal of Jailbreak or refresh the cache with Sleep and Homebutten not works. I checked my RAM with a cydia tweak and its overloaded. Only ~20-50MB free.
Please help in finding a solution or consider it in a new Unc0ver version.
simonw2g

authors: EdgeXS cdlenfert fioute simonw2g


text:
chenge place of some scripts to fix build error

そのままではwindowsのplatformでビルドできなかったので、scripts内のスクリプトの3つを新たに作成したEditorと言うフォルダーに入れて、ビルド時に参照しないようにすることでビルド可能となるようにしました。しかし、Editorの中身は参照されないので、この変更により別の問題が生じているかもしれないです。
以下のissueに関連したものです。

#53

#55 をマージしたのでこちらはクローズします。

repo: pwri-opera/OperaSim-PhysX


text:
🛑 NARLabs is down

In b94067a, NARLabs (https://www.narlabs.org.tw/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NARLabs is back up in 028a3ab.

repo: pwtsai/upptime


text:
🛑 NARLabs is down

In dc751be, NARLabs (https://www.narlabs.org.tw/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: NARLabs is back up in 4d4d36a.


text:
Exception when running GST example

Describe the bug
When I run the example notebook master/jupyter_notebooks/Tutorials/algorithms/GST-Overview.ipynb I get the following error:
ValueError: Could not interpret 'CPTP' mode as a parameterization! Details:
Could not convert operation to to type(s): ('CPTP',)

This is with the notebook and package both from current master branch.
To Reproduce
Steps to reproduce the behavior:

Run GST-Overview.ipynb
See error

Expected behavior
The standard example should execute without errors. Also the documentation for the CPTP mode could be improved. Is there somewhere a description why TP and CPTP are the default modes?
Environment (please complete the following information):

pyGSTi version: 0.9.10.post4
python version: 3.8
OS: Windows

Additional context
Other arguments such as 'S' give similar errors.

Could you confirm you're on the tip of the master branch, i.e., commit 4f8bf5337b01b7afcb7b0580b717b5d1fe281be4?  I'm unable to reproduce this using python 3.8 on OSX 10.15 or on Windows 10.
Please also ensure that you've installed pyGSTi after pulling.  You can run pip install or pip install -e . (to install locally) from the root pyGSTi/ directory to do this.

@enielse I am at the master branch. A minimal example that creates the problem here is:
import pygsti
from pygsti.modelpacks import smq1Q_XYI

target_model = smq1Q_XYI.target_model()#.depolarize(op_noise=0.00, spam_noise=0.00)      # a Model object
prep_fiducials = smq1Q_XYI.prep_fiducials()  # a list of Circuit objects
meas_fiducials = smq1Q_XYI.meas_fiducials()  # a list of Circuit objects
germs = smq1Q_XYI.germs()                    # a list of Circuit objects
maxLengths = [1,2,4,8,16,32]
exp_design = pygsti.protocols.StandardGSTDesign(target_model, prep_fiducials, meas_fiducials,
                                                germs, maxLengths)

model = exp_design.create_target_model()
model.set_all_parameterizations('CPTP')

To check I did a clean install (using virtualenv) and the problem still occurs. I did notice a warning though: Buffer dtype mismatch, expected 'int64_t' but got 'long' is printed just before the exception occurs.
This is with numpy 1.22.
If I switch to numpy 1.21 (and to a pip install . again) I get this stack trace
(py38) c:\projects\misc\pyGSTi>python \data\tmp\test_gst.py
Traceback (most recent call last):
  File "\data\tmp\test_gst.py", line 19, in <module>
    import pygsti
  File "C:\data\py38\lib\site-packages\pygsti\__init__.py", line 11, in <module>
    from . import baseobjs
  File "C:\data\py38\lib\site-packages\pygsti\baseobjs\__init__.py", line 23, in <module>
    from .errorgenbasis import ElementaryErrorgenBasis, ExplicitElementaryErrorgenBasis, CompleteElementaryErrorgenBasis
  File "C:\data\py38\lib\site-packages\pygsti\baseobjs\errorgenbasis.py", line 18, in <module>
    from pygsti.tools import optools as _ot
  File "C:\data\py38\lib\site-packages\pygsti\tools\__init__.py", line 13, in <module>
    from .basistools import *
  File "C:\data\py38\lib\site-packages\pygsti\tools\basistools.py", line 524, in <module>
    from . import matrixtools as _mt
  File "C:\data\py38\lib\site-packages\pygsti\tools\matrixtools.py", line 26, in <module>
    from . import fastcalc as _fastcalc
  File "pygsti\tools\fastcalc.pyx", line 1, in init pygsti.tools.fastcalc
    # encoding: utf-8
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Note: with a plain virtualenv environment cython is not installed by default. After installing I still get similar errors.

@coreyostrove The branch fixes the issue for me. Thanks for looking into this!

Closing now that version 0.9.10.1 is released.

authors: eendebakpt enielse peendebak

repo: pyGSTio/pyGSTi


text:
DOC : fix version on the docs

Fix #105

Thanks, does this need cherry picking into 0.1?

yes, only this commit.

repo: pyansys/pymotorcad


text:
Entropic changes being overwritten

Describe the bug
The submodels are currently being called in such a way that entropic changes are being set to zero on the models.
To Reproduce
Steps to reproduce the behaviour:

Go to '...'

experiment = pybamm.Experiment(
    [
        "Discharge at 2 A for 10 hours or until 3.3 V",
        "Rest for 1 hour",
        "Charge at 2 A until 4.1 V",
        "Hold at 4.1 V until 50 mA",
        "Rest for 1 hour",
    ]
)

chemistry = pybamm.parameter_sets.Marquis2019
parameter_values = pybamm.ParameterValues(chemistry=chemistry)
model_options = {
    "thermal": "lumped",
}
model = pybamm.lithium_ion.SPMe(model_options)

sim = pybamm.Simulation(model, parameter_values=parameter_values, experiment=experiment)
sim.solve()
variable_names = ['Current [A]',
                  'Terminal voltage [V]',
                  'Measured battery open circuit voltage [V]',
                  'Volume-averaged Ohmic heating [W.m-3]',
                  'Volume-averaged irreversible electrochemical heating [W.m-3]',
                  'Volume-averaged reversible heating [W.m-3]',
                  'Volume-averaged total heating [W.m-3]',
                  'Volume-averaged cell temperature [K]',
                  'X-averaged negative particle surface concentration [mol.m-3]',
                  'X-averaged positive particle surface concentration [mol.m-3]',
                  'Negative electrode entropic change',
                  'Positive electrode entropic change']
sim.plot(quick_plot_vars=variable_names)

Expected behaviour
Entropic changes should not be zero
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Chen2020 parameter set has dUdT = 0 so test on Marquis2019

Fixed by #1093

authors: TomTranter tinosulzer

repo: pybamm-team/PyBaMM


text:
URL scheme invalid for CockroachDB

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
I try to build PostgresDsn for cockroachdb using postgresql+psycopg2://... at first. Then there are error
AssertionError: Could not determine version from string 'CockroachDB CCL v23.1.9 (x86_64-pc-linux-gnu, built 2023/09/07 16:22:15, go1.19.10)'

After that i change to cockroachdb://... base on this issue https://github.com/cockroachdb/sqlalchemy-cockroachdb/issues/166#issuecomment-938677252, but there are other error shows that the cockroachdb scheme is invalid
pydantic_core._pydantic_core.ValidationError: 1 validation error for Settings
  URL scheme should be 'postgres', 'postgresql', 'postgresql+asyncpg', 'postgresql+pg8000', 'postgresql+psycopg', 'postgresql+psycopg2', 'postgresql+psycopg2cffi', 'postgresql+py-postgresql' or 'postgresql+pygresql' [type=url_scheme, input_value=MultiHostUrl('cockroachdb...alhost:26257/db'), input_type=MultiHostUrl]

I think we need to allow cockroachdb scheme(?)
Example Code
from logging import getLogger

from pydantic import PostgresDsn, field_validator, model_validator
from pydantic_settings import BaseSettings

logger = getLogger(__name__)

class Settings(BaseSettings):
    PROJECT_NAME: str = "project"

    # POSTGRESQL DATABASE
    DATABASE_SCHEME: str = "cockroachdb"
    DATABASE_HOSTNAME: str = "localhost"
    DATABASE_USER: str = "user"
    DATABASE_PASSWORD: str = "password"
    DATABASE_PORT: int = 26257
    DATABASE_DB: str = "db"

    # POSTGRESQL GENERATED URI RESULT
    SQLALCHEMY_DATABASE_URI: str = ""

    LOG_LEVEL: str = "DEBUG"

    @field_validator("LOG_LEVEL", mode="after")
    @classmethod
    def validate_log_level(cls, level: str):
        return level.upper()

    @model_validator(mode="after")
    def build_postgre_dsn(self):
        self.SQLALCHEMY_DATABASE_URI = PostgresDsn.build(
            scheme=self.DATABASE_SCHEME,
            username=self.DATABASE_USER,
            password=self.DATABASE_PASSWORD,
            host=self.DATABASE_HOSTNAME,
            port=self.DATABASE_PORT,
            path=f"{self.DATABASE_DB}",
        ).__str__()
        print(self.SQLALCHEMY_DATABASE_URI)
        return self

settings = Settings()

Python, Pydantic & OS Version
pydantic version: 2.10.3
        pydantic-core version: 2.27.1
          pydantic-core build: profile=release pgo=false
                 install path: /home/.../.venv/lib/python3.10/site-packages/pydantic
               python version: 3.10.15 (main, Nov 30 2024, 08:31:56) [GCC 9.4.0]
                     platform: Linux-5.15.0-125-generic-x86_64-with-glibc2.31
             related packages: pydantic-settings-2.7.0 fastapi-0.115.6 typing_extensions-4.12.2
                       commit: unknown

Nevermind, already find fix on this link https://docs.pydantic.dev/latest/api/networks/#pydantic.networks.CockroachDsn

repo: pydantic/pydantic


text:
Looking for alternative for GetterDict in V2

Hello
django-ninja uses pydantic to achieve some very nice and highly appreciated functionality like automatically converting ORM-querysets to lists or custom Resolvers or Dot Aliases
These were achieved by GetterDict, which is gone in v2
so what I am looking for is some sort of alternative in v2 that can act as a proxy between pydantic-model and ORM-model , to collect values from object attributes (field names and aliases) - like here where in v1 you have example for xml parsing
see also discussion here #5393
Thank you

@vitalik could you help us understand what you are using GetterDict for that prevents from_attributes from being a viable replacement?
Originally, GetterDict was just meant as an implementation detail/workaround for making it so pydantic could read attributes with the same API as dict field access. But now with pydantic_core, our intent is that that is no longer necessary for the sake of parsing objects into pydantic models via attribute access. If the reason you want GetterDict is specifically for pydantic integration, then rather than adding GetterDict back into pydantic, I think we'd really prefer to make it so that pydantic_core just automatically does the right thing to get attributes off of an object, or at least handles as many use cases as possible.
I'll also note that as of the next alpha release, which will be released today, you'll be able to use more complex validation aliases for reading data from nested attributes.
Also, if you want GetterDict for reasons unrelated to pydantic integration, I think it might make sense to make it into a separate package than pydantic, otherwise we end up needing to maintain it even though it isn't intended for use with the pydantic library.
I'm not saying there isn't a good reason to keep GetterDict, or that there isn't a gap left by removing it, but I don't currently understand where the gap lies and I think it would help us help you if you could show us some code/functionality that there isn't a good way to handle in v2 without the GetterDict.

Hi @dmontagu @samuelcolvin
Thank you for looking into this - yeah I'm not saying that we need to keep GetterDict, what I mean is we need some alternative callback function that is called by pydantic when it tries to access any attribute of the object it tries to validate
Please take a look into this screencast that will explain the usage:
https://vitaliy-public.s3.eu-central-1.amazonaws.com/share/202304/pydantic-ninja.mp4
so basically yeah - if you can hint or provide some hook that pydantic can optionally call when accessing non-dict object - that would solve it

Hi @dmontagu
Thank you
well yeah - for now GetterDict can be replaced with root_validator(pre)
there are few other issues - but I will open them as separate threads

authors: dmontagu vitalik


text:
fix version-switcher with dirhtml builder

Problem: version-switcher suffixes .html even if sphinx was used with the dirhtml builder.
Solution: suffix / instead where necessary.

I was having the same issue and this PR does fix it for me. Thanks @casperdcl!

Ok, let's try that. It seem simple enough that I believe it is safe to merge.

authors: Carreau azeey casperdcl

repo: pydata/pydata-sphinx-theme


text:
xr.merge bug? when using combine_attrs='drop_conflicts'

What happened:
I have recently encountered a situation where combining two datasets failed, due to the datatype of their attributes.
This example illustrates the situation:
ds1 = xr.Dataset(attrs={'a':[5]})
ds2 = xr.Dataset(attrs={'a':6})

xr.merge([ds1, ds2], combine_attrs='drop_conflicts')

give me this error:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-1c8e82be0882> in <module>
      2 ds2 = xr.Dataset(attrs={'a':6})
      3
----> 4 xr.merge([ds1, ds2], combine_attrs='drop_conflicts')

/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/core/merge.py in merge(objects, compat, join, fill_value, combine_attrs)
    898         dict_like_objects.append(obj)
    899
--> 900     merge_result = merge_core(
    901         dict_like_objects,
    902         compat,

/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/core/merge.py in merge_core(objects, compat, join, combine_attrs, priority_arg, explicit_coords, indexes, fill_value)
    654         )
    655
--> 656     attrs = merge_attrs(
    657         [var.attrs for var in coerced if isinstance(var, (Dataset, DataArray))],
    658         combine_attrs,

/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/core/merge.py in merge_attrs(variable_attrs, combine_attrs, context)
    544                 }
    545             )
--> 546             result = {
    547                 key: value
    548                 for key, value in result.items()

/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/core/merge.py in <dictcomp>(.0)
    547                 key: value
    548                 for key, value in result.items()
--> 549                 if key not in attrs or equivalent(attrs[key], value)
    550             }
    551             dropped_keys |= {key for key in attrs if key not in result}

/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/core/utils.py in equivalent(first, second)
    171         return duck_array_ops.array_equiv(first, second)
    172     elif isinstance(first, list) or isinstance(second, list):
--> 173         return list_equiv(first, second)
    174     else:
    175         return (

/srv/conda/envs/notebook/lib/python3.8/site-packages/xarray/core/utils.py in list_equiv(first, second)
    182 def list_equiv(first, second):
    183     equiv = True
--> 184     if len(first) != len(second):
    185         return False
    186     else:

TypeError: object of type 'int' has no len()

Took me a while to find out what the root cause of this was with a fully populated dataset, since the error is less than obvious.
What you expected to happen:
In my understanding this should just drop the attribute a.
The example works like expected when both attributes are an integer or both are lists with an integer.
The error is only triggered when the type is mixed.
Is there a way to handle this case more elegantly?
Output of xr.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:22:27)
[GCC 9.3.0]
python-bits: 64
OS: Linux
OS-release: 5.4.89+
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: C.UTF-8
LANG: C.UTF-8
LOCALE: ('en_US', 'UTF-8')
libhdf5: 1.10.6
libnetcdf: 4.7.4
xarray: 0.19.1.dev8+gda99a566
pandas: 1.2.4
numpy: 1.20.2
scipy: 1.6.2
netCDF4: 1.5.6
pydap: installed
h5netcdf: 0.11.0
h5py: 3.2.1
Nio: None
zarr: 2.7.1
cftime: 1.4.1
nc_time_axis: 1.2.0
PseudoNetCDF: None
rasterio: 1.2.2
cfgrib: 0.9.9.0
iris: None
bottleneck: 1.3.2
dask: 2021.04.1
distributed: 2021.04.1
matplotlib: 3.4.1
cartopy: 0.19.0
seaborn: None
numbagg: None
pint: 0.17
setuptools: 49.6.0.post20210108
pip: 20.3.4
conda: None
pytest: None
IPython: 7.22.0
sphinx: None

Ideally,  this:
ds1 = xr.Dataset(attrs={'a':[5]})
ds2 = xr.Dataset(attrs={'a':5})

xr.merge([ds1, ds2], combine_attrs='drop_conflicts')

would actually not be dropped but resolved to either 5 or [5]?

this clearly is a bug in the comparison functions (equivalent or list_equiv). I'm not sure where, though. equivalent calls list_equiv if one of the two arguments is a list (which seems intentional but might be wrong), and list_equiv seems to assume that both arguments are sized.

would actually not be dropped but resolved to either 5 or [5]?

That might be a bit too special to be included directly in xarray. Note, however, that instead of a name you can also pass a function to combine_attrs so you should be able to customize this.

That might be a bit too special to be included directly in xarray. Note, however, that instead of a name you can also pass a function to combine_attrs so you should be able to customize this.

👀

authors: jbusecke keewis

repo: pydata/xarray


text:
almost-equal grids

Sometimes it happens that you have two grids that are equal up to precision or "for practical purposes". xarray does not align them. Is there a possibility to still get them aligned (and not having to copy the coordinates from one to the other)?
Examples:

CESM output from the land model and the atmosphere model.
I have a file with a region definition on a fine grid. If I regrid that to the model resolution with cdo the grids are equal up to ~1*10**-4.

Hi @mathause, I actually just ran into a very similar problem to your second bullet point. I had some limited success by manually re-building the re-gridded dataset onto the CESM coordinate system, swapping out the not-exactly-but-actually-close-enough coordinates for the CESM reference data's coordinates. In my case, I was re-gridding with CDO, but even when I explicitly pull out the CESM grid definition it wouldn't match precisely.
Since there was a lot of boilerplate code to do this in xarray (although I had a lot of success defining a callback to pass in with open_dataset), it was far easier just to use NCO to copy the correct coordinate variables into the re-gridded data.

This doesn't work automatically, but you can use the method='nearest' and the tolerance argument with .reindex or .reindex_like to align two datasets with different grids, i.e.,
second = first.reindex_like(second, method='nearest', tolerance=0.001)

It would be nice for this to be able to work automatically, but the challenge is picking a heuristic that does not violate the principle of least surprise. A proposed a few ideas in a related issue in pandas (https://github.com/pydata/pandas/issues/9817#issuecomment-115465360).

second = first.reindex_like(second, method='nearest', tolerance=0.001)

I really like this.  Explicit and self-documenting code. I would avoid making this automatic.

That sounds good. Do you need both, methodand tolerance?
What I do at the moment is probably not as elegant:
    ds.coords['lat'] = np.round(ds['lat'], 4)
    ds.coords['lon'] = np.round(ds['lon'], 4)

The reindex_like() approach works super well in my case. Since only my latitudes are screwed up (and they're spaced by a tad more than a degree), a low tolerance 1e-2-1e-3 worked perfectly.

@mathause - any reason to keep this open or did we sort this out?

authors: darothen jhamman mathause ocefpaf shoyer


text:
Update installing.rst to clarify and fix formatting

Very minor fix to poor formatting and clarification on new conda-forge blurb on the "Installation" docs page. This came about from 633aa112ae03214b76a913edbf3b1f43d0e9281b which addressed #944.

thanks.

authors: brews jhamman


text:
Added get_options method

[ X] Closes #5698
[ X] Passes pre-commit run --all-files
[ X] User visible changes (including notable bug fixes) are documented in whats-new.rst
[ X] New functions/methods are listed in api.rst

Added a get_options method under core/options.py. At the moment it returns the OPTIONS dictionary as is to keep it very simple, if a formatted print statement with text is desirable I can try to add it.
Edit: Some tests are failing, but they are unrelated to my changes. Not sure how to address the errors.

The returned dict should be read only, otherwise you can bypass all the validation checks that's done in set_options. I think you can use FrozenDict for that:
https://github.com/pydata/xarray/blob/56cc0778d5edcb0173425b5850b834457c790210/xarray/core/utils.py#L476
Not sure if FrozenDict propagates the typing though, once OPTIONS is typed.
We probably need to make sure that get_options is updated if set_options has been used. A test for that would be nice.

This looks good., thanks @pkopparla  Thanks for reviewing @Illviljan .
Agree re a test — at least to just test it runs, albeit trivial.
FrozenDict would be better, though I think fine to do in another PR. We could return dict(OPTIONS) if we're worried people will attempt to set invalid values.

Thank you @Illviljan @max-sixty
I've changed the return type to FrozenDict and added a check to make sure that set_options changes are reflected in get_options.

Awesome, thanks @dcherian and all the reviewers!

authors: Illviljan max-sixty pkopparla


text:
Wrong documentation parameter for pyenv-venv install help page

https://github.com/pyenv-win/pyenv-win-venv/blob/1a19780676fdfa5b20a04fa05d64702f374a0da8/bin/pyenv-win-venv.ps1#L359-L368
I think this has currently the same parameter doc than pyenv-venv list

Thanks for reporting this.  I have pushed the fix.

authors: arzkar cderv

repo: pyenv-win/pyenv-win-venv


text:
pyfyre create-app . (will purge all files inside the path)

Describe the bug
When creating the app in current working directory "./" it removes all files inside it.
To Reproduce
Steps to reproduce the behavior:

python3 -m venv example-app
cd example-app
source /bin/activate
pip install --upgrade pip setuptools pyfyre
pyfyre create .

Expected behavior
Keep files inside the path
Error message
FileExistError

That is the expected behavior when you create a project in an existing directory. If create-app is run on an existing directory, pyfyre will give you a prompt to overwrite the directory. However, due to a bug, when you create a project in your current directory (., ./), pyfyre causes unexpected behaviors including the FileExistError that you encountered. This however is already fixed on the main branch.
I am currently rewriting the entirety of the project. Expect breaking changes.
The main branch will soon be the default branch for this repository once the rewrite is done.

Just an update about this issue. The PyFyre rewrite has now been released on PyPI. The documentation is not yet updated, we will work on that soon.

authors: NadieFiind mpotane

repo: pyfyre/pyfyre


text:
Validate against paper results

Still not 100% sure if same results like in paper are produced; validate again

Plots in paper might not be correct.
Check of results via numerical evaluation of interaction-integral necessary to
ensure correctness of the results.

implement numerical test routines in test_examples.py

added new test with numerical routine in test_examples_int.py
test_examples.py is now obsolete
(I didn't delete it since I didn't create it... if it's no longer needed it can be removed)

solved


text:
DeprecationWarning for getargspec when invoking KalmanFilter.em()

When invoking KalmanFilter().em() on python-3.5 I'm receiving this deprecation warning about the use of inspect.getargspec() that has to be replaced by inspect.signature().
python-3.5.1.amd64\lib\site-packages\pykalman\utils.py:111: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() instead
  args = inspect.getargspec(obj.__init__)[0]

Meanwhile we are at Python 3.11 now. There is no deprecation warning anymore but an error:
Traceback (most recent call last):
File "venv_311\Lib\site-packages\pykalman\utils.py", line 111, in get_params
  args = inspect.getargspec(obj.__init__)[0]  # inspect.getargspec(obj.__init__)[0]
         ^^^^^^^^^^^^^^^^^^
AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?

inspect.getargspec() has to be replaced by inspect.getfullargspec() (not with inspect.signature()).

authors: ankostis lucifermorn

repo: pykalman/pykalman


text:
Separate Component for data and log proxying?

@bklebel raised an interesting point against having the Coordinator unity control, data and logging channels in one Component type:

I don't think we would like to have multiple data-channel Coordinators (proxies) by design at all, e.g. with one per Node, because one big deal of having this one proxy in one central place would be for Observers to only listen at one point. Like this we do not need to start with issues like multi-hop-like distribution of the data, as we are discussing things for the control-Coordinators.

Of course, I hadn't thought of that, yet. I think I agree.
We could make it so our "Coordinator" is purely about the control channel, and have another (singleton) Component be about data proxying (and maybe logging at the same time, as it's similar).
Thoughts?
Originally posted by @bilderbuchi in https://github.com/pymeasure/leco-protocol/pull/24#discussion_r1093669975

I always thought them separate (with the possibility to bundle log and data proxy).

Ok. Name suggestions for the Component to be added?

Zmq uses "proxy", we could call it "Data proxy" or just Proxy.

Publisher proxy is too technical, I fear.

Well, the definition I had had in mind was, that a "Coordinator" is exactly how we have defined it on the lowest possible level:

A component primarily concerned with routing/coordinating the message flow between other Components.
Data proxies, logging proxies and control "thingies" were different subclasses of Coordinators for me, since all of them do nothing else but shuttle messages from one point to another (compared to processing them, driving Devices, directing Actors, observing data etc.). The different "channels"/"types"/"subclasses" run over different kinds of zmq socket types, since they inherently have slightly different requirements (data does not need answers etc.), so we need different types of Coordinator instances for the different channels.

Our use of the term "Coordinator" in #27, #33, #34, #22, #4 and others mostly concerned the "control-channel Coordinators", which make a distributed request-reply pattern possible. I am open to rename the other channels, because then the discussions would be easier to understand, however, I think we should rather look towards the future and not the past, and name it in the most logical fashion, where for me we would have the highest level of abstraction in a "Coordinator" which is defined as shuttling any kind of messages around, and the second level of abstraction would be the classes/channels of "control", "data" and "logging". Data and logging could essentially run over the same channel as from a network-topology view they are the same type, but separating makes things easier for all parties involved, I think. It is always possible to bundle them into one process anyway.

So, we have "Data Coordinators" and "Control Coordinators" (from the respective protocol, Logs run through a Data Coordinator as well)?

I have edited my comment for proper citing and not-citing.

So, we have "Data Coordinators" and "Control Coordinators"?
Yes, I would put it like that. However, for the sake of having a clearly identifiable name, I would put it "Data-Coordinator", just to make it clear.

Logs run through a Data Coordinator as well)?

Yes and no, I guess.....yes xD The Data Coordinator and the Log Coordinator do nothing different from each other, they are just separate ports for convenience of not having to prepend every data/log message with a separate type, so that e.g. something reading logs does not need to deserialize a lot of data (or look at the respective header frames we might use) just to find out it is data and not logs (and vice versa). Like this, I would hope to increase performance, and reduce implementation/development complexity significantly, while increasing the network topology complexity only slightly

Logs run through a Data Coordinator as well?

I meant, that it is from the implementation the same thing as a Data Coordinator.
From the usage, we have one instance for data and one for logs. So I think we meant the same.

yes, okay, I agree.

I have subdivided into the 3 variants now.

Closed by #24.

authors: bilderbuchi bklebel bmoneke

repo: pymeasure/leco-protocol


text:
Harmonize, the capitalization -- PyLECO, PyLeco, pyleco,...

          Add some point we should decide on, and harmonize, the capitalization -- PyLECO, PyLeco, pyleco,...

Originally posted by @bilderbuchi in https://github.com/pymeasure/pyleco/pull/7#discussion_r1271270446
as the original name is LECO, PyLECO is a strong candidate.
PyLeco is like a Python class in CamelCase.
For consistency in naming within the LECO universe, I'm for PyLECO.

To note, we don't gave to be 100% consistent -- the package name could easily be lower case pyleco, that seems common enough. But in text/docs, it would be good to choose one way and stick with it.

I'm for a lower case python package name (pyleco), but in the docs etc. I prefer the aforementioned spelling.
Am 23. Juli 2023 09:55:43 MESZ schrieb Christoph Buchner @.***>:

To note, we don't gave to be 100% consistent -- the package name could easily be lower case pyleco, that seems common enough. But in text/docs, it would be good to choose one way and stick with it.
--
Reply to this email directly or view it on GitHub:
https://github.com/pymeasure/pyleco/issues/8#issuecomment-1646773156
You are receiving this because you authored the thread.
Message ID: @.***>

Agreed on both points.

So:
Package name (for imports etc.): pyleco
Human name of the project (in docs etc.) : PyLECO

authors: bilderbuchi bmoneke

repo: pymeasure/pyleco


text:
Feature: Added A Pull Request Template

This pull request introduces the feature of Pull Request Templates
All Submissions:

[x] Have you followed the guidelines stated in CONTRIBUTING.md file ?
[x] Have you checked to ensure there aren't any other open Pull Requests for the desired changed ?

Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

New Feature Submission:

[x] Does your submission pass the tests?
[x] Have you lint your code locally prior to submission?

Changes To Core Features:

[ ] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your core changes, as applicable?
[ ] Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.
a. Your pull request MUST NOT target the `main` branch on this repository. You probably want to target `staging` instead.

b. Give a descriptive title to your PR.

c. Describe your changes.

d. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).

Reference Issue: #362

repo: pynecone-io/pynecone


text:
phusion: Failed to safefile.OpenRelative failed in Win32

Be sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues before posting! We may close your issue if it is very similar to one of them. Please be considerate, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
Issue description
Describe the issue briefly here.
Expected result
Describe what you expected.
Actual result
When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.
If you're on macOS, run the following:
$ pipenv --support | pbcopy

If you're on Windows, run the following:
> pipenv --support | clip

If you're on Linux, run the following:
$ pipenv --support | xclip

Please provide the details following the issue template, so we know what we can help.

authors: eltonG frostming

repo: pypa/pipenv