Widgets display changes when moving app to another screen

Software Versions

Python: 3.6
OS: MacOS 10.15.3
Kivy: v1.11.1
Kivy installation method: pip

Describe the bug
When dragging an app from an external display (1920 x 1200) to the internal display of my Macbook (2560x1600), widgets in the app shrink their display size relative to the app window. However their clickable location appears to be where one would expect.
Expected behavior
That the widgets scale appropriately to the app window.
To Reproduce
Using the example app defined here:
https://kivy.org/doc/stable/guide/lang.html#designing-with-the-kivy-language
start the app on one display and drag it to another of a different resolution.
Code and Logs and screenshots
On initial display:

After dragging to second display:

Additional context
No additional context

Is your app starting as maximized? Can you create a on_size handler in your App and add a print or logger call inside it?
Did you try to unmaximize-remaximize the window after dragging it to the second display?

Thanks for the feedback. I'll have a look at on_size, if its being fired
The app isn't starting maximised, and I didn't unmaximise-remaximise.

Please give the unmax/remax idea an attempt. Other than that, keep us in touch about the on_size event. Thanks!
EDIT: I just realized something... If it's not the size, it could have to do with the dpi of your screens. Your internal display is probably a retina, and if you start the app on the other display, it is "configured" with whatever the pixel density of that screen would be (default 72dpi IIRC?). So when you change screens, the app looks super small.

Good or bad news - this seems to be a duplicate of https://github.com/kivy/kivy/issues/6708 .

If i can find a spare hdmi cable, I'll try to replicate this. It might be a few days as going out to fetch one isn't really an option at the moment. @Cheaterman you may be right that this is another result of the issue i reported.
I've seen some applications stutter when moving between low dpi external screens and the internal retina display. That implies there are some sort of methods for detecting scale changes that they use, but kivy may still using the same texture / surface without rescaling.

I might have part of a solution for this ticket, but I don't know how or where to implement it.
tl;dr
there is an event on OS X that tells an application that it may need to redraw the window because display density or color space changed. Adding a handler for this may allow the display to be redrawn when moving between different dpi contexts.
This ticket may depend on #6708 rather than being a duplicate. #6708 requires fixing a response to an already existing event, but this ticket may require adding a new event listener in c / objective c.
details
I looked for other projects that encountered similar issues. Godot seems to have not only a similar issue ( godotengine/godot#5688 ), but a nearly identical display scaling glitch (Screenshot source) that seems to result from opengl screen space starting at the bottom left:

On that same issue, @bruvzg mentions an objective C event that notifies an application that window resolution changed :

windowDidChangeBackingProperties may help

That event seems to be the perfect for refreshing the display when a window is moved between screens of different resolutions:

The notification NSWindowDidChangeBackingPropertiesNotification is posted in macOS 10.7.3 or later when a window’s backing scale factor or its color space changes.

I tried searching for for nswindowdelegate in the kivy and plyer repos, but saw zero results so it may need to be added somewhere in the C / objective C layers. I'm not sure which repo is the right place for this is, and would welcome advice.

Thanks a lot for your research! I'm sure it will help tremendously! The thing is, I suppose we're using SDL2 window provider on OSX just like the rest, so the real thing to do here is find out if, where and how they expose this event or information. :-)

I'm talking to some people about that right now and one of them might be able to give me some guidance on that tomorrow.  From what they said so far, it sounds like you're on the right track  with the idea that SDL2 should handle that OS X context switch event somehow.

Additional notes on what to read if you're not familiar:
I've also been told to try looking at:

kivy/core/window/window_sdl2.py
kivy/core/window/_window_sdl2.pyx

I think these tickets may also be related:

#3311
#6144
#6446

The comment threads on the first two are informative and may be good placers to start understanding the internal structure a bit better.

Those tickets do look to be the same and related symptoms. Given that the first one is from 5 years ago I'm going to guess that I shouldn't hold my breath on a fix here.

I finally managed to borrow an HDMI cable. I can't get the script to launch the window on my external monitor, but i can confirm that moving a window from the internal monitor to the external one causes font size to suddenly increase relative to the screen area. I would appreciate it if someone can help me force the window to launch on a specific display.

Python : 3.7.7
Kivy : 1.11.1
OS : OS X 10.12.6
Kivy Installation method : pip

The event I mentioned earlier, windowDidChangeBackingProperties, turns out to exist in pyobjus already. However, kivy also may need to get updated to have a more consistent idea of dpi. I think there was a pull request that partially fixed both of these (https://github.com/kivy/kivy/pull/6289), but it fell behind and was forgotten.

New Kivy user here. I encountered the same issue and stumbled upon this ticket. In my case, the app font size will increase relative to the screen size when I move the window from my internal retina display to an external one.
I end up trying to use on_resize to let kivy detect which monitor the screen is in and rescale the text according to that. Would be nice to know if there is a better fix. Here are some screenshots of the issue and my code snippet.  The last button is the one that resizes accordingly with monitor change, it also resizes itself when you resize the screen.
Screen in internal display:

Screen in external display:

kivy_display_text_test.py:
from kivy.app import App

from kivy.uix.boxlayout import BoxLayout
from kivy.uix.label import Label
from kivy.uix.button import Button
from kivy.properties import NumericProperty
from kivy.metrics import dp, sp
from kivy.core.window import Window

wininit = (450,650)
Window.size = wininit

class LoginScreen(BoxLayout):

	test_font_size = NumericProperty(40)
	base_font_size = NumericProperty(40)

	def __init__(self, *args):
		super(LoginScreen, self).__init__()
		self.window_size_safe = [0, 0]
		self.window_pixel_dim_safe = [0, 0]
		self.display_num = 0
		self.window_width_min = wininit[0]
		self.window_height_min = wininit[1]
		Window.bind(on_resize = self.resolution_check_update)

	def resolution_check_update(self, instance, x, y):
		#Properties that I found:
		#0. I notice that in retina display the actual height and width in pixel is actually a multiple of the window.size (?)
		#1. Moving the window to an external display doesn't change get_system_size().
		#2. Rescaling the window changes system.size instantly.
		#3. on_resize gets triggered on both resizing the screen and switching displays.
		#4. During initization, self.height and self.width gives 1600, 1200, but x, y give correct sizes (Don't understand why).
		#5. The self.height and self.width values lag. It only gets set AFTER we finish resizing the window and confirm the size.
		#6. Looking through the code I discovered that there is this x,y that return from on_resize, which seems to be the instanteous size that get updated faster than height,width
		# get_system_size = Window._get_system_size()
		# selfheightwidth = [int(self.width), int(self.height)]
		# print(f'Get_System_size: {get_system_size},  SelfHW: {selfheightwidth},  System_size: {Window.system_size}, X:{x}, Y:{y}')

		# Initialize the values when it first launches
		if self.window_size_safe == [0, 0]:
			self.window_size_safe = Window._get_system_size()
			self.window_pixel_dim_safe = [x, y]
			print(f'Saved the initiated size_safe: {self.window_size_safe}')
			return

		# Check whether the resize is caused by switching monitors or
		if Window._get_system_size() == self.window_size_safe:
			print(f'Window moved to another display: {Window.size}')
			window_current_pixel_dim = [x, y]

			# Check if the window pixel dimensions suddenly changes (in my retina display it is 2x less when move to external)
			if self.window_pixel_dim_safe == multiply_list(window_current_pixel_dim, 2):
				print('Resizing font for External Display')
				self.display_num = 1

			# Check if the window pixel dimensions suddenly changes (in my retina display it is 2x more when move to retina)
			elif self.window_pixel_dim_safe == multiply_list(window_current_pixel_dim, 0.5):
				print('Resizing font for Retina Display')
				self.display_num = 0

			# Update the font_size, x,y change should be identical
			scale_fac = window_current_pixel_dim[0]/self.window_pixel_dim_safe[0]
			self.test_font_size = self.test_font_size * scale_fac

			# Save it to base_font for font resizing when window size changes
			self.base_font_size = self.test_font_size

			# Saved the current window pixel dimensions
			self.window_pixel_dim_safe = window_current_pixel_dim

		else:
			window_current_pixel_dim = [x, y]
			print(f'Window being resized: {Window.size}')
			# Update the font size (Enlarge font size after window resize)
			# Idea from here: https://www.reddit.com/r/kivy/comments/86okok/update_font_sizes_in_a_layoutwidget_after_window/
			if self.display_num == 0:
				scale_fac_display = 2
			elif self.display_num == 1:
				scale_fac_display = 1
			scale_fac = min(window_current_pixel_dim[0]/(scale_fac_display * self.window_width_min), window_current_pixel_dim[1]/(scale_fac_display * self.window_height_min))
			self.test_font_size = self.base_font_size * scale_fac
			print(f'Scale fac {scale_fac}')
			self.window_pixel_dim_safe = window_current_pixel_dim
			self.window_size_safe = Window._get_system_size()

def multiply_list(in_list, value):
	return [element * value for element in in_list]

class DisplayTextTestApp(App):
	Window.minimum_width = wininit[0]
	Window.minimum_height = wininit[1]
	def build(self):
		return LoginScreen()

if __name__ == "__main__":
	DisplayTextTestApp().run()

displaytexttest.kv
#:kivy 2.0.0

<LoginScreen>
	canvas.before:
		Color:
			rgba: [1., 1., 1., 1]
		Rectangle:
			pos: self.pos
			size: self.size

	orientation: "vertical"
	spacing: 10
	padding: [self.width * 0.05, self.height * 0.05]      # Need to be a percentage of height/width

	Label:
		text: 'TESTING LABEL TEXT'
		size_hint: (1, 0.3)
		font_size: 35
		color: [0, 0, 0, 1]

	Button:
		text: 'This is 30pt'
		size_hint: 0.5, 0.05
		font_size: 30
		pos_hint: {'center_x': 0.5}
		background_normal: ''
		background_color: [0.906, 0.906, 0.906, 1]
		color: [0, 0, 0, 1]

	Button:
		text: 'This is 30dp'
		size_hint: 0.5, 0.05
		font_size: dp(30)
		pos_hint: {'center_x': 0.5}
		background_normal: ''
		background_color: [0.906, 0.906, 0.906, 1]
		color: [0, 0, 0, 1]

	Button:
		text: 'This is 30sp'
		size_hint: 0.5, 0.05
		font_size: sp(30)
		pos_hint: {'center_x': 0.5}
		background_normal: ''
		background_color: [0.906, 0.906, 0.906, 1]
		color: [0, 0, 0, 1]

	Button:
		text: 'This one resizes!'
		size_hint: (0.5, 0.05)
		font_size: root.test_font_size
		pos_hint: {'center_x': 0.5}
		background_normal: ''
		background_color: [0.906, 0.906, 0.906, 1]
		color: [0, 0, 0, 1]

This should be fixed in master with https://github.com/kivy/kivy/pull/7293. Please take a look.

Thanks, I just took a look at #7293. That's a lot of work.  If you don't mind I do have one question.
From what I understand #7293 implement an update on all the Metrics density related NumericProperty instances such as font_scale etc, so once Metrics.dpi / density changes all the relevant parameters "x dp" get recomputed automatically.  But if I understand correctly, Metrics.density is not going to update itself real-time when we switch display (issues in this ticket)?
Does that mean we still have to include the detection part where we find out which display the screen is on, and then change the Metrics density accordingly?
Using the snippet I post above as an example, should I update it to something like this, which should work, or is there a cleaner way?:
		# Check whether the resize is caused by switching monitors or resizing
		if Window._get_system_size() == self.window_size_safe:
			print(f'Window moved to another display: {Window.size}')
			# Check if the window pixel dimensions suddenly changes (in my retina display it is 2x less when move to external)
			if self.window_pixel_dim_safe == multiply_list(window_current_pixel_dim, 2):
				print('Resizing font for External Display')
				# Update the Metric.density or dpi (after #7293)
				Metrics.density = 1
				self.display_num = 1

			# Check if the window pixel dimensions suddenly changes (in my retina display it is 2x more when move to retina)
			elif self.window_pixel_dim_safe == multiply_list(window_current_pixel_dim, 0.5):
				print('Resizing font for Retina Display')
				# Update the Metric dpi (after #7293)
				Metrics.density = 2
				self.display_num = 0
		else:
                       print(f'Window being resized: {Window.size}')

The density does update dynamically with DPI as the screen is changed (on osx, on windows you need to make the ctypes call for it to happen) causing the layout to be retriggered and any other DPI/density sensitive properties to be re-computed.

Hi,
I'm still having this exact issue, but only on Mac (or a high density retina display, idk what the issue is).
The image is halved, however all of the buttons and what not are in the place they are supposed to, so you can control the app by guessing where the buttons are without seeing them.
Works on my Windows machine with a 3840x2160 display to a 1080p display (and vice versa) but not for the Mac/retina display to the 1080p monitor (and vice versa). Going from the Mac display to the 1080p enlarges the image+buttons, and the opposite halves the whole image (but buttons are in correct place).
The buttons might be working in the correct spot because I'm using KivyMD (just a thought)
Python 3.9
Kivy==2.3.0


chore: add ubuntu 24 image

since Nobel Numbat is available, we should add the image under test in the cypress repo since we test the last two major versions unofficially of ubuntu. See related https://github.com/cypress-io/cypress/pull/29412

@AtofStryker
It seems that python3.11 is not yet available from https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa for the Ubuntu 24.04 LTS release, although I did have it working on Ubuntu 24.04 beta.
Cypress needs this to fully build correctly.

@AtofStryker
It seems that python3.11 is not yet available from https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa for the Ubuntu 24.04 LTS release, although I did have it working on Ubuntu 24.04 beta. Cypress needs python3.11 to fully build correctly.

Sounds like we will need to wait for the distribution to be available before updating any of the machine executors in our pipeline that are using Ubuntu 20.

Also I found that the issue I mentioned in cypress-io/cypress#29319, that yarn start fails with FATAL:setuid_sandbox_host is still occurring on the Ubuntu 24.04 LTS release.

@MikeMcC399 does this happen in global mode only with Cypress? I'm not sure I have fully groked the issue yet.

@AtofStryker

Sounds like we will need to wait for the distribution to be available before updating any of the machine executors in our pipeline that are using Ubuntu 20.

I hope this might sort itself out in the next days. Anyway it will probably take quite a while before Ubuntu 24.04 actually becomes available through CI providers who will also need some ramp-up time.

does this happen in global mode only with Cypress? I'm not sure I have fully groked the issue yet.

It's not exactly global mode which is causing the issue.
npx cypress open --global # works with the npm module Cypress 13.8.1 not running in a clone of the cypress repo
the failure is with yarn start which is
yarn cypress open --dev --global # fails in a clone of the cypress repo after running yarn install on Ubuntu 24.04

See https://github.com/deadsnakes/issues/issues/282 for a request to provide earlier Python versions for Ubuntu 24.04.

@AtofStryker
I have Cypress running now using yarn start on Ubuntu 24.04.
Python issue
Use
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install g++ make python3.11
echo "export NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11" >> ~/.bashrc
. ~/.bashrc

Security issue

I used the persistent disable from Ubuntu 24.04 Release notes > Unprivileged user namespace restrictions
There is also a temporary one documented which should be good for CI workflows.  I didn't try this yet:echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

@AtofStryker

see also https://github.com/cypress-io/cypress-documentation/issues/5816 for

sudo apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb

According to the Ubuntu 24.04 release notes in the section Year 2038 support for the armhf architecture

More than a thousand packages have been updated to handle time using a 64-bit value rather than a 32-bit one, making it possible to handle times up to 292 billion years in the future.

@MikeMcC399 good to know. It sounds like we need to update the Cypress Contributing documentation to get Cypress running locally on Ubuntu 24.04 (captured in https://github.com/cypress-io/cypress/issues/29319) , as well as the Linux prerequisites in cypress-documentation (Which you have outlined in https://github.com/cypress-io/cypress-documentation/issues/5816 ). It sounds like the only unsolved issue currently is for contributors running yarn start where the SUID binary helper aborts due to misconfiguration referenced in https://github.com/cypress-io/cypress/issues/29319? Is there anything I am missing here?

Im going to update the image to include the python 3.11 install as well as updated libs to run cypress

@AtofStryker

Is there anything I am missing here?

It sounds like you missed the comment to use
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

so that the issue in https://github.com/cypress-io/cypress/issues/29422 is avoided.

@MikeMcC399 glad to see there is a workaround! Did you want to PR the updates into Cypress' contributing docs and Cypress documentation or would you like one of us to handle the updates?

@AtofStryker

glad to see there is a workaround!

👍🏻 🙂

Did you want to PR the updates into Cypress' contributing docs and Cypress documentation or would you like one of us to handle the updates?

I'm fine either way. If I'm going to submit any PRs about this I would probably wait a little for the dust to settle to see if there are any additional points to be covered. I haven't seen anybody else rushing to use Cypress with Ubuntu 24.04 so far, so I don't think that there will be many people going astray and if they look in the issues they will see the workarounds anyway.
So, please go ahead with PRs if you want, or let me know if you want me to submit PRs for review.

@AtofStryker

glad to see there is a workaround!

👍🏻 🙂

Did you want to PR the updates into Cypress' contributing docs and Cypress documentation or would you like one of us to handle the updates?

I'm fine either way. If I'm going to submit any PRs about this I would probably wait a little for the dust to settle to see if there are any additional points to be covered. I haven't seen anybody else rushing to use Cypress with Ubuntu 24.04 so far, so I don't think that there will be many people going astray and if they look in the issues they will see the workarounds anyway.

@MikeMcC399 I believe this is the correct approach. We can wait for the dust to settle and then update our documentation in cypress-documentation and our contributing docs.
I would say https://github.com/cypress-io/cypress-documentation/issues/5816 is a higher priority than the contributing documentation updates mentioned in https://github.com/cypress-io/cypress/issues/29319 since it is a direct blocker for those running Cypress.

So, please go ahead with PRs if you want, or let me know if you want me to submit PRs for review.

If you are willing to own this, then please proceed when you feel the dust has settled. However, I don't want to put more on your plate if you are unable to PR the updates. You already do quite a lot as an OSS contributor to our projects! So if it's an issue, just let us know!

@AtofStryker

I would say cypress-io/cypress-documentation#5816 is a higher priority than the contributing documentation updates mentioned in cypress-io/cypress#29319 since it is a direct blocker for those running Cypress.

Good point!

So, please go ahead with PRs if you want, or let me know if you want me to submit PRs for review.

I've submitted https://github.com/cypress-io/cypress-documentation/pull/5818 to resolve cypress-io/cypress-documentation#5816. This just adds the following for Ubuntu 24.04

apt-get install libgtk2.0-0t64 libgtk-3-0t64 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb

I checked this on Ubuntu 24.04 Desktop running under VMware Workstation. The commands ran without issue and Cypress 13.8.1 also ran without issue. Several of the packages were already installed by default on the Desktop edition.
I also ran it on Ubuntu 24.04 Server under VMware Workstation. The package installation commands also ran without issue and showed that on the server edition these packages are not installed by default. Cypress did run successfully however I saw some minor issues like missing a font for the check-box symbol. I haven't followed this up. It would be great if you cross-checked with the Docker image instead of me trying to get the server working error-free under VMware Workstation.

If you are willing to own this, then please proceed when you feel the dust has settled. However, I don't want to put more on your plate if you are unable to PR the updates. You already do quite a lot as an OSS contributor to our projects! So if it's an issue, just let us know!

That's fine. I'll hang back with submitting a PR for changes for the Contributors' document. I could submit this first as draft and let it soak for a week or two.
I'm reading in https://github.com/actions/runner-images that GitHub plans to have a beta version of a Ubuntu 24.04 runner available mid May 2024 with GA in August 2024 which gives a rough idea of their schedules.

I also ran it on Ubuntu 24.04 Server under VMware Workstation. The package installation commands also ran without issue and showed that on the server edition these packages are not installed by default. Cypress did run successfully however I saw some minor issues like missing a font for the check-box symbol. I haven't followed this up. It would be great if you cross-checked with the Docker image instead of me trying to get the server working error-free under VMware Workstation.

@MikeMcC399 was this in open or run mode in docker? I'm guessing run mode since you would need to attach a display. From my end npx cypress run looks as expected in the terminal. Is this what you are referring to?

@AtofStryker

was this in open or run mode in docker? I'm guessing run mode since you would need to attach a display. From my end npx cypress run looks as expected in the terminal. Is this what you are referring to?

I was using the kitchensink repo and npm run local:run which uses Cypress run mode.
I didn't use Docker and I didn't have any display attached, so it was pure Ubuntu.
If you are running correctly using Docker, then that's good enough for me!

Referring to https://github.com/cypress-io/cypress-docker-images/pull/1041#issuecomment-2084888532

PRs submitted for documentation are:

https://github.com/cypress-io/cypress/pull/29457
https://github.com/cypress-io/cypress/pull/29458


Dialyzer error: Unable to build dialyzer PLT. Most likely there are problems with your OTP and elixir installation.

I have compiled version of erlang and elixir installed. Newest versions.
Debian 12
Vscode 1.78.2
ElixirLS: v0.14.7
Erlang: 25.3.2
Elixir: 1.14.0

Please include full error output.
Otherwise please use forum or slack for support. Also there has already been some solutions in https://github.com/elixir-lsp/elixir-ls/issues/540.

No idea. Please refer to your editor help

No idea? I've checked elixir-ls source code. There is no additional info about error.
{:DOWN, ^ref, :process, ^pid, reason} ->           JsonRpc.show_message(             :error,             "Unable to build dialyzer PLT. Most likely there are problems with your OTP and elixir installation."           )
So I've presented full info output.

Besedes that message there are also logs being printed to output. You haven’t filled the issue template. I have no idea what editor you are using and how are you running elixirLS.
Can you provide a devcontainer that reproduces it? If not please reads the links provided and seek support on the forum or slack. Issue tracker is reserved for bugs

I've mentioned vscode.
Anyway... I've installed asdf, installed once again erlang and elixir. Everything is working fine. Thank you for your time.

I've solved my yesterday problem.
ElixirLS didn't work correctly because of bad permissions.
I've disabled asdf, reboot and after:
sudo chown -R root:root /opt/elixir
and
sudo chmod -R 755 /opt/elixir
and
update of .bashrc
export PATH="/opt/erlang/bin:/opt/elixir/bin:$PATH"
ElixirLS is working fine.


Unable to install tslearn on MacOS due to Numpy headers

Describe the bug
pip3 install tslearn fails with the following error:
Building wheels for collected packages: tslearn
  Building wheel for tslearn (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/setup.py'"'"'; __file__='"'"'/private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-wheel-9sqz_lji --python-tag cp37
       cwd: /private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/
  Complete output (46 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.12-x86_64-3.7
  creating build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/__init__.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/barycenters.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/bases.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/clustering.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/datasets.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/deprecated.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/generators.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/hdftools.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/metrics.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/neighbors.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/piecewise.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/preprocessing.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/shapelets.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/svm.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  copying tslearn/utils.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
  creating build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/sklearn_patches.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_barycenters.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_clustering.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_estimators.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_metrics.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_neighbors.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_piecewise.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_serialize_models.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_shapelets.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_utils.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  copying tslearn/tests/test_variablelength.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
  creating build/lib.macosx-10.12-x86_64-3.7/tslearn/.cached_datasets
  copying tslearn/.cached_datasets/Trace.npz -> build/lib.macosx-10.12-x86_64-3.7/tslearn/.cached_datasets
  running build_ext
  building 'tslearn.cycc' extension
  creating build/temp.macosx-10.12-x86_64-3.7
  creating build/temp.macosx-10.12-x86_64-3.7/tslearn
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include<EMAIL_ADDRESS>-I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c tslearn/cycc.c -o build/temp.macosx-10.12-x86_64-3.7/tslearn/cycc.o
  tslearn/cycc.c:611:10: fatal error: 'numpy/arrayobject.h' file not found
  #include "numpy/arrayobject.h"
           ^~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for tslearn
  Running setup.py clean for tslearn
Failed to build tslearn
Installing collected packages: tslearn
    Running setup.py install for tslearn ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/setup.py'"'"'; __file__='"'"'/private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-record-s2w_imf2/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/
    Complete output (46 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.12-x86_64-3.7
    creating build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/__init__.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/barycenters.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/bases.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/clustering.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/datasets.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/deprecated.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/generators.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/hdftools.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/metrics.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/neighbors.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/piecewise.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/preprocessing.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/shapelets.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/svm.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    copying tslearn/utils.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn
    creating build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/__init__.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/sklearn_patches.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_barycenters.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_clustering.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_estimators.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_metrics.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_neighbors.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_piecewise.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_serialize_models.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_shapelets.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_utils.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_variablelength.py -> build/lib.macosx-10.12-x86_64-3.7/tslearn/tests
    creating build/lib.macosx-10.12-x86_64-3.7/tslearn/.cached_datasets
    copying tslearn/.cached_datasets/Trace.npz -> build/lib.macosx-10.12-x86_64-3.7/tslearn/.cached_datasets
    running build_ext
    building 'tslearn.cycc' extension
    creating build/temp.macosx-10.12-x86_64-3.7
    creating build/temp.macosx-10.12-x86_64-3.7/tslearn
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include<EMAIL_ADDRESS>-I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c tslearn/cycc.c -o build/temp.macosx-10.12-x86_64-3.7/tslearn/cycc.o
    tslearn/cycc.c:611:10: fatal error: 'numpy/arrayobject.h' file not found
    #include "numpy/arrayobject.h"
             ^~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/setup.py'"'"'; __file__='"'"'/private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-install-qc_jggl7/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/fl/5t7gh9md4jn83nrmhcph3r9m0000gn/T/pip-record-s2w_imf2/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

To Reproduce
Python version: 3.7.6, pip version 19.3.1. I have installed cython as well as numpy via pip.
Expected behavior
tslearn to install
Environment (please complete the following information):

OS: MacOS 10.12.6
tslearn version 0.3.0

Additional context
>>> np.get_include()
'/usr/local/lib/python3.7/site-packages/numpy/core/include'

Looking at this issue from hmmlearn, could you try the solution that they proposed?
export CFLAGS="-I /usr/local/lib/python3.7/site-packages/numpy/core/include $CFLAGS"

@dfontenot : could you try @johannfaouzi 's trick and tell us if it works? If so, I could implement the solution suggested there as a fix.

@rtavenar I believe that worked. At the end of pip3 install tslearn, after having exported that CFLAGS var:
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/LICENSE'
Consider using the `--user` option or check the permissions.

A subsequent pip3 install -user tslearn stated the tslearn was already installed, and I could import tslearn in python3.

i also have similar one:
tslearn/cycc.c:613:10: fatal error: 'numpy/arrayobject.h' file not found
#include "numpy/arrayobject.h"
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
none of the proposed methods worked for me. i tried to include these paths both to my environment as well as global path. couldn't install!!!! neither globally nor in local env.
also in setup.py np.get_include() is already present. so i don't think this method would help anyway.

Hi @mustafadgr
Could you provide the same information @dfontenot did in his original post (os, python version, full error trace) so that we can try to figure out what is happening ?

Collecting tslearn   Downloading tslearn-0.3.1.tar.gz (548 kB)      |████████████████████████████████| 548 kB 412 kB/s  Requirement already satisfied: numpy in ./project_env/lib/python3.7/site-packages (from tslearn) (1.18.1) Requirement already satisfied: scipy in ./project_env/lib/python3.7/site-packages (from tslearn) (1.4.1) Requirement already satisfied: scikit-learn in ./project_env/lib/python3.7/site-packages (from tslearn) (0.22.2.post1) Requirement already satisfied: Cython in ./project_env/lib/python3.7/site-packages (from tslearn) (0.29.16) Requirement already satisfied: numba in ./project_env/lib/python3.7/site-packages (from tslearn) (0.48.0) Requirement already satisfied: joblib in ./project_env/lib/python3.7/site-packages (from tslearn) (0.14.1) Requirement already satisfied: setuptools in ./project_env/lib/python3.7/site-packages (from numba->tslearn) (41.2.0) Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in ./project_env/lib/python3.7/site-packages (from numba->tslearn) (0.31.0) Installing collected packages: tslearn     Running setup.py install for tslearn ... error     ERROR: Command errored out with exit status 1:      command: /Users/mustafadoeger/491/python/project_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-og9816i3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mustafadoeger/491/python/project_env/include/site/python3.7/tslearn          cwd: /private/tmp/pip-install-0c6eopd_/tslearn/     Complete output (47 lines):     running install     running build     running build_py     creating build     creating build/lib.macosx-10.15-x86_64-3.7     creating build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/metrics.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/barycenters.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/clustering.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/hdftools.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/neighbors.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/deprecated.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/datasets.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/shapelets.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/generators.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/utils.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/preprocessing.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/piecewise.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/svm.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     copying tslearn/bases.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn     creating build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_utils.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_estimators.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_metrics.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_barycenters.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_piecewise.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_variablelength.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_svm.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_serialize_models.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/sklearn_patches.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_shapelets.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_neighbors.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     copying tslearn/tests/test_clustering.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests     creating build/lib.macosx-10.15-x86_64-3.7/tslearn/.cached_datasets     copying tslearn/.cached_datasets/Trace.npz -> build/lib.macosx-10.15-x86_64-3.7/tslearn/.cached_datasets     running build_ext     building 'tslearn.cycc' extension     creating build/temp.macosx-10.15-x86_64-3.7     creating build/temp.macosx-10.15-x86_64-3.7/tslearn     clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include<EMAIL_ADDRESS>-I/usr/local/opt/sqlite/include -I/Users/mustafadoeger/491/python/project_env/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c tslearn/cycc.c -o build/temp.macosx-10.15-x86_64-3.7/tslearn/cycc.o     tslearn/cycc.c:613:10: fatal error: 'numpy/arrayobject.h' file not found     #include "numpy/arrayobject.h"              ^~~~~~~~~~~~~~~~~~~~~     1 error generated.     error: command 'clang' failed with exit status 1     ---------------------------------------- ERROR: Command errored out with exit status 1: /Users/mustafadoeger/491/python/project_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-og9816i3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mustafadoeger/491/python/project_env/include/site/python3.7/tslearn Check the logs for full command output.

Collecting tslearn
  Downloading tslearn-0.3.1.tar.gz (548 kB)
     |████████████████████████████████| 548 kB 412 kB/s
Requirement already satisfied: numpy in ./project_env/lib/python3.7/site-packages (from tslearn) (1.18.1)
Requirement already satisfied: scipy in ./project_env/lib/python3.7/site-packages (from tslearn) (1.4.1)
Requirement already satisfied: scikit-learn in ./project_env/lib/python3.7/site-packages (from tslearn) (0.22.2.post1)
Requirement already satisfied: Cython in ./project_env/lib/python3.7/site-packages (from tslearn) (0.29.16)
Requirement already satisfied: numba in ./project_env/lib/python3.7/site-packages (from tslearn) (0.48.0)
Requirement already satisfied: joblib in ./project_env/lib/python3.7/site-packages (from tslearn) (0.14.1)
Requirement already satisfied: setuptools in ./project_env/lib/python3.7/site-packages (from numba->tslearn) (41.2.0)
Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in ./project_env/lib/python3.7/site-packages (from numba->tslearn) (0.31.0)
Installing collected packages: tslearn
    Running setup.py install for tslearn ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/mustafadoeger/491/python/project_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-og9816i3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mustafadoeger/491/python/project_env/include/site/python3.7/tslearn
         cwd: /private/tmp/pip-install-0c6eopd_/tslearn/
    Complete output (47 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.7
    creating build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/metrics.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/barycenters.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/clustering.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/hdftools.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/neighbors.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/deprecated.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/datasets.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/shapelets.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/generators.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/utils.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/preprocessing.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/piecewise.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/svm.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    copying tslearn/bases.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn
    creating build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_utils.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_estimators.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_metrics.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_barycenters.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/__init__.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_piecewise.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_variablelength.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_svm.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_serialize_models.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/sklearn_patches.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_shapelets.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_neighbors.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    copying tslearn/tests/test_clustering.py -> build/lib.macosx-10.15-x86_64-3.7/tslearn/tests
    creating build/lib.macosx-10.15-x86_64-3.7/tslearn/.cached_datasets
    copying tslearn/.cached_datasets/Trace.npz -> build/lib.macosx-10.15-x86_64-3.7/tslearn/.cached_datasets
    running build_ext
    building 'tslearn.cycc' extension
    creating build/temp.macosx-10.15-x86_64-3.7
    creating build/temp.macosx-10.15-x86_64-3.7/tslearn
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include<EMAIL_ADDRESS>-I/usr/local/opt/sqlite/include -I/Users/mustafadoeger/491/python/project_env/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c tslearn/cycc.c -o build/temp.macosx-10.15-x86_64-3.7/tslearn/cycc.o
    tslearn/cycc.c:613:10: fatal error: 'numpy/arrayobject.h' file not found
    #include "numpy/arrayobject.h"
             ^~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/mustafadoeger/491/python/project_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-0c6eopd_/tslearn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/tmp/pip-record-og9816i3/install-record.txt --single-version-externally-managed --compile --install-headers /Users/mustafadoeger/491/python/project_env/include/site/python3.7/tslearn Check the logs for full command output.

macos version: 10.15.4
python version: 3.7.6
tslearn 0.3.1
numpy.include()
'/Users/mustafadoeger/491/python/project_env/lib/python3.7/site-packages/numpy/core/include'

ps: this is virtual env, but as i said same error pops up in global environment

Another related issue from another Python package: https://github.com/andersbll/cudarray/issues/25
Could you try the proposed solutions there please? You may also have less trouble installing tslearn using conda (if you use conda of course).

i don't use conda. i already saw this thread and tried them.
when i try to change
ext_modules=cythonize("tslearn/*.pyx", include_path=[numpy.get_include()]),
to:
ext_modules=cythonize("tslearn/*.pyx", include_dirs=[numpy.get_include()]),
i get an error saying remove include_dirs.
meanwhile when i try to change include_dirs in line 24 in setup.py, to include_pat i get numpy header error.

According to this issue on Cython project, include_path doesn't do anything.
Looking at the documentation of Cython, and more specifically to the cythonize function, you can use the aliases parameter if you want to use include_dirs in cythonize. I really don't much about Cython, so I don't know if this can be useful or not.
Another proposed solution in the issue is to give an Extension object to the cynthonize function. It would like this I guess:
from setuptools import setup, Extension
from Cython.Build import cythonize

setup(
    ...,
    ext_modules=cythonize(Extension("tslearn", sources=["tslearn/*.pyx"], include_dirs=[numpyp.get_include()])),
    ...
)

So you would have to change line 1 to import Extension and line 31 to use an Extension inside cythonize.
I hope that it helps you a bit.

it worked great!!! thanks


Add request without progress

In some cases (for simple request) no progress is needed

You can write an underscore if you don't need progress
_ = client.request(endpoint) { (result: Result<Book, Error>)
    print(result)
}

or do you want the function request(_: completionHandler:) to be with the annotation @discardableResult?


[docs] Remove notes about unsupported Linux from docs (part of #1117)

\cc @AlexanderMoskovkin @georgiy-abbasov

\сс @VasilyStrelyaev


Fix printf format specifier compiler warnings

Currently there are a few compiler warnings regarding the printf format
specifiers, for example:
test/constant_time_test.c:69:46:
warning: format specifies type 'uintmax_t' (aka 'unsigned long') but the
      argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat]
        BIO_printf(bio_err, "a=%jx b=%jx\n", a, b);
                               ~~~           ^
                               %llx

This commit attempts to fix these warnings using the macros specified in
inttypes.h.
Checklist

[x] tests are added or updated

The %j is our change to our formatted output.  So I don't think this is needed.

The %j is our change to our formatted output. So I don't think this is needed.

I see now, I'll close this. Sorry about the noise.


How to get to admin panel?

hi, can u tell me how to get to admin page?

I am deeply sorry. I have just seen your issue (I never received any notification).
Just in case, I am going to answer :
You login with a user having administrator role. It will unlock some features on different pages to create and/or edit events, bets, ...
In my demo, login using admin/admin and after that for example on this page : https://free-bet.bouzekri.net/premiere-league-2014 you can see the button "set result" only available to admin.


Add setting to allow control over telemetry event writing

Fixes #279
Change
Adds a setting to allow control over telemetry event writing.
"telemetry":
{
    "disable": true
}

When disabled, the ETW events will not be written at all.
Validation
Manually ran ETW event log listener with setting in both states; noted lack of events when disabled.
Microsoft Reviewers: Open in CodeFlow

"allOf": [

Just found out it's unnecessary use of allOf and all below ""additionalItems": true" are incorrect. "additionalItems" were for array types. We should revisit this when we do schema validation on settings file

Refers to: schemas/JSON/settings/settings.schema.0.2.json:85 in 717b4b6. [](commit_id = 717b4b699681210dc6d45b7cc3e3ca4367fcfddc, deletion_comment = False)

"allOf": [

Looks like the schema itself was not quite correct..

In reply to: 790236688 [](ancestors = 790236688)

Refers to: schemas/JSON/settings/settings.schema.0.2.json:85 in 717b4b6. [](commit_id = 717b4b699681210dc6d45b7cc3e3ca4367fcfddc, deletion_comment = False)


where is the file  '~/qstrader.yml' ?

DEFAULT_CONFIG_FILENAME = '~/qstrader.yml'

what OS have you installed qstrader on?
On Linux my file is located at /home/nonroot/qstrader.yml, which is created from the settings.py file.
Just use the locate qstrader.yml command on Linux.

windows10


Support React 18 types

Clear and concise description of the problem
With React 18 typescript currently there is a typing error.
'Calendar' cannot be used as a JSX component.
  Its instance type 'Calendar<EventCalendar, object>' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.

Suggested solution
It would be great if React 18 types would not throw an error.
Alternative
No response
Additional context
No response
Validations

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

Would you like to open a PR for this feature?

[ ] I'm willing to open a PR

Can you provide a repro link? Just updated to React 18 without error.

The solution in my case was simple. This error happens only for typescript applications
Example:
`
const CalendarWrapper = Calendar as any;
<CalendarWrapper
localizer={localizer}
events={formatEvents}
views={["day"]} />
`
It looks like Hungry but it solves the problem and the typescript does not reclaim

The solution in my case was simple. This error happens only for typescript applications
Example:
`
const CalendarWrapper = Calendar as any;
<CalendarWrapper
localizer={localizer}
events={formatEvents}
views={["day"]} />
`
It looks ugly but it solves the problem and the typescript does not reclaim

Types for Big Calendar are not controlled within Big Calendar, as they currently come from DefinitelyTyped


Handle spring properties in modules

Close https://github.com/jhipster/jhipster-lite/issues/1868
I chose to simply append new properties at the end of the file (so this works without needle), tell me if that ok (ofc it will replace existing properties)

For a first version, it looks good.


Query: How is the upper bound of the action space determined?

The environment action space is bounded between (0, 30). While 0 makes sense as it can be interpreted as 'no insulin has been administered', I'm wondering how the upper limit 30 is determined? Also, what is the unit?

It is the upper limit of the insulin pump for basal. See here https://github.com/jxx123/simglucose/blob/master/simglucose/params/pump_params.csv, the gym environment uses Insulet pump by default.
The unit is U/min (1 U = 1/6000 pmol/L).

It is the upper limit of the insulin pump for basal. See here https://github.com/jxx123/simglucose/blob/master/simglucose/params/pump_params.csv, the gym environment uses Insulet pump by default.
The unit is U/min (1 U = 1/6000 pmol/L).


Switching between tabs does not trigger 'focus' action

Version
Tell us which versions you are using (react native 0.26 is required for v3):

react-native-router-flux v3.26.12
react-native v0.26.3

Expected behaviour
Given using Redux integration and a <... tabs={true}> scene with <... type='jump'> children scenes,
I expect that when switching between tabs,
a 'focus' action will be dispatched with the current scene.
Actual behaviour
'focus' action is not being dispatched, except for when then initial scene of the tab bar is displayed.

@antonzy It could be a bug, could you provide repo based on our Example project to reproduce it?

same as #785 ?


Sudden change in altitude estimate

Describe the bug
Altitude estimate from the topic /mavros/altitude before and after acquiring home lock changes drastically. Although this sudden change is expected due to GPS altitude fusion, this can be catastrophic which I learnt the hard way.
While testing offboard mode, my sequence of steps are as follows (All these steps are automated in an offboard node i.e, all I had to do is turn on the drone and the drone will take care of executing each of the mentioned steps below(except of course for step 3)):

Arm
Takeoff (3m above ground)
Wait for switch to OFFBOARD mode from RC
Execute the path

While in step 2 (takeoff), the code generates altitude based on the current altitude estimate from /mavros/altitude topic. This altitude from the mentioned topic can be different depending on whether home position lock was acquired or not as explained below:

Home position lock not acquired: In this case /mavros/altitude outputs barometric altitude.
Home position lock acquired: In this case, barometric altitude is fused with GPS and a new estimate is put on the topic /mavros/altitude.

Log Files and Screenshots

Log analysis when starting the script after home lock is acquired: link
Log analysis when starting the script before home lock is acquired: link

Note that step 2 (takeoff) altitude setpoint is of 3m. In the first log, you can clearly see that 3m altitude setpoint is relative to fused altitude whereas in the second log, you can see that it is way off.
Additional context
We were testing simple path execution via offboard mode.

Just to clarify, the EKF isn't fusing the GPS altitude in you case because EKF2_HGT_MODE is set to barometric altitude. However, yes, the altitude is adjusted when the GPS altitude is acquired. Could you simply check for the validity of the global position solution before generating your path?


Perspective giving odd results

I'm not certain if this is a bug or just my lack of understanding of the math behind the perspective matrix, but I've tried the following variations on some fixed data
pMatrix = mat4.perspective(pMatrix, 20, gl.viewportWidth / gl.viewportHeight, -5.0, 5.0);
pMatrix = mat4.perspective(pMatrix, 25, gl.viewportWidth / gl.viewportHeight, -5.0, 5.0);
pMatrix = mat4.perspective(pMatrix, 30, gl.viewportWidth / gl.viewportHeight, -5.0, 5.0);

and unfoxtunatley, the handedness using the fovy = 30 seems to be the opposite handedness of fovy = 25

Angles in glMatrix are given in radians, including the FOV of the perspective function. That's bound to lead to some weirdness with the numbers you're providing:
25 Rad == 1432 Deg
30 Rad == 1719 Deg
Instead try 0.43 for 20 Deg and 0.52 for 30 Deg. (Rad = Deg * (3.14159/180.0))

K. for some reason I was going off of the Math.tan being in degrees.

No problem! (FYI: All trig functions is Javascript use radians as well. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tan)


Add Projectile Simulation (All credits go to @rei-kes)

Edit: Accidentally hit enter but it's fine
Edit 2: Also includes an ESP bugfix

Thank you, however I'll wait for #1108 first to prevent conflicts


feat: added shortcuts expand panel at the bottom

Types

[ ] 🎉 New Features

Background or solution
close #619
起因，由于切换底部面板最大化是两个 command，需要提供默认的 when 去区分。 具体看：#619

修复之前翻译
支持最大化切换，提供默认的 when 设置

效果：

Changelog
添加底部面板最大化快捷键

Codecov Report

Merging #620 (8151796) into main (b635a7b) will not change coverage.
The diff coverage is 30.00%.

@@           Coverage Diff           @@
##             main     #620   +/-   ##
=======================================
  Coverage   58.98%   58.98%
=======================================
  Files        1208     1208
  Lines       74640    74640
  Branches    15462    15464    +2
=======================================
  Hits        44026    44026
  Misses      27912    27912
  Partials     2702     2702

Impacted Files
Coverage Δ

packages/core-common/src/utils/ipc.ts
83.33% <ø> (ø)

...es/extension/src/browser/extension-node.service.ts
22.68% <0.00%> (-0.73%)
:arrow_down:

...ges/extension/src/node/extension.service.client.ts
67.56% <ø> (ø)

packages/i18n/src/common/en-US.lang.ts
100.00% <ø> (ø)

packages/i18n/src/common/zh-CN.lang.ts
100.00% <ø> (ø)

...s/main-layout/src/browser/tabbar/tabbar.service.ts
63.01% <ø> (ø)

packages/core-browser/src/bootstrap/app.ts
64.35% <50.00%> (ø)

packages/core-browser/src/bootstrap/connection.ts
44.00% <100.00%> (+0.60%)
:arrow_up:

packages/core-browser/src/keybinding/keybinding.ts
74.52% <0.00%> (+0.27%)
:arrow_up:

Continue to review full report at Codecov.

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


prometheus-adapter filters out the metrics

in prometheus-adapter pod log I see it runs this query:
GET /apis/custom.metrics.k8s.io/v1beta1/namespaces/my_namespace/pods/%2A/my_metric?labelSelector=app%3Dmy-service%2Capp.kubernetes.io%2Finstance%3Dmy-service
The problem is with this:
labelSelector=app%3Dmy-service%2Capp.kubernetes.io%2Finstance%3Dmy-service
this filter filters out the metrics (from where this filter is added?)
When I run
kubectl get --raw="/apis/custom.metrics.k8s.io/v1beta1/namespaces/my_namespace/pods/%2A/my_metric" | jq .
I get:

{
  "kind": "MetricValueList",
  "apiVersion": "custom.metrics.k8s.io/v1beta1",
  "metadata": {
    "selfLink": "/apis/custom.metrics.k8s.io/v1beta1/namespaces/my_namespace/pods/%2A/my_metric"
  },
  "items": [
    {
      "describedObject": {
        "kind": "Pod",
        "namespace": "my_namespace",
        "name": "my-service-234f576c7-2x38h",
        "apiVersion": "/v1"
      },
      "metricName": "my_metric",
      "timestamp": "2021-09-19T08:13:11Z",
      "value": "41",
      "selector": null
    }
  ]
}

But when I run:

kubectl get --raw="/apis/custom.metrics.k8s.io/v1beta1/namespaces/my_namespace/pods/%2A/my_metric?labelSelector=app%3Dmy-service%2Capp.kubernetes.io%2Finstance%3Dmy-service" | jq .
{
  "kind": "MetricValueList",
  "apiVersion": "custom.metrics.k8s.io/v1beta1",
  "metadata": {
    "selfLink": "/apis/custom.metrics.k8s.io/v1beta1/namespaces/my_namespace/pods/%2A/my_metric"
  },
  "items": []
}

same issue

@yevsh Do you have HPA set up?

I have solved this problem because the pod that exposes the indicator is not the pod specified by hpa.

@silenceper can you elaborate please?

Thank you, think this is helping, I will do the required tests.

I have solved this problem because the pod that exposes the indicator is not the pod specified by hpa.

hi，Can I ask you a few questions? email？


fuy.gg causing incompatibility issues

After launching the pack for the first time, every subsequent launch is stopped by fuy.gg and displays the following error message.

After updating wynntils the pack works as expected, not sure why the pack ships with an older version of wynntils and not sure why it only causes an issue after the first launch.

Fixed in 1.0.2


Rotated certificates cause all services to crashloop/failure to refresh

I see the issue where the certs are rotated and everything basically crashloops or fails requests due to expired certs. I have to delete the cert secrets and also the deployments to let the operator reconcile it properly.
I saw the same in #509
For CA certs, but it happens for the other certs too.

Hi @ElanHasson !
Thanks for reporting this issue.
Do you have any steps to reproduce it ? Like manifests, operator version ...

Here you go @alexandrevilain
I have the durations set very high.
Set them low, then watch them expire and you'll see frontend fails and others too.
Also, when they are valid and low, increase the duration to something high. Expectation Is new certificates would be created with the new duration and they would be rotated by the reconciler immediately.
apiVersion: temporal.io/v1beta1
kind: TemporalCluster
metadata:
  name: temporal
spec:
  admintools:
    enabled: true
    image: temporalio/admin-tools
    resources: {}
  authorization:
    # Uncomment once claims are setup in keycloak
    # authorizer: default
    # claimMapper: default
    jwtKeyProvider:
      keySourceURIs:
        - CHANGE_ME
      refreshInterval: 30m0s
    permissionsClaimName: permissions
  image: temporalio/server
  jobResources: {}
  jobTtlSecondsAfterFinished: 300
  log:
    development: false
    format: json
    level: info
    outputFile: ""
    stdout: true
  mTLS:
    certificatesDuration:
      clientCertificates: 17520h0m0s
      frontendCertificate: 17520h0m0s
      intermediateCAsCertificates: 17520h0m0s
      internodeCertificate: 17520h0m0s
      rootCACertificate: 27520h0m0s
    frontend:
      enabled: true
    internode:
      enabled: true
    provider: cert-manager
    refreshInterval: 72h0m0s # I do not think these are being considered properly.
    renewBefore: 1h10m0s # This too
  metrics:
    enabled: true
    prometheus:
      listenAddress: ""
      listenPort: 9090
      scrapeConfig:
        annotations: false
        serviceMonitor:
          enabled: true
  numHistoryShards: 1
  persistence:
    defaultStore:
      name: default
      passwordSecretRef:
        key: password
        name: temporal-postgres-app
      skipCreate: false
      sql:
        connectAddr: temporal-postgres-rw:5432
        connectProtocol: tcp
        databaseName: temporal
        maxConnLifetime: 0s
        maxConns: 0
        maxIdleConns: 0
        pluginName: postgres
        taskScanPartitions: 0
        user: temporal
    visibilityStore:
      name: visibility
      passwordSecretRef:
        key: password
        name: temporal-postgres-app
      skipCreate: false
      sql:
        connectAddr: temporal-postgres-rw:5432
        connectProtocol: tcp
        databaseName: temporal_visibility
        maxConnLifetime: 0s
        maxConns: 0
        maxIdleConns: 0
        pluginName: postgres
        taskScanPartitions: 0
        user: temporal
  services:
    frontend:
      overrides:
        deployment:
          spec:
            template:
              spec:
                containers:
                  - name: service
                    args: ["--allow-no-auth"]
      httpPort: 7243
      membershipPort: 6933
      port: 7233
      replicas: 1
      resources: {}
    history:
      httpPort: 0
      membershipPort: 6934
      port: 7234
      replicas: 1
      resources: {}
    matching:
      httpPort: 0
      membershipPort: 6935
      port: 7235
      replicas: 1
      resources: {}
    worker:
      httpPort: 0
      membershipPort: 6939
      port: 7239
      replicas: 1
      resources: {}
  ui:
    enabled: true
    image: temporalio/ui
    ingress:
      annotations:
        external-dns.alpha.kubernetes.io/cloudflare-proxied: "false" # this will need to be true when we are out of the basement
        cert-manager.io/issuer: letsencrypt-prod
        nginx.ingress.kubernetes.io/proxy-buffer-size: 128k
      hosts:
        - CHANGEME
      tls:
        - hosts:
            - CHANGEME
          secretName: temporal-ingress-cert
    overrides:
      deployment:
        spec:
          template:
            spec:
              containers:
                - env:
                    - name: TEMPORAL_AUTH_ENABLED
                      value: "true"
                    - name: TEMPORAL_AUTH_SCOPES
                      value: openid email profile
                  name: ui
                  resources: {}
                  envFrom:
                    - secretRef:
                        name: temporal-oidc-client
    replicas: 1
    resources:
      limits:
        cpu: "1"
        memory: 256Mi
      requests:
        cpu: 10m
        memory: 20Mi
    version: 2.26.1
  version: 1.22.7

Thanks for this!
I’ll to find what’s figuring out as soon as possible!
Looking at your manifest, feel free to open an issue to improve ui configuration to simplify auth stuff, looks like it could be improved!

I am running into this issue too, but I think I have a reproduction.  This is my current config:
apiVersion: temporal.io/v1beta1
kind: TemporalCluster
metadata:
  name: temporal
  namespace: temporal-repro
spec:
  version: 1.23.0
  numHistoryShards: 8
  persistence:
    defaultStore:
      sql:
        user: temporal
        pluginName: postgres
        databaseName: temporal
        connectAddr: temporal-db-rw:5432
        connectProtocol: tcp
      passwordSecretRef:
        name: temporal-db-credentials
        key: password
    visibilityStore:
      sql:
        user: temporal
        pluginName: postgres
        databaseName: temporal_visibility
        connectAddr: temporal-db-rw:5432
        connectProtocol: tcp
      passwordSecretRef:
        name: temporal-db-credentials
        key: password
  ui:
    enabled: true
  mTLS:
    provider: cert-manager
    internode:
      enabled: true
    frontend:
      enabled: true
    certificatesDuration:
      clientCertificates: 1h0m0s
      frontendCertificate: 1h0m0s
      intermediateCAsCertificates: 1h30m0s
      internodeCertificate: 1h0m0s
      rootCACertificate: 2h0m0s
    refreshInterval: 5m0s

If I look at the docs for cert-manager's Certificate resource, they support a renewBefore, but not a refreshInterval.  If I use refreshInterval as above, the certificate refresh timestamp appears to be a default.  If I use renewBefore as 55m0s to flip the 5m0s, I can see this on the Certificate and the refresh timestamp is 5m from issuance.  Refreshing the Certificate object just now, I can see that it refreshed.  I'm able to reload the UI, but the shortest expiration interval that cert-manager supports is 1h, so I've got another ~50m before expiration to see if this is all working now.
I'm still learning the internals of the operator, but if I dig into where I think the Certificate spec is being generated, I don't see how refreshInterval would be accounted for since it references renewBefore directly and Certificate does not natively support a refreshInterval.
Given this, I wonder if we should remove refreshInterval from the TemporalCluster spec and only support renewBefore to better align with cert-manager.  Alternatively, I think we could do duration - refreshInterval if we wanted to support that, but it seems unnecessary.

Well, I can see that the Certificate objects are rotating, but I am still running into issues once certificates expire.  I went to the UI and tried to create a Schedule for a test action and it returns:
last connection error: connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"Root CA certificate\")"

If I go back and check the logs of one of the deployments, in this case the Temporal worker, I start to see these first:
2024-11-22 06:53:37.277Z {"level":"warn","ts":"2024-11-22T06:53:37.277Z","msg":"Failed to poll for task.","service":"worker","Namespace":"temporal-system","TaskQueue":"temporal-sys-tq-scanner-taskqueue-0","WorkerID":"1@temporal-worker-7c4d8564db-6w4s5@","WorkerType":"WorkflowWorker","Error":"last connection error: connection error: desc = \"transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2024-11-22T06:53:34Z is after 2024-11-22T06:50:32Z\"","logging-call-at":"internal_worker_base.go:333"}

There are many of those logs, but they eventually turn into:
2024-11-22 07:52:55.968Z {"level":"warn","ts":"2024-11-22T07:52:55.967Z","msg":"Failed to poll for task.","service":"worker","Namespace":"default","TaskQueue":"temporal-sys-per-ns-tq","WorkerID":"server-worker@1@temporal-worker-7c4d8564db-6w4s5@default","WorkerType":"WorkflowWorker","Error":"last connection error: connection error: desc = \"transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of \\\"crypto/rsa: verification error\\\" while trying to verify candidate authority certificate \\\"Root CA certificate\\\")\"","logging-call-at":"internal_worker_base.go:333"}

I'm still digging into if I can stabilize this somehow and why this is happening, but wanted to report these findings first.

I restarted all the deployments as well and it doesn't seem to stabilize.  I'm digging around look at the Certificate manifests and such, but I'm not sure what to look at next yet.

Certificate management is not my strong suit, but I was thinking about this a bit more and I think these durations are overly aggressive.  If the root and intermediate CAs are expiring pretty often, then do we have windows of time where we need to trust multiple root CAs because certs could be issued on a range of them?
I'm going to try this config with much wider duration windows, but I don't know if I'm just delaying the problem still.  I think so long as the root CA expiration is sufficiently long, things will be fine.  However, once the root CA expires, you'll have a period where certificates need to be reissued after the root CA expired.
spec:
  mTLS:
    provider: cert-manager
    internode:
      enabled: true
    frontend:
      enabled: true
    certificatesDuration:
      # End-entity certificates
      clientCertificates: 24h
      frontendCertificate: 24h
      internodeCertificate: 24h

      # Intermediate and root certificates
      intermediateCAsCertificates: 168h  # 1 week
      rootCACertificate: 720h    # 30 days
    renewBefore: 8h

It seems like we need to handle multiple root CAs somehow, though I'm not sure I entirely understand this yet.  Does that make sense?

Alright -- I have this working now and I think the root CA thing above doesn't feel like a problem.
In my last test, I realized I had some Certificate/Secret objects that stuck around after I cleaned up things in ArgoCD.  If I use renewBefore and I make sure there aren't any Certificate or Secret objects from a previous cluster attempt, renewal with the tighter durations has worked for the past ~10 hours now.
This feels like maybe we can fix it with some documentation?

Hmm, spoke too soon.  On the short config above, I still get an error when trying to take actions in the UI:
last connection error: connection error: desc = "transport: authentication handshake failed: tls: failed to verify certificate: x509: certificate signed by unknown authority (possibly because of \"crypto/rsa: verification error\" while trying to verify candidate authority certificate \"Root CA certificate\")"

Will continue to investigate here.

Thanks for your work @bmorton ! Appreciate it.
Feel free to reach me if you need some help digging this issue.


Speed up malloc/free routines

This commit improves malloc() and free() in lib/c.c to eliminate a useless member from a structure and reduce execution time.
Refine the definition of chunk_t and improve the two functions using techniques similar to glibc.
For example, in glibc, it can obtain the starting address of a chunk by a macro called mem2chunk(), and the macro moves the given pointer backward directly to get the address of a chunk. Thus, the proposed changes use a similar approach to speed up free().
Close #139

Improve the ASCII art as following:
                     |<--  usable memory  -->|
+------+------+------+-------- ... ----------+
| next | prev | size |          :            |
+------+------+------+-------- ... ----------+
^                    ^
|                    |
chunk              (chunk + 1)
                    the starting address returned by malloc().

I will continue to improve my commit messages and changes later, but I provide my measurements here first.
Here is the information on my CPU.
$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         39 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  4
  On-line CPU(s) list:   0-3
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
    CPU family:          6
    Model:               158
    Thread(s) per core:  1
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            9
    CPU max MHz:         3500.0000
    CPU min MHz:         800.0000
...

My measurements use time command to build shecc for Arm and RISC-V outputs and obtain their execution time.
$ make distclean && time make
$ make distclean && time make ARCH=riscv

On the master branch, it took about 26 seconds and 39 seconds to build the executables.
$ make distclean && time make
...
  SHECC out/shecc-stage2.elf

real    0m26.886s
user   0m24.716s
sys     0m2.096s

$ make distclean && time make ARCH=riscv
...
  SHECC out/shecc-stage2.elf

real    0m38.896s
user    0m36.528s
sys     0m2.332s

Then, after introducing the proposed changes, it was reduced to about 6.6 seconds and 18 seconds, respectively.
$ make distclean && time make
...
  SHECC out/shecc-stage2.elf

real    0m6.618s
user    0m4.283s
sys     0m2.178s

$ make distclean && time make ARCH=riscv
...

Thank @DrXiao for contributing!

By the way, because I use chunk_set_freed() and chunk_clear_freed(), which replace CHUNK_SET_FREED() and CHUNK_CLEAR_FREED() to set or clear the bit, the execution time may increase a little due to the overhead of function calls.
Thus, here is the newest result of measurements:

master
proposed changes
Percentage of reduced time

shecc (arm)
26.845 s
6.435 s
76.02%

shecc (riscv)
38.819 s
18.198s
53.12%

However, the bootstrap time is still significantly reduced.


Make rss feed werk?! 🙃

My rss.xml is there, but... when I use a chrome extension for it, it does not get my posts 🤔 no idea why

Apparently it works on feeder.co, I just saw it. However its not exposed for people to subscribe on my website, and I think it should


Kubelet has not even heard of etcd.

Removes all mention of etcd config source and etcd clients from kubelet code.

LGTM

pushed one more commit.

LGTM


.getstd::string causing emdash errors

Not a very experienced programmer, but I've been putting together a small project using json files and encountered some issues with printing values from json. My code contains a number of conditionals similar to below, which are supposed to print out the value associated with a given key in a much larger json file. In this case, "type" is a key with an associated string value. However, when I run the program, the code prints out a small pile of random Unicode symbols instead of what's written in the json file. Is this something that is solvable, or is something wrong on my end?
if (unique.find("type") != unique.end()) { 				cout << unique["type"].get<std::string>() << endl; 			}

Expected: Creature — Cat

Actual: Creature ΓÇö Cat

I've been building my code on Windows using Visual Studio 2019 16.3.10, and am currently using nlohmann json version 3.7.3.
Thanks, Julian Lane.

How does the JSON value look like? What is the output of unique.dump()?

Hadn't thought about dumping the json values yet, but the dump resulted in the same errors. I attached both the correct text form of the json and the dumped version for further troubleshooting.
unique_dump.txt
unique_plaintext_json.txt

Both files look good. Please provide the code you use to read/create the value and the exact error message.


supertypes

It might be useful to have an attribute on @XClass to include all types from which a class derives into the injection scope.
e.g.:
@XClass(names="my.List",supertypes=true)
{
}

closed by fault. Commit on #15 was for #14.

After working with the tool a little bit I guess that would not be a good idea after all since it would be quite intransparent into which classes code is injected. Imagine a class that extends ultimately some core collection classes. The user should rather decide manually which classes he wants to instrument.


get stores linked to product selections doesn't work

List<AssignedProductSelection> productSelections;
projectApiRoot.stores().get()
    .withWhere("productSelections(active=true and productSelection(id in :productSelectionIds))")
    .withPredicateVar("productSelectionIds", productSelections.stream().map(s -> s.getProductSelection().getId()).toList())
    .executeBlocking()
    .getBody()
    .getResults();

INFO  --- [                     main] com.loylogic.experimental.commercetools.ProductSelectionsService : results: 2
INFO  --- [                     main] com.loylogic.experimental.commercetools.ProductSelectionsService : AssignedProductSelectionImpl[createdAt=2022-02-02T09:15:35.001Z,productSelection=ProductSelectionReferenceImpl[id=2e89d89b-bdfb-4339-8e53-7638966a97c2,obj=<null>,typeId=product-selection]]
INFO  --- [                     main] com.loylogic.experimental.commercetools.ProductSelectionsService : AssignedProductSelectionImpl[createdAt=2022-02-02T11:44:33.841Z,productSelection=ProductSelectionReferenceImpl[id=21a7ebc9-75e4-4be4-b3e7-a9808796ac1c,obj=<null>,typeId=product-selection]]
INFO  --- [                     main] com.loylogic.experimental.commercetools.ProductSelectionsService : listing stores linked to selections...
DEBUG --- [ForkJoinPool.commonPool-worker-1]                         commercetools.stores.request.queries : io.vrap.rmf.base.client.ApiHttpRequest@29b95c55[method=GET,uri="https://api.europe-west1.gcp.commercetools.com/loylogic-poc/stores?where=productSelections%28active%3Dtrue+and+productSelection%28id+in+%3AproductSelectionIds%29%29&var.productSelectionIds=2e89d89b-bdfb-4339-8e53-7638966a97c2&var.productSelectionIds=21a7ebc9-75e4-4be4-b3e7-a9808796ac1c",headers=[{key=Accept-Encoding, value=gzip}, {key=Authorization, value=**removed from output**}, {key=User-Agent, value=commercetools-sdk-java-v2/7.5.0-SNAPSHOT  Java/17.0.2+8-LTS (Windows 10; amd64)}],textInterpretedBody=empty body]
TRACE --- [ForkJoinPool.commonPool-worker-1]                         commercetools.stores.request.queries : GET https://api.europe-west1.gcp.commercetools.com/loylogic-poc/stores?where=productSelections%28active%3Dtrue+and+productSelection%28id+in+%3AproductSelectionIds%29%29&var.productSelectionIds=2e89d89b-bdfb-4339-8e53-7638966a97c2&var.productSelectionIds=21a7ebc9-75e4-4be4-b3e7-a9808796ac1c <no body>
INFO  --- [    httpclient-dispatch-2]                                commercetools.stores.response : GET https://api.europe-west1.gcp.commercetools.com/loylogic-poc/stores?where=productSelections%28active%3Dtrue+and+productSelection%28id+in+%3AproductSelectionIds%29%29&var.productSelectionIds=2e89d89b-bdfb-4339-8e53-7638966a97c2&var.productSelectionIds=21a7ebc9-75e4-4be4-b3e7-a9808796ac1c 200
DEBUG --- [    httpclient-dispatch-2]                                commercetools.stores.response : io.vrap.rmf.base.client.ApiHttpResponse@1973d7c7[statusCode=200,headers=[{key=date, value=Wed, 02 Feb 2022 13:38:55 GMT}, {key=server, value=istio-envoy}, {key=x-envoy-upstream-service-time, value=4}, {key=content-encoding, value=gzip}, {key=access-control-allow-headers, value=Accept, Authorization, Content-Type, Origin, User-Agent, X-Correlation-ID}, {key=x-correlation-id, value=projects-1e4be2b8-a509-4fe3-a138-cca3ebef2d04}, {key=access-control-allow-methods, value=GET, POST, DELETE, OPTIONS}, {key=via, value=1.1 google}, {key=access-control-expose-headers, value=X-Correlation-ID}, {key=access-control-allow-origin, value=*}, {key=access-control-max-age, value=299}, {key=content-type, value=application/json; charset=utf-8}, {key=server-timing, value=projects;dur=3}, {key=alt-svc, value=clear}],textInterpretedBody={"limit":20,"offset":0,"count":0,"total":0,"results":[]}]
TRACE --- [    httpclient-dispatch-2]                                commercetools.stores.response : 200
{
  "limit" : 20,
  "offset" : 0,
  "count" : 0,
  "total" : 0,
  "results" : [ ]
}
INFO  --- [                     main] com.loylogic.experimental.commercetools.ProductSelectionsService : stores: 0

Stack information:

Java: [e.g. 11]
SDK: 7.5.0-SNAPSHOT

It's probably not an SDK issue but a server/platform one.

Exactly. It's not an SDK issue. Will forward it to the respective team.

Btw could you try out if the where condition works when directly writing the IDs inside the predicate and not using a predicate variable?

I don't really know how, none of these attempts worked, failing with a parse error from the backend:
productSelections(active=true and productSelection(id in [2e89d89b-bdfb-4339-8e53-7638966a97c2,21a7ebc9-75e4-4be4-b3e7-a9808796ac1c]))
productSelections(active=true and productSelection(id in 2e89d89b-bdfb-4339-8e53-7638966a97c2,21a7ebc9-75e4-4be4-b3e7-a9808796ac1c))
productSelections(active=true and productSelection(id in (2e89d89b-bdfb-4339-8e53-7638966a97c2,21a7ebc9-75e4-4be4-b3e7-a9808796ac1c)))

should be productSelections(active=true and productSelection(id in ("2e89d89b-bdfb-4339-8e53-7638966a97c2","21a7ebc9-75e4-4be4-b3e7-a9808796ac1c")))

I got a 200 result status for GET https://api.europe-west1.gcp.commercetools.com/loylogic-poc/stores?where=productSelections%28active%3Dtrue+and+productSelection%28id+in+%28%222e89d89b-bdfb-4339-8e53-7638966a97c2%22%2C%2221a7ebc9-75e4-4be4-b3e7-a9808796ac1c%22%29%29%29, but still no stores in the result.

Okay at least we can rule out that it was about the input variables. The team is looking at it. :)

Could it be that there is no store with these product selections assigned?

Damn it.... you're right, I'm embarrassed to say.
I've named the selections with the same key as the stores and somehow I forgot to select them at the store level.
Sorry for the noise.


Pyconweb 2017

- title: Pyconweb 2017
  dir: pyconweb-2017
  # Only videos
  #  from "28.05.2017 - Lightning Talks"
  #  to "Martijn Faassen - Rethinking the Python Web Framework"
  youtube_list: https://www.youtube.com/channel/UC9HO6AAgDl0eA0CusEMnN_g/videos
  language: eng

Schedule: https://pyconweb.com/#speakers

Hi! If no one's been working on this one, I can take it on?

You are more than welcome to work on it @fding253 .
More up to date info of the issue:
- title: PyConWeb 2017
  dir: pyconweb-2017
  youtube_list: https://www.youtube.com/playlist?list=PL7_1tKOI9Dt6P3Heu4wrb46OLBsfFHbYc
  language: eng
  related_urls:
  - label: schedule
    url: https://pyconweb.com/#schedule

You are more than welcome to work on it @fding253.
More up to date info of the issue:
- title: PyConWeb 2017
  dir: pyconweb-2017
  youtube_list: https://www.youtube.com/playlist?list=PL7_1tKOI9Dt6P3Heu4wrb46OLBsfFHbYc
  language: eng
  related_urls:
  - label: schedule
    url: https://pyconweb.com/#schedule


Allow setting a SBT repositories via an env var

Describe the Enhancement
There are often times when the user/operator/stack provider would want an easy way to specify the sbt repositories to a file path in the builder/workspace which doesn't contain any credentials. For eg. changing the maven.ivy repositories.
Currently SBT BP doesn't expose a non project specific way of doing this.
Possible Solution

Allow defining a path to sbt repositories file.
Motivation
Support enterprise SBT repositories.

Resolved by #168


Update for SharePoint Form in PPAC

Updates for SharePoint Form in new Power Platform Admin Center.

Thank you for reaching out. The documentation will be updated separately, closing the PR here. Appreciate your feedback!


Fix #1323 for 'no-unused-modules' crashing when using 'ignoreExports'…

Fixes #1323

Coverage increased (+0.002%) to 97.983% when pulling 1666c8422d4aa75275a914f535d5f9cf49810080 on rfermann:issue-1323 into 351256316a5c7ecae6c4cb7b83b94e1bd2e93701 on benmosher:master.

Coverage increased (+0.002%) to 97.983% when pulling 1666c8422d4aa75275a914f535d5f9cf49810080 on rfermann:issue-1323 into 351256316a5c7ecae6c4cb7b83b94e1bd2e93701 on benmosher:master.

Thanks, great!


[UNDERTOW-2125] At ReadTimeoutStreamSourceConduit, skip expiration if…

… connection is not open.
Also:

prevent unneeded duplicate scheduling by checking if handle is null before rescheduling
calculate the elapsed time in the expiration properly when throwing the timeout exception

Signed-off-by: Flavia Rainone<EMAIL_ADDRESS>Jira: https://issues.redhat.com/browse/UNDERTOW-2125

@ropalka good point! I made it volatile but then, for some reason, I reverted the change. Now I hope it would be correct. Even though I prefer the atomic field updaters, it wouldn't work here because when we create a new handle we are already rescheduling and we want to do that only when handle is null.


I have successfully added the game description.

PR Description 📜
My task was to add description of the game. I have successfully added the pop up dialog box, that makes it creative and attractive.
Fixes # 11

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for review.

## Add your screenshots(Optional) 📸
Uploading Description recording.mp4…

Thank you soo much for contributing to our repository 💗

@SIM-RAITANI Add screen recording in the PR description of the output.