Possible #612 fix

Issue #612 is about scrolling not working on secondary monitors when running under Wayland.
@tuomovee says that removing the check for the mousewheel event in dispatchEvent_Window() appears to resolve the issue, but is unaware of any potential consequences.
This does fix the issue on Wayland, with seemingly no consequences, split views appear to behave fine.
I haven't tested this on X11, but I can.

My concern with removing that condition is about performance: wheel events occur frequently, at least once per frame, so it is disadvantegeous to offer them to widgets that we already know shouldn't handle them. My educated guess is that the actual problem is that the wheel event does not know the current cursor position, or the coordinates are unexpectedly affected by the secondary monitor.
I have no way to test a dual monitor Wayland setup myself, but if anyone can print out those wheel event coordinates and see if they make sense, it could enlighten us here.

Super hacky:
if (ev->type == SDL_MOUSEWHEEL)
{
    printf("Scroll on %ld %lu\n", i, (unsigned long)time(NULL));
}

Shows that when scrolling in a view, there appears to only be one event,  but the first scroll in a different view has two events which is fun and weird.

My educated guess is that the actual problem is that the wheel event does not know the current cursor position

You're probably right that the fix shouldn't be in the dispatchEvent_Window function, but should instead be in contains_Rect.
I'll have a look and get back!

I'm not going to open a new PR just yet, but it looks like for a real fix swapping:
// original
if (ev->type == SDL_MOUSEWHEEL && !contains_Rect(rect_Root(root),
                                                 coord_MouseWheelEvent(&ev->wheel)))

for
// updated
if (ev->type == SDL_MOUSEWHEEL && !contains_Rect(rect_Root(root),
                                                 coord_Window(d, ev->wheel.mouseX, ev->wheel.mouseY)))

works
From printing the various variables in coord_MouseWheelEvent I also found that winPos.x & winPos.y both appear to be static?  They're 0, 0 on my screen 1 and 1920, 0 on my screen 2
Just for fun, I tried messing with mousePos.x in coord_MouseWheelEvent and adding:
[...]
SDL_GetGlobalMouseState(&mousePos.x, &mousePos.y);

mousePos.x += 1920;

SDL_GetWindowPosition(win->win, &winPos.x, &winPos.y);
[...]

and screen 2 starts working under the original/current dispatchEvent_Window function, with screen 1 no longer working

I'm not going to open a new PR just yet, but it looks like for a real fix swapping:
// original
if (ev->type == SDL_MOUSEWHEEL && !contains_Rect(rect_Root(root),
                                                 coord_MouseWheelEvent(&ev->wheel)))

for
// updated
if (ev->type == SDL_MOUSEWHEEL && !contains_Rect(rect_Root(root),
                                                 coord_Window(d, ev->wheel.mouseX, ev->wheel.mouseY)))

I tried this last patch and it works. Thank you.

If using ev->wheel.mouseX/Y solves the issue, that would be an ideal fix. These were added in SDL 2.26, which I suppose is good enough here. I'll incorporate this into v1.18 and you can test with the dev branch.

@skyjake  I believe the commit message for 83d29c1 is incorrect. I only confirmed that it works on Linux; the solution was written by @probablySophie, who has nothing to do with me.

@shurizzle Ah, right you are, sorry for the confusion.


Refactor exit code

Always return 1 on error and 0 on success. Avoid calling os.exit whenever possible, throwing an error to exit with error, and allowing Lua to exit naturally.

Looks solid. Thanks!

Ok, so now under Lua 5.3 whenever I want to print help or there is an error I also get this printed after normal output:
(error object is a nil value)
stack traceback:
	[C]: in function 'error'
	stdin:1: in main chunk
	[C]: in ?

error() is not always silent.


[Bug] Unable to connect to API when restarting the server while players are connected

Describe the bug
When restarting a game server with a connected API while there are players on the server, the new game server instance will spam
API: Unable to connect to API server: Object reference not set to an instance of an object.

until the API is restarted.
To Reproduce
Steps to reproduce the behavior:

Start server and API, order does not matter
Connect a client to the server
Restart the server by quickly closing and reopening
If the server starts before the client is being disconnected, the error will occur

Expected behavior
The server should successfully reconnect and the client should probably not stay connected if the server is restarted.
Screenshots
https://www.youtube.com/watch?v=8lVF8pOIKrU
Additional context
Tested with simple community server API implementation, not using the modules runner.
It seems that the player, who was connected to the previous server, is still connected in the new server and will mess up the communication between the server and the API. The exception occurs at Player.cs in the getter of Squad because GameServer is null for this player.

It seems that, when an instance of GameServer disconnects in Socket, You must release its MyPlayer and/or MyGameserver usage, or it will mess the memory address.

Fixed on new update.


Autowasp bug in Burp Pro - v2021.4 (Early)

I have managed to identify a bug in the Autowasp menu. As you can see in the image, the buttons and information displayed by the plugin are not clearly visible.

This also happens in 2021.3.1 if the width of Burp Suite is not set appropriately. The UI in the first row will wrap.

Hi @rewardone and @vay3t,
We have done a minor UI updates in wrapping the first row. Pleas find our release over here - https://github.com/GovTech-CSG/Autowasp/releases/tag/v1.0.1
Thank you for feedback and support in using Autowasp 👍
@imthomas93

Fixed!


Provider test could be improved slightly

Hello
Firstly thanks for a great resource, it has been very helpful. I have a suggestion.
When you run the provider tests, you suggest running the api using dotnet run and then in another command window, running the tests using dotnet test.
My suggestion is that the provider test could instead start the API under test using Webhost.CreateDefaultBuilder()
Then you wouldn't need to dotnet run, you could test it all using dotnet test. Example:
public ProviderApiTests(ITestOutputHelper output)
{
    _outputHelper = output;

    _pactServiceUri = "http://localhost:9001";
    _providerStateHost = WebHost.CreateDefaultBuilder()
        .UseUrls(_pactServiceUri)
        .UseStartup<TestStartup>()
        .Build();

    _providerStateHost.Start();

    _providerUri = "http://localhost:9000";
    _sut = WebHost.CreateDefaultBuilder()
        .UseUrls(_providerUri)
        .UseStartup<Startup>()
        .Build();

    _sut.Start();
}

I actually just wasted half a day trying to get it to run using the new ASP.NET Core 2.1 WebApplicationFactory, ala https://docs.microsoft.com/en-us/aspnet/core/test/integration-tests?view=aspnetcore-2.1
The problem with using WebApplicationFactory is that when you create a client via var client = _factory.CreateClient(), it seems that only that client can access the TestServer - it's not accessible to other clients such as your local browser, or the PactVerifier. Therefore I had to use WebHost.CreateDefaultBuilder() as you have done.

Hey, Matt thanks for raising this. Sorry about the delay getting back to you.
So I have been thinking about your suggestion. On the one hand, it makes running the tests more fluid as you say by reducing commands needed to run tests. But on the other, if this was a production test pack with lots of services would you want the tests to start services under test? I know some organisations do this and others that don't. I guess it depends on the organisation itself.
Also, I am worried about too much magic happening when people are learning something new. I don't know about you but when I am learning a new piece of tech I prefer to do most steps manually even if in a production environment I would automate them. It helps me understand the process of the technology I am learning about.
So on balance, I would prefer to keep the commands separated. Partly because I am unsure if in a production environment you would combine them but mostly not to confuse less experienced engineers who are learning about this tech.
Hopefully, that makes sense but thanks for taking the time to create a detailed issue I do appreciate it. Always good to get some feedback to think about!

Yeah, there are quite a lot of moving parts to get all this working. My line of thinking was you're already starting the provider state webhost in the test constructor, so you might as well start the system under test too.
I think the most confusing bit is the provider state webhost and what it is for.
Thanks again for a good resource.

No problem glad you found it useful! I will take a look at the provider state webhost bit and see if there is something I can do to make it clearer.

All other examples I find around this topic do start the server in the test itself (https://github.com/pact-foundation/pact-net). From an automation standpoint, delegating the startup to something else (a script or even having it in a container) seems to be a lot of heavy lifting for a test right?

Yeah it is and it could be improved. I’m a bit busy right now but I would like to iterate on this workshop a bit - it was written a year ago in a bit of a rush!  PRs are gratefully received however ;)

Ok! Wasn't sure you wanted people helping. I'm using the workshop to learn
and write my own tests. I'll create a PR to try and update it!
On Sat, 1 Jun 2019, 11:32 Thomas Shipley<EMAIL_ADDRESS>wrote:

Yeah it is and it could be improved. I’m a bit busy right now but I would
like to iterate on this workshop a bit - it was written a year ago in a bit
of a rush! PRs are gratefully received however ;)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tdshipley/pact-workshop-dotnet-core-v1/issues/7?email_source=notifications&email_token=AADNNR4WXX7Y5GAX6NE2KXDPYJF45A5CNFSM4FQXVSU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWW5WAA#issuecomment-497933056,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADNNRYAOR6OVNXQ3EMLNPLPYJF45ANCNFSM4FQXVSUQ
.

Awesome well I hope it’s helpful and absolutely any contributions would be great!


question: plan for pendulum_dt given lack of 3.13 support

I would have opened a discussion, but I appear unable
Is there any plan for what to do about pendulum's lack of 3.13 support? and general uncertainty around maintenance
It's unclear from their issues whether support will be added, but of course we would (at Prefect) like to support 3.13 as soon as we can.
Just opening this to start a conversation - cheers!

it appears with lack of published wheels, we'd be forced to install rust ... which doesn't seem ideal

in case its helpful to anyone, this works for me (with aforementioned disclaimer)
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim

ENV UV_SYSTEM_PYTHON=1
ENV RUSTUP_HOME=/usr/local/rustup \
    CARGO_HOME=/usr/local/cargo \
    PATH=/usr/local/cargo/bin:$PATH

# Install Rust toolchain with specific version known to work
RUN apt-get update && apt-get install -y \
    curl \
    gcc \
    build-essential \
    && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.75.0 -y \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

RUN uv pip install prefect

CMD ["uv", "run", "prefect", "server", "start"]

@yezz123 any thoughts?

@yezz123 any thoughts?

Hello @zzstoatzz  👋🏻 , This issue isn't directly related to pydantic-extra-types, but it impacts our ecosystem. Here are some potential approaches we could consider:
Community Fork Strategy

A temporary community-maintained pendulum fork with Python 3.13 support could bridge the gap.

Alternative Options

For teams that need immediate Python 3.13 compatibility, we could document alternative datetime libraries that already support 3.13.
Libraries like arrow or datetime could serve as temporary replacements

Next Steps

We can track the upstream pendulum issue for official 3.13 support.
If any community members are interested in maintaining a temporary fork

Would the community be interested in collaborating on a temporary fork solution? This could help bridge the gap while we await official Python 3.13 support from Pendulum.

Thanks for the response @yezz123!

This issue isn't directly related to pydantic-extra-types

So, to clarify: the pendulum_dt module in pydantic-extra-types currently appears to be unusable on Python 3.13 without first installing rust:
» uv run --python 3.13 --with pydantic-extra-types --with pendulum python -c "from pydantic_extra_types.pendulum_dt import DateTime"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/nate/Library/Caches/uv/archive-v0/6asPR-YLBwuoyda2jagNN/lib/python3.13/site-packages/pydantic_extra_types/pendulum_dt.py", line 18, in <module>
    from pydantic import GetCoreSchemaHandler
  File "/Users/nate/Library/Caches/uv/archive-v0/6asPR-YLBwuoyda2jagNN/lib/python3.13/site-packages/pydantic/__init__.py", line 418, in __getattr__
    module = import_module(module_name, package=package)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nate/Library/Caches/uv/archive-v0/6asPR-YLBwuoyda2jagNN/lib/python3.13/site-packages/pydantic/annotated_handlers.py", line 7, in <module>
    from pydantic_core import core_schema
  File "/Users/nate/Library/Caches/uv/archive-v0/6asPR-YLBwuoyda2jagNN/lib/python3.13/site-packages/pydantic_core/__init__.py", line 6, in <module>
    from ._pydantic_core import (
ImportError: dlopen(/Users/nate/Library/Caches/uv/archive-v0/6asPR-YLBwuoyda2jagNN/lib/python3.13/site-packages/pydantic_core/_pydantic_core.cpython-313-darwin.so, 0x0002): symbol not found in flat namespace '_PyList_GetItemRef'

We can track the upstream pendulum issue for official 3.13 support.

While tracking the upstream issue would normally make a lot of sense to me, the concern that lead me to create this issue was the uncertainty around pendulum's ongoing maintenance.

If any community members are interested in maintaining a temporary fork

I'm curious about pydantic-extra-types' plans for datetime support that would be compatible with Python 3.13 if pendulum remains unmaintained and a community fork doesn't materialize. Any thoughts?

Sorry for not getting back to you sooner @zzstoatzz .
For datetime support in Python 3.13, I'm exploring these options:

Create a pure Python implementation that doesn't rely on pendulum, using stdlib's datetime
Make pendulum an optional dependency and provide a fallback behavior ( Something like an exception for py3.13)

In the short term, I'd recommend either:

Stay on Python 3.12 if someone needs pendulum features.
Use standard datetime objects if you're moving to 3.13

Would you be interested in contributing to any of these approaches? We could especially use help with option 1 or 2.
Let me know if you'd like to explore these options more.

thanks for the response @yezz123 - let me discuss the options with my team and get back to you here!


Atomicity when issuing redis commands in the callbacks of a multi queue?

Hello,
I think it would be appropriate to update the documentation explaining if the call to mget in the example of multi is also atomic or not:
// multi chain with an individual callback
client.multi()
    .scard("bigset")
    .smembers("bigset")
    .keys("*", function (err, replies) {
        client.mget(replies, redis.print);
    })
    .dbsize()
    .exec(function (err, replies) {
        console.log("MULTI got " + replies.length + " replies");
        replies.forEach(function (reply, index) {
            console.log("Reply " + index + ": " + reply.toString());
        });
    });

Because it may look as if the call client.mget(replies,redis.print) also is atomic, and that when the callback of the exec is called, even this command has been executed, but I suspect this is not the case :/

That is a fine observation, thanks.

One way to make the whole thing atomic is the wrap the commands in a Lua script, inside a js string, then call it with the EVAL command:
e.g.
var luaStr = "
  local allreplies = {}
  allreplies[1] = redis.call('scard', KEYS[1])
  allreplies[2] = redis.call('dbsize')
  allreplies[3] = redis.call('smembers', KEYS[1])
  local allkeys = redis.call('keys', '*')

  for i, v in ipairs(allkeys) do
    allreplies[3 + i] = redis.call('mget', k)
  end

  return allreplies
"

redisClient.eval(luaStr, 1, "bigset", function(err, replies) {
  var len = replies.length;
  console.log("MULTI got " + len + " replies");
  console.log("scard: " + replies[0].toString());
  console.log("dbsize: " + replies[1].toString());
  console.log("smembers" + replies[2].toString());
  for (var i = 3; i < len; i++) {
  	console.log("mget #" + i + ": " + replies[i].toString())
  }
})

didn't do any testing whatsoever on this so...uh...not 100%.
EVALSHA can cut down on some of the bandwidth, too, if you're reusing Lua scripts.


Documentation: Any Volunteers?!

for anyone that has gotten this working, could you be so kind to perhaps make a pull request on the README.md?
i get the creating a venv, then pip -r requirements.txt part, but after that? would cloning the hf files be enough or do I also need the original weights from genmoai?
kijai is most likely busy and I've seen others in the issues section that got it to work, if someone could post the instructions that would most likely help this open source repository by quite a lot, would avoid some of the pit falls others got into
I can also figure this out on my own and if so I'll do the pr myself, it would just save time and be a kind addition to the repo
if someone decides to document their journey to getting this to work, it would be nice to also include the operational system (windows/linux/mac/bsd/etc..)

I've shared a couple ComfyUI workflows, if it helps. Just drag and drop the JSON file on ComfyUI, and it'll load the workflow, then just install missing nodes in ComfyUI-Manager, and download the missing models:
txt2vid - https://gist.github.com/Jonseed/7ba98d34ef7684c25b73923f5578a844
img2vid - https://gist.github.com/Jonseed/d2630cc9598055bfff482ae99c2e3fb9
I agree more documentation is needed.


Symm cholesky

this pull request is being made in response to issue #853

thanks for the PR, and sorry for the late reply! This issue is actually quite complicated to implement, and requires intricate knowledge of the code and also some physics background, so it is not the best place to start with. I'm closing this for now,
but if you'd like to give it a try anyways then pls feel free to reopen.


Realm 5.0.0 Release Build Error - Swift Package Manager

Goals

Successfully build my iOS app with Realm 5.0.0 in Release mode.
Expected Results

Expected the app to build successfully in Release mode after updating to Realm 5.0.0.
Actual Results

When I build my app in Release mode, I receive a build error due to Realm. The error is as follows:
Aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on iOS 11 or newer

Steps to Reproduce

Install Realm 5.0.0 using Swift Package Manager
Edit scheme to run in Release mode
Build and run application

Version of Realm and Tooling

Realm framework version: 5.0.0
Xcode version: 11.4.1
iOS version: Project setting iOS 12+
Dependency manager + version: Swift Package Manager

Are you trying to build your app for armv7? That error should be specific to 32-bit iOS, which is mutually exclusive with a deployment target of iOS 12.
Perhaps SPM is just trying to build for all arches and not just the ones used by the app and we need to update the package to explicitly not support armv7.

Not intentionally. I did notice armv7 was in my project's "Valid Architectures". I removed armv7 and armv7s from valid architectures, as well as set "Build Active Architectures Only" to true for Release config. However, I am still seeing the same issue.


Refactor Kernel.system for popen3 and allow better debugging tool to the user

This PR include the following refactor:

Move from Kernel.stop to Open3.popen3
When logstash is running in debug mode the stdout and the stderr of
the plugin will be streamed to the log.
Added an option to run the command in quiet mode so the result of
the command is not directly print to stdout.
Added tests

Fixes: #4

LGTM


add add_original to private and signed jars

Hi.
While trying to make a pr for this issue https://github.com/SergioBenitez/Rocket/issues/368 I found out that it requires to add original cookie for a PrivateJar.
I realised that add_original method is missing for some reason. Do you find it suitable to be added to PrivateJar and SignedJar?

Awesome, thanks for the PR! The code looks generally good. The documentation for the new add_original methods is a bit lackluster, however. Can you add more information to these methods, perhaps using the wording from the existing add_original method? Also, can you add some tests for these new methods? Doctests in the docstring are fine.

Thanks so much! This was merged in a53d0069d43dffbd4862d885270a554702b676ae. :)
P.S: To use the latest version of cookie in Rocket, simply change the rev for cookie in Rocket's Cargo.toml to f4e6930.


[Q] What is the response format of Falcor endpoint?

Hello,
I want to implement the falcor backend on other languages (Golang / Python / PHP...)
Could you please get me to the documentation which describes the format of responses from a falcor backend?
Eg:
for the request:
http://myapi.com/model.json?paths=[["productById",15,"name"]]&method=get
(which is fired by HttpDataSource: model.getValue(["productById", 15, "name"]))
my server response
{
  "jsonGraph": {
    "$type": "atom",
    "value": "nexus"
  }
}

But falcor didn't like this response, so what should I return?
Thank you

Response form of must be the same shape as the data:
{
jsonGraph: {
productById: {
15: {
name: "nexus"
}
}
},
paths: [
["productById", 15, "name"]
]
}
Please see the documentation for more examples. There is a sample Router at github.com/netflix/falcor-router-demo

it works, thanks!
it is quite a challenge to build / manipulate Falcor graph in other technologies. (we likely have to build the FalcorExpress ourself)
Anyway, Falcor is fantastic.
Thank you very much