Vacuum cleaner

Is any plans to add support for Vacuum cleaner ?
Thanks

I also hope it :)

@timota @remb0  We will consider it.

 I got too keen to get this going so I have produced this. Likely have some code thats not needed but it got my vacuum working. Weirdly enough, HA doesnt seem to be doing anything when you call the start and pause services for Vacuums. I don't think their is anything wrong with my implementation as I cant even see the function get called. @tsutsuku. I hope this helps even a little to getting this into this repo :) I will try and clean this up a bit when I have time but it works. :)
#!/usr/bin/env python3
"""Support for Tuya vacuum."""
from __future__ import annotations

import logging
from typing import Any

from tuya_iot import TuyaDevice, TuyaDeviceManager

from homeassistant.components.vacuum import (
    DOMAIN as DEVICE_DOMAIN,
    SUPPORT_TURN_ON, SUPPORT_TURN_OFF,
    SUPPORT_STATE,
    SUPPORT_STATUS,
    SUPPORT_BATTERY,
    SUPPORT_START,
    SUPPORT_PAUSE,
    SUPPORT_RETURN_HOME,
    SUPPORT_STOP,
    STATE_CLEANING,
    STATE_DOCKED,
    STATE_PAUSED,
    STATE_IDLE,
    STATE_RETURNING,
    STATE_ERROR,
    VacuumEntity
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .base import TuyaHaDevice
from .const import (
    DOMAIN,
    TUYA_DEVICE_MANAGER,
    TUYA_DISCOVERY_NEW,
    TUYA_HA_DEVICES,
    TUYA_HA_TUYA_MAP,
)

_LOGGER = logging.getLogger(__name__)

TUYA_SUPPORT_TYPE = {
    "sd",  # Robot Vaccuum
}

# Vacuum(sd),
# https://developer.tuya.com/docs/iot/open-api/standard-function/electrician-category/categorykgczpc?categoryId=486118
DPCODE_MODE = "mode"
DPCODE_POWER = "power_go"
DPCODE_STATUS = "status"

TUYA_VMODE_TO_HA = {
    "hot": STATE_CLEANING,
    "cold": "cool",
}

async def async_setup_entry(
    hass: HomeAssistant, entry: ConfigEntry, async_add_entities
):
    """Set up tuya vacuum dynamically through tuya discovery."""
    print("switch init")

    hass.data[DOMAIN][TUYA_HA_TUYA_MAP].update({DEVICE_DOMAIN: TUYA_SUPPORT_TYPE})

    async def async_discover_device(dev_ids):
        """Discover and add a discovered tuya sensor."""
        print("switch add->", dev_ids)
        if not dev_ids:
            return
        entities = await hass.async_add_executor_job(_setup_entities, hass, dev_ids)
        hass.data[DOMAIN][TUYA_HA_DEVICES].extend(entities)
        async_add_entities(entities)

    async_dispatcher_connect(
        hass, TUYA_DISCOVERY_NEW.format(DEVICE_DOMAIN), async_discover_device
    )

    device_manager = hass.data[DOMAIN][TUYA_DEVICE_MANAGER]
    device_ids = []
    for (device_id, device) in device_manager.deviceMap.items():
        if device.category in TUYA_SUPPORT_TYPE:
            device_ids.append(device_id)
    await async_discover_device(device_ids)

def _setup_entities(hass, device_ids: list):
    """Set up Tuya Switch device."""
    device_manager = hass.data[DOMAIN][TUYA_DEVICE_MANAGER]
    entities = []
    for device_id in device_ids:
        device = device_manager.deviceMap[device_id]
        if device is None:
            continue

        entities.append(TuyaHaVacuum(device, device_manager))

    return entities

class TuyaHaVacuum(TuyaHaDevice, VacuumEntity):
    """Tuya Vacuum Device."""

    HASTATE = STATE_IDLE

    @property
    def name(self) -> str | None:
        """Return Tuya device name."""
        return self.tuya_device.name

    @property
    def status(self) -> str | None:
        """Return Tuya device state."""
        status = self.tuya_device.status.get(DPCODE_STATUS)
        if status == "standby":
            HASTATE = STATE_IDLE
            return "Standby"
        if status == "goto_charge":
            HASTATE = STATE_RETURNING
            return "Returning to Dock"
        if status == "charging":
            HASTATE = STATE_DOCKED
            return "Docked - Charging"
        if status == "charge_done":
            HASTATE = STATE_DOCKED
            return "Docked - Charged"
        HASTATE = STATE_CLEANING
        return "Cleaning"

    @property
    def battery_level(self) -> int | None:
        """Return Tuya device state."""
        return self.tuya_device.status.get("electricity_left")

    @property
    def state(self):
        return self.HASTATE

    @property
    def supported_features(self):
        """Flag supported features."""
        supports = 0
        supports = supports | SUPPORT_TURN_ON
        supports = supports | SUPPORT_TURN_OFF
        supports = supports | SUPPORT_PAUSE
        supports = supports | SUPPORT_RETURN_HOME
        supports = supports | SUPPORT_STATE
        supports = supports | SUPPORT_STATUS
        supports = supports | SUPPORT_STOP
        supports = supports | SUPPORT_BATTERY
        supports = supports | SUPPORT_START
        return supports

##Functions:##
    def turn_on(self, **kwargs: Any) -> None:
        """Turn the device on."""
        _LOGGER.debug("Turning on %s", self.name)

        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": True}]
        )

    def start(self, **kwargs: Any) -> None:
        """Turn the device on."""
        _LOGGER.debug("Starting %s", self.name)

        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": True}]
        )

## Turn off/pause/stop all do the same thing

    def turn_off(self, **kwargs: Any) -> None:
        """Turn the device off."""
        _LOGGER.debug("Turning off %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": False}]
        )

    def stop(self, **kwargs: Any) -> None:
        """Turn the device off."""
        _LOGGER.debug("Stopping %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": False}]
        )

    def pause(self, **kwargs: Any) -> None:
        """Turn the device off."""
        _LOGGER.debug("Pausing %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": False}]
        )

    def start_pause(self, **kwargs: Any) -> None:
        """Start/Pause the device"""
        _LOGGER.debug("Start/Pausing %s", self.name)
        status = False
        status = self.tuya_device.status.get(DPCODE_POWER)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": not status}]
        )

    def return_to_base(self, **kwargs: Any) -> None:
        """Return device to Dock"""
        _LOGGER.debug("Return to base device %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_MODE, "value": "chargego"}]
        )

@frankosborne Thank you for your code.
The vacuum cleaner will be supported in v1.3 which will be released this week.

@frankosborne vacuum cleaner is supported in v1.3, which released today.

The Readme is missing the information about these device types

I got a vacuum yesterday that was run off smart life. I got too keen to get this going so I have produced this. Likely have some code thats not needed but it got my vacuum working. Weirdly enough, HA doesnt seem to be doing anything when you call the start and pause services for Vacuums. I don't think their is anything wrong with my implementation as I cant even see the function get called. @tsutsuku. I hope this helps even a little to getting this into this repo :) I will try and clean this up a bit when I have time but it works. :)
#!/usr/bin/env python3
"""Support for Tuya vacuum."""
from __future__ import annotations

import logging
from typing import Any

from tuya_iot import TuyaDevice, TuyaDeviceManager

from homeassistant.components.vacuum import (
    DOMAIN as DEVICE_DOMAIN,
    SUPPORT_TURN_ON, SUPPORT_TURN_OFF,
    SUPPORT_STATE,
    SUPPORT_STATUS,
    SUPPORT_BATTERY,
    SUPPORT_START,
    SUPPORT_PAUSE,
    SUPPORT_RETURN_HOME,
    SUPPORT_STOP,
    STATE_CLEANING,
    STATE_DOCKED,
    STATE_PAUSED,
    STATE_IDLE,
    STATE_RETURNING,
    STATE_ERROR,
    VacuumEntity
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .base import TuyaHaDevice
from .const import (
    DOMAIN,
    TUYA_DEVICE_MANAGER,
    TUYA_DISCOVERY_NEW,
    TUYA_HA_DEVICES,
    TUYA_HA_TUYA_MAP,
)

_LOGGER = logging.getLogger(__name__)

TUYA_SUPPORT_TYPE = {
    "sd",  # Robot Vaccuum
}

# Vacuum(sd),
# https://developer.tuya.com/docs/iot/open-api/standard-function/electrician-category/categorykgczpc?categoryId=486118
DPCODE_MODE = "mode"
DPCODE_POWER = "power_go"
DPCODE_STATUS = "status"

TUYA_VMODE_TO_HA = {
    "hot": STATE_CLEANING,
    "cold": "cool",
}

async def async_setup_entry(
    hass: HomeAssistant, entry: ConfigEntry, async_add_entities
):
    """Set up tuya vacuum dynamically through tuya discovery."""
    print("switch init")

    hass.data[DOMAIN][TUYA_HA_TUYA_MAP].update({DEVICE_DOMAIN: TUYA_SUPPORT_TYPE})

    async def async_discover_device(dev_ids):
        """Discover and add a discovered tuya sensor."""
        print("switch add->", dev_ids)
        if not dev_ids:
            return
        entities = await hass.async_add_executor_job(_setup_entities, hass, dev_ids)
        hass.data[DOMAIN][TUYA_HA_DEVICES].extend(entities)
        async_add_entities(entities)

    async_dispatcher_connect(
        hass, TUYA_DISCOVERY_NEW.format(DEVICE_DOMAIN), async_discover_device
    )

    device_manager = hass.data[DOMAIN][TUYA_DEVICE_MANAGER]
    device_ids = []
    for (device_id, device) in device_manager.deviceMap.items():
        if device.category in TUYA_SUPPORT_TYPE:
            device_ids.append(device_id)
    await async_discover_device(device_ids)

def _setup_entities(hass, device_ids: list):
    """Set up Tuya Switch device."""
    device_manager = hass.data[DOMAIN][TUYA_DEVICE_MANAGER]
    entities = []
    for device_id in device_ids:
        device = device_manager.deviceMap[device_id]
        if device is None:
            continue

        entities.append(TuyaHaVacuum(device, device_manager))

    return entities

class TuyaHaVacuum(TuyaHaDevice, VacuumEntity):
    """Tuya Vacuum Device."""

    HASTATE = STATE_IDLE

    @property
    def name(self) -> str | None:
        """Return Tuya device name."""
        return self.tuya_device.name

    @property
    def status(self) -> str | None:
        """Return Tuya device state."""
        status = self.tuya_device.status.get(DPCODE_STATUS)
        if status == "standby":
            HASTATE = STATE_IDLE
            return "Standby"
        if status == "goto_charge":
            HASTATE = STATE_RETURNING
            return "Returning to Dock"
        if status == "charging":
            HASTATE = STATE_DOCKED
            return "Docked - Charging"
        if status == "charge_done":
            HASTATE = STATE_DOCKED
            return "Docked - Charged"
        HASTATE = STATE_CLEANING
        return "Cleaning"

    @property
    def battery_level(self) -> int | None:
        """Return Tuya device state."""
        return self.tuya_device.status.get("electricity_left")

    @property
    def state(self):
        return self.HASTATE

    @property
    def supported_features(self):
        """Flag supported features."""
        supports = 0
        supports = supports | SUPPORT_TURN_ON
        supports = supports | SUPPORT_TURN_OFF
        supports = supports | SUPPORT_PAUSE
        supports = supports | SUPPORT_RETURN_HOME
        supports = supports | SUPPORT_STATE
        supports = supports | SUPPORT_STATUS
        supports = supports | SUPPORT_STOP
        supports = supports | SUPPORT_BATTERY
        supports = supports | SUPPORT_START
        return supports

##Functions:##
    def turn_on(self, **kwargs: Any) -> None:
        """Turn the device on."""
        _LOGGER.debug("Turning on %s", self.name)

        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": True}]
        )

    def start(self, **kwargs: Any) -> None:
        """Turn the device on."""
        _LOGGER.debug("Starting %s", self.name)

        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": True}]
        )

## Turn off/pause/stop all do the same thing

    def turn_off(self, **kwargs: Any) -> None:
        """Turn the device off."""
        _LOGGER.debug("Turning off %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": False}]
        )

    def stop(self, **kwargs: Any) -> None:
        """Turn the device off."""
        _LOGGER.debug("Stopping %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": False}]
        )

    def pause(self, **kwargs: Any) -> None:
        """Turn the device off."""
        _LOGGER.debug("Pausing %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": False}]
        )

    def start_pause(self, **kwargs: Any) -> None:
        """Start/Pause the device"""
        _LOGGER.debug("Start/Pausing %s", self.name)
        status = False
        status = self.tuya_device.status.get(DPCODE_POWER)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_POWER, "value": not status}]
        )

    def return_to_base(self, **kwargs: Any) -> None:
        """Return device to Dock"""
        _LOGGER.debug("Return to base device %s", self.name)
        self.tuya_device_manager.sendCommands(
            self.tuya_device.id, [{"code": DPCODE_MODE, "value": "chargego"}]
        )

How can i put this information on my tuya v2? Mine vaccum get just 3 entities..... could you help me?

@freitas666  this code is in v1.3 and later versions. So what can I help you with?

@freitas666 this code is in v1.3 and later versions. So what can I help you with?

Hello @tsutsuku ... well i put my vaccum robot on tuyav2 but for me show just one entity with 3 attributes.... and this code looks like more attritubutes... how can i use this code?

According to current vacuum code paused state should be supported in status
        """Flag supported features."""
        supports = 0
        if DPCODE_PAUSE in self.tuya_device.status:
            supports = supports | SUPPORT_PAUSE

most vacuums doesnt have that attribute or doesnt report it at all. (checked via virtual devices as well). But paused definitely supported on devices and can be set. Also that status reported in current state via mode
    status={
        'power_go': False,
        'mode': 'paused',
        'direction_control': 'forward',
        'status': 'charge_done',
        'electricity_left': 100,
        'seek': True,
        'suction': 'strong',
        'clean_record': '00000000184',
        'clean_area': 0,
        'clean_time': 0,
        'cistern': 'low'
    },

can that be changed please to check supported modes and not status, as i strongly believe than that much closer to true/real values/statuses.
Also, in your code you have annotation Turn off/pause/stop all do the same thing - this is not true. All those modes are doing completely different things:

turn_off - do turn_off
pause - pause current task, when unpaused - robot continue his current task without reseting counters
stop - stop current task and reset counters.

If you need more info please let me know.
Thanks

@timota Welcome to create a PR, and I will review it.

i'm not a developer but will try my best.

@timota Hope this can help you.
https://github.com/tuya/tuya-home-assistant/wiki/How-to-Develop-a-New-Driver

This is wonderful, I got my robot vacuum cleaner to work in Home Assistant now, thanks!
Is it possible to extend the capabilities of the vacuum seen in the Home Assistant entity somehow? Now I can see only some of them like status, battery, start, stop but from Tuya IoT portal I can see more more parameters that can be set:
power | Boolean | "{true,false}"
power_go | Boolean | "{true,false}"
direction_control | Enum | {   "range": [     "forward",     "backward",     "turn_left",     "turn_right",     "stop"   ] }
mode | Enum | {   "range": [     "standby",     "smart",     "wall_follow",     "single",     "point",     "chargego"   ] }
seek | Boolean | "{true,false}"
suction | Enum | {   "range": [     "strong",     "normal",     "gentle"   ] }

Also: The Tuya Smart mobile app is able to show and reset the map where the vacuum has been cleaning and according the API documentation it should be possible to pull and reset the map also (https://developer.tuya.com/en/docs/iot/fsd?id=K9gf487ck1tlo):
request | Request data | Enum | {“range”:[“get_map”, “get_path”,“get_both”]}
reset_map | Map resetting | Boolean | {}

Is this possible to integrate this into Home Assistant entity card?

this code is in v1.3 and later versions. So what can I help you with?

was this code ported to the tuya official integration? Because it recognised my vacuum (entity vacuum.robo), but I only have start/stop actions available. No status or anything else...

Hi, I added Tuya integration for my vacuum cleaner and I got these entities:

The status of the entity vacuum.m520 is always unknown, but in Smart Life app it is correct.
Also, it would be useful to have the fault alarm sensor, as seen in the function definition list of the device on Tuya IoT Platform:
Fault Alarm - Fault Value: edge_sweep, middle_sweep, left_wheel, right_wheel, garbage_box, land_check, collision
Thank you!


PR: Improve performance when processing linting results and scrolling (Editor)

This PR does the following:

Break how we are processing linting results into two subprocesses:

Set block user data in a thread. That helps a lot when processing too many linting results.
Underline linting results only in the visible portion of the editor. This also helps performance.

Update decorations after a small timeout. This prevents multiple updates being called almost at the same time.
Paint all decorations only in the visible portion of the editor.
Remove repeated calls to highlight_current_cell.
Add buffer around the visible portion of the screen to give a more fluid experience when updating decorations.
Fix scrolling sluggishness in split editors without focus.

Fixes #13020.
TODO:

[ ] Add tests for highlighting cells, occurrences, find results and underline errors.

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

In the file spyder/plugins/editor/utils/decoration.py:

Line 27:20: E261 at least two spaces before inline comment

@dalthviz, please help me to test if this solves the sluggishness reported on issue #13020.
@CAM-Gerlach, please help me to check if this solves #8864.

@ccordoba12 Sorry for the delay, testing in work now.

@ccordoba12 it seems like the underline error performance improved (although as @CAM-Gerlach says there is now a little delay when scrolling to see again the underlines)

it seems like the underline error performance improved

How much has it improved? I mean, would you way issue #13020 is fixed by this PR?

Hey @dalthviz can you suggest an objective test I can perform to quantify this, besides the above? The results of my benchmarks indicated around -10 to +20% change, or around ~5% average (since most tests showed no change), in basic text editing responsiveness (the problem cited in #13020 ), on a 1200p monitor with a margin of error of ~10-20%. for individual tests and ~5% average. In particular, typing speed (the main objective metric cited in #13020 ) regressed by 10% under default settings, improved by 7% with defaults + indent guides, and showed no change with all decorations enabled minus indent guides, which is all within the margin of error for the tests and likely not significant.

@max3-2 and @mrclary would you like to test this, either with similar benchmarks as I execute above or with those that better reflect the specific issues you're seeing? Thanks!

@CAM-Gerlach probably doing a profiling could be helpful using the same context as explained here: https://github.com/spyder-ide/spyder/issues/13020#issuecomment-654848318 by @colinww

@max3-2 and @mrclary would you like to test this, either with similar benchmarks as I execute above or with those that better reflect the specific issues you're seeing? Thanks!

I'll take a look...

I just spent a few minutes browsing the same file as before lib/python3.7/site-packages/CppHeaderParser/CppHeaderParser.py and I can confirm the UI is night and day better. Scrolling is faster, cursor lag is basically gone, and the file has a ton of linting errors that don't seem to slow the editor down at all. On the release version, drawing the under squigglies seemed to be the main culprit for slowdown.
When I cloned the repo I did notice it updated my python to 3.8.3, and ipython as well as a dozen other packages. So I can't confirm exactly this PR is responsible for the whole delta but it is so much better I am just going to start doing my normal work in this dev environment.

@colinww Thanks for the feedback! Do you think you could to the 4.x branch and this PR to confirm the difference? Launching Spyder from a development branch uses a different set of settings, and there have been other recent changes targeted at improving performance, so that would help isolate the impact of this one.
I'm not sure why I'm not seeing it in any of my benchmarks—what monitor size, OS version and CPU/machine are you using? Any ideas for something else I can test that will expose the difference?
@ccordoba12 Maybe I'd see more of a difference if I tested with just the decorations this PR affects, e.g. if I enable the code style linting and underlines but not showing blank spaces (which introduce considerable lag of their own)? Any tips here?

I have a work deadline so I will need a day or two to try this out.
The machine I am on now is a 16" MBP, it has a 8 core i9, 64GB RAM, 3840x1600 screen. In our office, we run spyder on servers running Centos 6, Thinkpad laptops running windows 10, and the same laptops running the linux version of spyder through WSL/Ubuntu. In terms of this editor/GUI lag, I think the worst is on native Centos 6, then probably OSX, then WSL/Ubuntu, then Windows. In Centos 6, even though our servers are 64 core with 2TB RAM, it was so unusable we actually setup samba mounts so people could edit their files through windows version of spyder. For some reason, it just doesn't seem to be as bad on Windows.

Thanks for the improvement! I'll give it a test until the weekend and report back, won't make it any earlier sorry.

I did some "not-benchmarking" tests with some larger files and while it is better, it still seems to be there, again especially on larger files >1500 lines. I have the snakeviz
profiling attached. The remove seems to be gone though. I tested with decorations off and on...
spyder.profile.zip

I did not observe an improvement for typing in the editor.
I did not observe an improvement for scrolling in the editor.

Attached are my profiles with and without indent guides enabled.

with IG: indentationguides.py paintEvent is prominent
without IG: editor.py focus_changed and refresh are prominent

I have discovered an interesting phenomenon.
With IG on and window split vertically, both top and bottom splits' scrolling are sluggish. However, with IG off and the editor window split vertically, the top split scrolling is still sluggish while the bottom split scrolling is snappy (?!). Attached gif illustrates.

![Screen Recording 2020-07-20 at 7 44 41 AM mov](https://user-images.githubusercontent.com/9618975/87954217-e6701e00-ca60-11ea-8f18-b8cc4191ec58.gif)
spyder-profiles.zip

I have discovered an interesting phenomenon.
With IG on and window split vertically, both top and bottom splits' scrolling are sluggish. However, with IG off and the editor window split vertically, the top split scrolling is still sluggish while the bottom split scrolling is snappy (?!). Attached gif illustrates.

I can reproduce. However its the smaller window which is snappier with scrolling. I can have 3 or more and its still improving. However when using a number of windows and resizing one to be almost as large as having one, its back to slow again.
Also, this only affects scrolling, typing is still slow!

I've noticed something else that may be informative...
Sluggish scrolling seems to go away as soon as there is any interaction with the scrollbar or scrollflag.
When I move the scrollbar or scrollflag with the mouse pointer, even a little, then try scrolling again with swiping, it is real snappy.
When using a split window, this causes the other split to become sluggish, until I diddle the scrollbar.
This behavior manifests independent of code-folding or indent guides.

I've noticed something else that may be informative...
Sluggish scrolling seems to go away as soon as there is any interaction with the scrollbar or scrollflag.
When I move the scrollbar or scrollflag with the mouse pointer, even a little, then try scrolling again with swiping, it is real snappy.
When using a split window, this causes the other split to become sluggish, until I diddle the scrollbar.
This behavior manifests independent of code-folding or indent guides.
There is no affect on typing speed.

The above statement regarding the scrollbar and scrollflag is not entirely accurate. I've discovered that whichever window has cursor focus scrolls smoothly. This is in contrast to mouse focus. I cannot speak for other platforms, but on MacOS, scrolling is possible when the mouse is hovering over a window, regardless of where the typing cursor has focus. If the typing cursor has focus on the window which is scrolled, it scrolls smooth. If the typing cursor has focus elsewhere (Console or other split Editor) then the scrolling will be sluggish. Interacting with the scrollbar or scrollflag actually brings the typing cursor focus to that window, which is why I thought they were related to the issue.
Perhaps this will help further our search for a solution.

I cannot speak for other platforms, but on MacOS, scrolling is possible when the mouse is hovering over a window, regardless of where the typing cursor has focus.

@mrclary, thanks a lot for your feedback! I think I solved this issue in my last commit. Could you try it and let me know if it works for you too?

I’m on vacation right now, but will take a look as soon as I can.
Thanks,
Ryan Clary

On Sep 5, 2020, at 10:46 PM, Carlos Cordoba<EMAIL_ADDRESS>wrote:

I cannot speak for other platforms, but on MacOS, scrolling is possible when the mouse is hovering over a window, regardless of where the typing cursor has focus.
@mrclary, thanks a lot for your feedback! I think I solved this issue in my last commit. Could you try it and let me know if it works for you too?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@ccordoba12, sorry for the late response.
I still see sluggish scrolling with your latest commits. I'm not sure why it works smoothly when the text cursor is in the editor, but sluggish when it isn't.

I also just discovered another idiosyncrasy which may help isolate the issue.
Recall that when the Editor is docked, regardless whether the Editor is split or not, any Editor pane without type cursor focus would scroll sluggishly.
However, if the Editor is undocked then the behavior is changed in the following way.

If the Editor window does not have focus, any Editor pane will scroll smoothly.
If the Editor has focus, then only the Editor pane with type cursor focus will scroll smoothly.

This is true for previous Spyder commits as well as the latest commits in this PR.

@mrclary, I think I finally fixed the sluggishness when scrolling in split editors. Please try again.

@mrclary, I think I finally fixed the sluggishness when scrolling in split editors. Please try again.

SHAZAAM! Great work @ccordoba12! I can no longer reproduce sluggish scrolling under any circumstance!

@ccordoba12 I can test as well to see if, and how much, it makes a difference with the other metrics I report above.

@ccordoba12 I can test as well to see if, and how much, it makes a difference with the other metrics I report above.

Thanks for the offer @CAM-Gerlach, but I think @mrclary and @colinww have confirmed this is working for the issues they've observed.
I took a look at our indent guides and found they are updated using a different mechanism than decorations. So I need to open a new PR for that (to not make this one larger than it already is). Then, I'll give you a ping to help me test that one.

Okay, great. In my quick testing, as before I didn't observe a significant difference between this branch and 4.x in the major responsiveness metrics I tested, but I presume those aren't the target here.
There appeared to be a substantial regression in performance across both branches since my last test (everything is about 30-40% slower, similar to or greater than the difference between having no vs. all annotation features enabled minus indent guides), either due to updated dependency versions, common changes between branches, differences in my system resource utilization/background tasks, etc., but this doesn't appear to be related to this PR.

I ran some additional tests targeted at the specific indicators @ccordoba12, specifically related to scrolling speed with and without decorations (style linting and underlining) enabled. All tests were done in spyder/app/mainwindow.py as before (a ~4000 line file with hundreds of style warnings), around line 1000 for the non-full document tests.
Scrolling 100 lines with arrow keys, with the start line initially positioned at the edge of the window in the scroll direction:
No decorations, 4.x: 14.5-15 lines/s (down), 14.5-15 lines/s (up)
No decorations, this PR: 15-15.5 lines/s (down), 114.5-15 lines/s (up)
Decorations, 4.x: 13.5-14 lines/s (down); 13-13.5 lines/s (up)
Decorations, this PR: 14-14.5 lines/s (down); 13-13.5 lines/s (up)
Scrolling 3675 lines (full file) with pageup/pagedown keys:
No decorations, 4.x: 1050-1100 lines/s (down), 1050-1150 lines/s (up)
No decorations, this PR: 1050-1100 lines/s (down), 1050-1150 lines/s (up)
Decorations, 4.x: 700-900 lines/s (down); 700-1000 lines/s (up)
Decorations, this PR: 700-900 lines/s (down); 700-100 lines/s (up)
So, in these tests, this PR makes no significant difference.
However, scrolling with the mouse scrollwheel over a separate editor panel in which the textcursor is not focused seems to be necessary to trigger the main behavior as @mrclary and others have reported, as what was reported is that the major slowdown only happens in Editor panels in which the textcursor is not focused, which is necessary for keyboard-based scrolling.
Indeed, in my qualitative testing, I was able to apparently repro this: scrolling is substantially smoother in Editor panels that have focus on 4.x and quite jerky on others, while it is equally smooth on both using this PR. I can try to script this with AHK, but it appears most of the problem is with laggy updates and jerky movement, which is much harder to measure quantitatively than simply speed (though I can try to measure the lags if they're long enough, it will be pretty imprecise).
I could record my screen and measure update framerate with various settings, but that would be pretty time-intensive for uncertain gains. Given scrolling is already very smooth for me even in a large file (mainwindow.py, 3700 lines) and I don't see any perceptible lag in decoration updates, not sure its worth tuning much further but I would appreciate the feedback of other users as well.

One minor note: _ is used as a dummy variable, but it is mapped to gettext elsewhere, so by our convention and to avoid any confusion or spurious grep/find in files results for it, I suggest using the standard __ instead (there were 5 instances, all in the unit test file).

Good point. I addressed that in my last commit.

Oh and also @ccordoba12, seems like a PEP8 issue remains:

Hello @ccordoba12! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
In the file spyder/plugins/editor/utils/decoration.py:

Line 29:20: E261 at least two spaces before inline comment

Comment last updated at 2020-09-22 17:36:37 UTC

Oh and also @ccordoba12, seems like a PEP8 issue remains

Good eye! Fixed in my last commit.


[Bug]: Cannot make connection after enabled MFA

What happened?
Cannot make connection after enabled MFA. I am pretty sure I typed the correct password and username but i dont get a prompt to input my MFA, very annoying and it just straight away go to fail. MFA is very common practice please fix!
What version of the tool are you using?
v2.2.0
What version of Visual Studio Code are you running?
1.85.2
Any relevant session id from VSCode?
dd974e4a-9da3-4804-825d-bcad0b149c301729167068154
Relevant log output
VSCode version: 1.85.2.
Extension version: 2.2.0.
Error occured in connectDataverse command.
Error code: undefined.
Error message: undefined.
Error stack: undefined.

Use any other type of connection when MFA is enabled. MFA dont work on username and password and that is by design from Microsoft.


refactor: move material about the Dominated Convergence Theorem into one file

Suggested by @loefflerd.
Only code motion (and cosmetic adaptions, such as minimising import and open statements).
Pre-requisite for #11108 and (morally) #11110.

Here's a useful hack for fixing downstream imports when you've moved a lot of code around.

Make a temporary file in mathlib which has no content, but imports all the other files you've changed in the refactor.
Make every file elsewhere in mathlib which imported one of the changed files import your new temporary file.
Let CI run on this, and then do lake exe shake --fix.

FWIW, I'm not sure if there's a standard convention about copyright / author declarations for newly-created files which are made up of code moved from elsewhere in a refactor, but I usually handle this by copying across the author names from the previous files.

Thanks for the suggestions. These are really helpful, going forward --- my current approach was a bit tedious.
The imports were basically already fixed, so I didn't need your approach this time. For the copyright, used git blame (on mathlib :-(, the history merge would have been useful) to find the main authors of the respective lemmas.
I have merged master, completed the module docstring and fixed the copyright. This is ready for review again.

awaiting-review

maintainer merge

bors r+
Thanks!


Installation problem on Ubuntu 20.04 & tone mapping function in linux SDK

Hi, Sorry i'm a novice in linux.
I have a system in ubuntu20.04 with anaconda3.
I followed the guide on building tiscamera on github.
However if "cd build" it didn't work.
for  configuration
i did
cmake -DBUILD_TOOLS=ON -DBUILD_V4L2=ON -DBUILD_LIBUSB=ON
then
make
sudo make install.

at first it should error that
 ImportError: No module named gi
then later found it's due to installation path and the anaconda path not linked
i did
ln -s /usr/lib/python3/dist-packages/gi /home/davince/anaconda3/lib/python3.8/site-packages/
and it didn't have a problem with gi but i still cannot initiate tcam-capture, this error appears.
(base) davince@davince-Alienware-m15:~/Downloads/tiscamera$ tcam-capture
Traceback (most recent call last):
  File "/usr/bin/tcam-capture", line 28, in <module>
    from tcam_capture.TcamDevice import TcamDevice, TcamDeviceIndex
  File "/home/davince/anaconda3/lib/python3.8/site-packages/tcam_capture/TcamDevice.py", line 23, in <module>
    from gi.repository import Tcam, Gst
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/importer.py", line 146, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/home/davince/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/overrides/Gst.py", line 608, in <module>
    real_functions = [o for o in inspect.getmembers(Gst) if isinstance(o[1], type(Gst.init))]
  File "/home/davince/anaconda3/lib/python3.8/inspect.py", line 350, in getmembers
    value = getattr(object, key)
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/module.py", line 163, in __getattr__
    setattr(wrapper, value_name, wrapper(value_info.get_value()))
ValueError: invalid enum value: 51202

I wonder if you can help me? or is ubuntu20.04 not supported. (my system wifi doesn't play well with 18.04)
Other questions i have:
2.  is the tone mapping function and the automatic white balancing available in the python sdk?

Is tiscamera working on NVIDIA's Jetpack?

If "cd build" does not work, then you did not made "mkdir build" before.
Please follow the steps:
git clone https://github.com/TheImagingSource/tiscamera.git
cd tiscamera
sudo ./scripts/install-dependencies.sh --compilation --runtime
mkdir build
cd build
cmake -DBUILD_TOOLS=ON -DBUILD_V4L2=ON -DBUILD_LIBUSB=ON  ..
make
sudo make install

Stefan

ok i see.
I didn't include the ..
I have redone all the steps again. the error persists:
Traceback (most recent call last):
  File "/usr/bin/tcam-capture", line 28, in <module>
    from tcam_capture.TcamDevice import TcamDevice, TcamDeviceIndex
  File "/home/davince/anaconda3/lib/python3.8/site-packages/tcam_capture/TcamDevice.py", line 23, in <module>
    from gi.repository import Tcam, Gst
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/importer.py", line 146, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/overrides/__init__.py", line 118, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/home/davince/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/overrides/Gst.py", line 608, in <module>
    real_functions = [o for o in inspect.getmembers(Gst) if isinstance(o[1], type(Gst.init))]
  File "/home/davince/anaconda3/lib/python3.8/inspect.py", line 350, in getmembers
    value = getattr(object, key)
  File "/home/davince/anaconda3/lib/python3.8/site-packages/gi/module.py", line 163, in __getattr__
    setattr(wrapper, value_name, wrapper(value_info.get_value()))
ValueError: invalid enum value: 51202

Hello
Please let me know, which camera model you use.
Also: Anaconda creates many problems. Please use a non Anaconda Python.
Stefan

it's a DFK 37BUX178
it is an issue our software needs to build around anaconda python....
i'll try on standard python

Hello
Please show the stack trace.
Stefan

Sorry how do i do that?

i saw this here about USB3vision.
https://theimagingsource.deskpro.com/en/kb/articles/usb3vision-instead-of-v4l2-for-usb-cameras
should DFK37BUX178 installation follow this one as well?

On Xavier NX with the driver binary (0.13.1) it's working.
Another question:
Is tone mapping available in linux with ARMv8 architecture?
it's not shown in the tcam-capture.
I wonder if it's available. it will be a very necessary function for us.

It seems, tcam-capture wont run in Anaconda environment.
The call stack is the trace back you posted above.
It is not related to python 3.8. It runs well on on all my Linux computers.
I did not found any hints to the gi/moduly.py error "ValueError: invalid enum value: 51202" in the internet. The error does not relate to our modules, but to Anaconday and gi. Therefore, you may ask the Anaconda programmers about this error and its meaning.
The camera uses v4l2, not USB3Vision by default.
You wrote "still the same error message." Which is that? If it is the same as you wrote above, then you are still using the Anaconda environment.
However, if you start Python in Anaconda (I never used that, therefore I might be not exact), what happens after you enter
import gi
from gi.repository import GLib, GObject, Gst, Tcam
gi.require_version("Gst", "1.0")
gi.require_version("Tcam", "0.1")

Please enter that line by line in Python and see, what happens.
Stefan


[release-0.46] Backport #1024

Description
Backport of #1024 to release-0.46.

/test-examples="examples/ec2/vpc.yaml"


CFP: make cilium-agent freak out if rp_filter config is wrong

Cilium Feature Proposal
When upgrading our Kubernetes workers from Ubuntu 20.04 -> 22.04 we encountered the issue described in #10645, since Ubuntu 22.04 ships with systemd 249.
The workaround is described in the System Requirements page, but I only managed to find it there because I was looking for it (I ran into this issue a few weeks ago trying to run Cilium on my local Arch workstation).
Given that the failure mode is really weird (host networking pods work fine, networked pods work fine when talking to same node), perhaps it would be worth checking the sysctl setting during cilium-agent startup, and fail to boot if it's not correctly set?
With Ubuntu 22.04.1 (the "real" LTS release, as everybody knows) around the corner, I suspect that many Cilium users are going to encounter this issue in the short term. Adding a check could save them (and folks responsible for Cilium issue triage!) a lot of time :)

Thanks for the proposal.
My understanding of the issue is that Cilium attempts to configure the rp_filter settings, but systemd unfortunately overrides Cilium's configuration. Perhaps getting Cilium to instead detect & fail out is part of a better solution where we ensure that the rp_filter configuration is correct in the first place (ie the nodes are configured correctly).
I suspect that what we'll want to do is something like, provide an option for Cilium to configure the nodes if the administrator has not prepared the nodes for Cilium to successfully operate. If this setting is enabled, an init container of cilium-agent (or node-init DS) will attempt to create the systemd configuration to ensure that rp_filter is correctly configured on the node. Then separately, Cilium-agent could detect if this setting was configured or not and fail out if the configuration will cause problems later.
Another longer-term change would be to re-evaluate the datapath configuration that imposes the rp_filter requirements and see if we can rework those to avoid the dependency on rp_filter. But I think that this is a bigger effort than just ensuring that Systemd is configured in a way that it avoids clobbering Cilium's configuration.

@joestringer One more solution would be to create a controller (in cilium-agent) which would be responsible for periodically monitoring rp_filter values of its managed devices, and reporting to user (e.g., via a log msg) if they change.

@dylandreimerink besides what we discussed offline, Martynas' proposal can also be done as an fallback as well.


Refactored mask detection demo

Demo
https://user-images.githubusercontent.com/18037362/171852659-2b0d127d-5b45-4c8f-b0a8-cc152f5a92a0.mp4
TODO:

[x] Use blobconverter to download SBD-Mask model from Depthai Model Zoo (DMZ)
[x] (Optional) removing dependency for scipy (required by log_softmax())?

LGTM


Cannot spread item object

Describe the bug
I have this code:
const { rows } = await db.executeAsync(query, [
    id
]);

const data = [];

for (let i = 0; i < rows?.length; i++) {
  const item = rows.item(i);
  data.push({
    ...item,
    properties: JSON.parse(item.properties || '[]')
  })
}

return data;

Even though the item has many properties, when returning the data array the only property is properties. I tried with Object.assign and i received this error Exception in HostObject::set for prop 'properties': Unknown JSI ArrayBuffer to variant value conversion, received object instead of ArrayBuffer.
Versions:

OS and version: Android 11
op-sqlite version: latest
RN version:  0.73.5
New Architecture: No
Reproducible example
Create a minimal reproduction example, otherwise I won't take a look. I'm serious, no example = no solution.

The objects returned are not regular JS Objects, but rather HostObjects, some operations won't work.
As for trying to assign any object to a property, unfortunately, that won't work. The object is trying to be cast into an ArrayBuffer because storing an object is not possible on the C++ side. On the C++ side properties need to be stored and cast to C++ types. Mostly to prevent race conditions and de-allocation between
Basically, not a bug, but rather a limitation of HostObjects.
Also FYI {...item, blah: 'foo'} gets transpiled to Object.assign(item, {blah: 'foo'}, so you are not creating a new object and that's why you are getting this error. So you really want to create a new object first and then spread the rest.

Ok I got it. So the only way is creating a new object with all the properties returned from the item object and assign them to the new object by referencing them directly? I'm trying to migrate from react-native-sqlite-storage and I use the spread operator thing most of the times in my code that's why I'm asking.

You probably need something like a shallow clone that copies all the 1st level dependencies and then just assign the parsed properties
let obj = {}
shallowClone(results._array[0], obj)
obj.properties = JSON.parse(obj.properties)

You probably need something like a shallow clone that copies all the 1st level dependencies and then just assign the parsed properties
let obj = {}
shallowClone(results._array[0], obj)
obj.properties = JSON.parse(obj.properties)

Isn't doing a shallowClone defying the whole purpose of using a HostObject in the first place? You have to copy all the rows metadata and values into plain JS object, which probably ends up using more memory and time than just returning a plain JSI object, right?
Would still love an option to opt out from HostObjects: some people (like me) would be ok with paying a bit of a higher price for the JS object creation if that means that we don't break the lang semantics (like HostObjects do). Just giving feedback, as this can become a deal breaker. We will now evaluate performance with shallow clone vs alternatives (rn-quick-sqlite, expo sqlite).
Thanks for you work, really appreciated!

You can use exec raw which will return an array without the keys it will be faster than expo and quick. Otherwise quick and expo are the same besides API differences, not much left to optimize.

Also, adding properties to host objects has been added as a feature on the latest versions. You are better off reading the docs than commenting on old issues.


slider doesn't slide properly on view controller who is presented modally

New Issue Checklist

[ ] Updated RangeSeekSlider to the latest version
[ ] Checked Gitter

Issue Description
Environment

I have the same issue with the latest version

I was using TTRangeSlider the version in objc and I had the same issue in the modal of ios 13.
I was able to solve the problem using this on the Range Slider
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
    if([gestureRecognizer isKindOfClass:UIPanGestureRecognizer.class]){
        UIPanGestureRecognizer *gesture = (UIPanGestureRecognizer *)gestureRecognizer;
        CGPoint velocity = [gesture velocityInView:self];
        return fabs(velocity.y) > fabs(velocity.x);
    }
    return true;
}

I confirm that VittoriDavide's solution perfectly works, thanks a lot, here is the swift equivalent
open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {         if gestureRecognizer.isKind(of: UIPanGestureRecognizer.self) {             let gesture = gestureRecognizer as! UIPanGestureRecognizer             let velocity = gesture.velocity(in: self)             return abs(velocity.y)>abs(velocity.x)         } else {             return true         }     }
This is to place inside class RangeSeekSlider defnition

Trying the swift version above and it hasn't solved the issue for me on a modal.
To confirm @NRJMons - you added this inside the below within RangeSeekSlider.swift ?
@IBDesignable open class RangeSeekSlider: UIControl {

Another solution is to not use it in IB but add it programmatically. It works then.

I am still facing this issue by following above solutions.


[Rewrite] Thoma Fiery Collapse damage calculation is missing several multipliers

https://gcsim.app/viewer/share/6ikJsaoJdwIuKcEGF26pX

Fiery Collapse damage seems unusually low.

In the calc debug display several fields like attack are zero

this will be fixed by #684


Add kb/s for videos in details

Seems easy to add, may be useful to some 🤔

Hello, could I be assigned to this issue? :)

Hello Boris, I'm a bit lost in the project. I have inserted "bitrate" to ImageElement interface and have made function getBitrate in main-support.ts. I am struggling with what to do next, I can't find where exactly to use it now to make it show in video details. Could you help me? :)

You're doing great! I'm glad you were able to get the bitrate from the FFprobe output 🎉
The last part should be rather straight-forward 🤞
Once the bitrate is part of the ImageElement - you just have to display it:
https://github.com/whyboris/Video-Hub-App/blob/main/src/app/components/meta/meta.component.html#L37
Add a line there and it should show up for every details view 😎

I think i got it, my formula for calculating bitrate was ((fileSize/1000)/duration). Do u want it like that? Ot should i change it to ((fileSize/1024)/duration)? In the end, I rounded it up, so it looks better.

Looks great 😍
Rounding up is a great idea. Calculation I'm unsure whether 1000 or 1024 is the right approach - I wonder if Windows does it correctly (when you right-click on video, go to details and see the bitrate). But don't sweat it too much, I could double-check later too 👌
I wonder if it's most-common nowadays to have bitrates of closer to 5,000 - so maybe mb/s rather than kb/s is better? 🤔

(my windows is in my native language, dont get too scared :D )
So, windows shows in video details, that bitrate is 1205 kbps which converted to kb/s is 150.6, rounded up is 151 kb/s.

So that means, my calculations should be okay :D
If u want mb/s, it's not a problem. I know, when u have like 60GB Blurays, it can be a bit too much numbers :D

This is what I got now :) Should I create pull request, so you can take a look? :)

Looks beautiful! I bet I'll accept the PR with no requests for modification 😉 🤝 😁

Thank you for the PR 🙇 #714 -- looking forward to merging soon 😁

Thank you @jozefkopcak for adding this feature to Video Hub App 🎉
I appreciate it 😊


Mute unused semicolon warning

Latest rust complains

CI fails because of formatting, which is fixed in #193.


sdn-features-packet-transforms-images

Replaced 2 images.

@KrisNey-MSFT I fixed the images. Please, verify.


Al2s support

Changes to support AL2S provisioning used by Fabfed
#325

@sajith - Not sure what's the issue with black. I don't see any errors when I run it in my local env both with python3.9 and python3.11

@kthare10 Do you have black 24 in your local environment?  We upgraded from black 23 in https://github.com/fabric-testbed/fabrictestbed-extensions/pull/311...
You can run tox -e format so that the correct versions of black and isort will run.

@sajith I seem to have the correct version.
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$ tox -e format
format: install_deps> python -I -m pip install 'black==24.*' 'isort==5.*'
format: commands[0]> black fabrictestbed_extensions tests
All done! ✨ 🍰 ✨
39 files left unchanged.
format: commands[1]> isort fabrictestbed_extensions tests
  format: OK (7.41=setup[3.27]+cmd[3.68,0.46] seconds)
  congratulations :) (7.49 seconds)
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$ git status
On branch al2s-support
Your branch is up to date with 'origin/al2s-support'.

nothing to commit, working tree clean
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$ python --version
Python 3.11.6
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$
(cli) RENCI_C02G902WML86:fabrictestbed-extensions kthare10$ pip list | grep black
black                      24.4.2

@kthare10 Huh, that is annoying. Let me look into that.

@kthare10  Oh now I know what is going on. :-)
The pull_request_target trigger causes the base of the branch (e9ceeac873975c8a1047ef22c38c251d5977c466) to be checked out, not the HEAD of the branch, and there is code in the base that black do not like.  I think only the signed commits check recommends using pull_request_target as the trigger.
I will do some clean up in a separate PR.  For the purpose of this PR, we can treat black's output like noise.


Create simple e2e test for one of the cloud run services

E.g. for the data serving service, it could be a placeholder test that invokes the service and ensure it returns “Hello World”

@mayaspivak were you thinking that these tests should use the Test deployment or that they would stand up their own instances in the same process? I can see a case for either, just wondering which you were thinking of when you added this.

I was thinking they would use the test deployment so they would run after the terraform steps update the test deployment.


ExecuteQuery - Add support for managed identity authentication

See the following links:
https://learn.microsoft.com/en-us/azure/azure-sql/database/authentication-azure-ad-user-assigned-managed-identity?view=azuresql
https://learn.microsoft.com/en-us/azure/app-service/tutorial-connect-msi-sql-database?tabs=windowsclient%2Cefcore%2Cdotnet
Essentially we should use Microsoft.Sql namespace, currently we are using System.Data.SqlClient for making queries.
The task need investigating as well as in - what are the consequences for current users if we just switch over to the new DLL (Microsoft instead of System). If this would be a problem for older SQL servers for example. If it would be a problem, then - is it possible to use both libs alongside each other and autodetect the managed identity from connection string
Should be done by August

Closed by #49


Pointer init issue

I have Win 10 x64 bit and VS 2015 Community and FFMPEG latest from the branch built successfully.
After successful compilation of your code, as soon as I run Debug/x64 or Release/x64 on a Win 10 machine, I get the following run time error:

Any thoughts what is wrong ?

Here is the link to Windows mini DUMP file, you can use WinDBG to view it.
https://www.dropbox.com/s/xceke8b6ukxiifq/D3DVideoPlayer.zip?dl=0


oxc_resolver benchmark is not fully correct

Hi oxc project team
Thank you for very fast and useful tool/project. I am tested oxc_resolver and it's ~2-3x faster, not ~28x.
Source is here

  resolve(`${process.cwd()}/package.json`);

This is a simple absolute path read, a 2-3x gain is already impressive.
The data I picked is here: https://github.com/oxc-project/bench-nodejs-resolver/blob/53e50676ff1108bbc92764103e7c45a49db710d0/index.mjs#L15-L20
which is a more typical work load where we resolve module names.

btw process.cwd() may have a slight performance penalty, which should be moved to the outside of the loop.

Thank you for reply @Boshen
I updated the example and now it's only 30-50% faster, even not 2x faster.
Maybe we can create resolver for eslint-plugin-import?

Maybe we can create resolver for eslint-plugin-import?

We may have a better chance engaging with eslint-import-resolver-typescript. I have the plan here https://github.com/oxc-project/oxc_resolver/issues/29, but I don't have the time to work on it.

I updated the example and now it's only 30-50% faster, even not 2x faster.

Yeah benchmark is hard ... benchmarking in node.js is even more difficult. The numbers I have are collected from my crappy machine.
Btw my benchmark is comparing against enhanced-resolve, which is super slow.
node.js's built-in should obviously be faster.

Closing as resolved - the reported benchmark is comparing against Node.js, not enhanced-resolve.

btw, the call to require.resolve(file) invokes the require cache after the first invocation :-)


[CELEBORN-1012] Add a dedicated internal port in Master to talk to Workers and other Masters

What changes were proposed in this pull request?
With authentication (CELEBORN-1011), the handling of messages from Client by Celeborn services (Master/workers) will go through a SASL handshake. However, messages exchanged between Masters and Workers will not.
With a single netty server on the Master/Workers handling both client and master/workers messages, differentiating between the two types of connection is a challenge. It will be better if Master/Workers have a separate designated port for Clients and a separate one for internal components (workers and other Masters).
In this change, we propose

the config that enables creating dedicated internal ports on Masters/Workers.
creation of the dedicated internal port in just the Master. A subsequent PR will add that creation of the dedicated internal port in Workers.

Why are the changes needed?
This change is required for adding authentication. (CELEBORN-1011).
Does this PR introduce any user-facing change?
Yes, there are new configurations added.
How was this patch tested?
Added a UT

@mridulm @waitinfuture @RexXiong @FMX @pan3793 @akpatnam25 Please help review

Thanks! Merged to main(v0.5.0)


Add pytest option to log image differences to CSV file

Currently image comparison tests either pass or fail, and there is no logging of how much each generated image differs from its image baseline. This PR adds a pytest option pytest --log-image-diffs that logs all the image differences to the file result_images/image_diffs.log, and this is enabled in test github actions so that the logs will be added to the uploaded artifact.
It will be possible to analyse the results to see if there are any particular hardware/OS combinations that give worse results than others (although still within the allowed difference limits).

This approach doesn't work with pytest-xdist so need to think of another solution.


Implement Session Keys

See https://github.com/helium/proto/pull/359

You're welcome to use my #241 branch, where I wrote a hpr_session.erl.


change behaviour of reorderTables: allow True, None and False

I believe the current behaviour of reorderTables argument in TTFont.save function is wrong, or at least is a bit misleading.
It's clear what reorderTables=True means: i.e. set the table order to the one recommended by the OpenType specification.
However, when one sets reorderTables=False, one may wish that the "original" input font's table order would be kept upon saving. However, that's not the case because the input font's table order as stored in the SFNTReader entries offset attribute is simply ignored. Actually, the final order is just random. It basically is whatever order fonttools finds more convenient when recompiling the tables: i.e. based on whether a table has been loaded, and whether it's compilation depends on some other table being compiled first.
OK, I know the table order is meaningless from a functional point of view. And of course, such an "original" table order would be even less meaningful if a font was loaded from XML, in which case there's no reader object to read the table offsets from.
But anyway, I would like to propose to slightly change the current behaviour of reorderTables, so that it accepts three instead of the current two values:

True: the current default, reordering by OT spec recommended order.
None: don't care about table order, use whatever order is faster and more convenient (this is equivalent to the current False).
False: try to keep the input font's table order if it was loaded from binary file, or else same as None.

For example, say I load a font and save it back to a new file with reorderTables=False without doing anything else in between. If the original sfnt directory was valid, and inter-table padding was correct, etc., I would expect the input and output fonts to be identical to each other.
>>> font = TTFont("font.ttf", recalcBBoxes=False, recalcTimestamp=False)
>>> font.save("font_new.ttf", reorderTables=False)
>>> exit()
$ diff font.ttf font_new.ttf
$ echo $?
0

WDYT?

SGTM.  How about using an OrderedDict?

I forgot to mention another thing about this patch, which is the ability to save a font to an unseekable stream such as stdout.
The SFNTWriter needs to seek back and forth. So I just pass the writer a BytesIO stream instead of the output file, and write to the latter only once at the end.
I should have probably split this in the two separate commits..

Yeah, just verified what you are doing there.  Looks good.

do you mean, the TTFont.tables dictionary or the SFNTReader and SFNTWriter tables dict?
Changing the former would produce too many changes. Yes, the latter could be turned into OrderedDicts if you like (then I should also change WOFF2Reader and WOFF2Writer for consistency)

since I'm changing the save function, can I also get rid of the makeSuitecase argument?
Remember we have removed the SFNTResourceWriter class from the macUtils module, as it's no longer supported on OSX.

do you mean, the TTFont.tables dictionary or the SFNTReader and SFNTWriter tables dict?
Changing the former would produce too many changes. Yes, the latter could be turned into OrderedDicts if you like (then I should also change WOFF2Reader and WOFF2Writer for consistency)

I meant the latter.  It looks rather redundant to me to keep tables and table_order separately, whereas OrderedDict is exactly the combination of those two.  Use your judgement though, I don't have a strong opinion here.

since I'm changing the save function, can I also get rid of the makeSuitecase argument?

Don't touch in the same commit definitely.  Also, who knows which downstream library is sending us makeSuitecase=False right now.  Lets not break anyone unnecessarily...

ok, i'll do it separately. However, I believe we should at least raise NotImplementedError

OK, I now use OrderedDict in sfnt now and get the sorted keys().

Thanks!


Problems with installing the script

I tried to install the script but in the cmd prompt i got the following error message and do not see the script or the depth tab:
Error loading script: depthmap.py
Traceback (most recent call last):
File "C:\Users\Five-\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
script_module = script_loading.load_module(scriptfile.path)
File "C:\Users\Five-\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\Five-\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 58, in
from inpaint.mesh import write_mesh, read_mesh, output_3d_photo
File "C:\Users\Five-\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\inpaint\mesh.py", line 16, in
from moviepy.editor import ImageSequenceClip
ModuleNotFoundError: No module named 'moviepy'
Is there a solution for that or what i am doing wrong ?

I had the wrong python version installed, after deinstalling python 3.10.11 and reinstalling 3.10.6 it now seems to work

Topic closed


Copy and paste from the Windows Terminal doesn't include line breaks

Environment
Windows build number: 10.0.18362.116
Windows Terminal version (if applicable): 71e19cd + changing toolset to v142 and SDK version

Steps to reproduce

Clone, build, package, install and launch Windows Terminal (DevBuild).
Execute docker run --rm -it mcr.microsoft.com/windows/nanoserver:1903
Select multiple lines and right click.
Paste in any text editor. I used VSCode.

Expected behavior
I expected to see the same thing I saw in the terminal - specifically multiple lines.
Actual behavior
One line with lots of space.
Notes
This is different from #65 since it was about conhost and I'm talking about the new terminal, and I didn't have Shift pressed.

Huh, I'm not seeing this - @carlos-zamora thoughts?

@zadjii-msft There's some terminal state change that causes it.  Repro steps:

Open up a bash.exe session
ls -l to generate some multiline text
Select and copy it -- works as expected
edit a file with vi
Select and copy text -- now the endlines are missing

I've been well aware of this working on the clipboard stuff, but haven't tracked down the bug yet.  The bug probably manifests in TextBuffer::GetTextForClipboard, but I haven't had the time to debug it yet.

Closing in favor of #1091.

It turns out that this is a different issue.

I edited the issue to add correct instruction to reproduce.
@d-bingham @zadjii-msft, it happens with docker and not only with WSL.
Also happens if I open the console with hcsdiag console id instead of using docker run.

I'm seeing this as well. My shell is Powershell Core 6.2.0 and everything I try to copy has this problem. It seems that the copy functionality copies the whole buffer. Ie, if I'm trying to copy this:
get-content myfile.txt
Hello
World

123456789012345678901234567890

It copies this, where ^ denotes a space and my terminal is 30 chars wide:
get-content^myfile.txt^^^^^^^^
Hello^^^^^^^^^^^^^^^^^^^^^^^^^
World^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123456789012345678901234567890

I'm having same issue. when entering a copied command like:

apt-get install -y make build-essential checkinstall libssl-dev libbz2-dev libzip-dev
libreadline-gplv2-dev libncursesw5-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libffi-dev
wget curl libldap2-dev zlib1g-dev lib32z1-dev uuid-dev

It only runs the very first line... when using WSL directly, works as expected.

I also have this issue when copying text out of an SSH session to a Linux host.
Currently working around it by having this script on my desktop and giving it a double click when I have something I need to paste out of Terminal:
from pyperclip import copy, paste                                                                                from re import sub                                                                                copy(sub(' {10,}', '\r\n', paste()))

I think I found an easier reproduce steps.

Open cmd or PowerShell
cls to clear the screen
Run some command that writes output such as dir
Copy output text
Paste to somewhere (e.g. notepad)
Pasted text doesn't include line breaks

I'm also facing this issue when running WSL Ubuntu distribution. If I open a WSL tab in Windows Terminal and run something like ls -1, then copy some lines using my mouse (hold left-click, drag, then right-click), the copied text does not include any newlines.
Note that if I directly open WSL Ubuntu, copying works fine (the newlines are included).

I've tried all the workarounds I've seen listed, from ctrl-c, shift-ctrl-c, right clicks, shift right clicks, etc, but I'm having an absolute nightmare with pasting out of WSL.
It's definitely not handling newlines right, and sometimes when I paste stuff into neovim I get an extra line between every single line.  It's very weird, it's almost enough to stop me using the terminal at this point. :(

I've tried all the workarounds I've seen listed, from ctrl-c, shift-ctrl-c, right clicks, shift right clicks, etc, but I'm having an absolute nightmare with pasting out of WSL.
It's definitely not handling newlines right, and sometimes when I paste stuff into neovim I get an extra line between every single line. It's very weird, it's almost enough to stop me using the terminal at this point. :(

Me too. This is the one feature (copying from terminal) that I rely on heavily, so I can't really use this until it's fixed. :|

I'm facing same issue, I've tried following for reproduce steps
original text
(venv) PS hdformat> Get-Content .\test.txt
[2019-08-27 10:42:25,084: INFO/ForkPoolWorker-1] scheduler.push_new.send_push_on_time[c6a36103-80f9-44e8-8ddd-f406b563cded]: waiting countdown=9:48:00
[2019-08-27 10:43:25,051: INFO/ForkPoolWorker-2] ドキドキ
[2019-08-27 10:40:24,915: INFO/ForkPoolWorker-2] 두근두근

Windows Console (120 columns, powershell core 6.2.1)
right click
(venv) PS hdformat> Get-Content .\test.txt
[2019-08-27 10:42:25,084: INFO/ForkPoolWorker-1] scheduler.push_new.send_push_on_time[c6a36103-80f9-44e8-8ddd-f406b563cded]: waiting countdown=9:48:00
[2019-08-27 10:43:25,051: INFO/ForkPoolWorker-2] ドキドキ
[2019-08-27 10:40:24,915: INFO/ForkPoolWorker-2] 두근두근
Windows Terminal 0.4 (120 columns, powershell core 6.2.1)
right click
---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0
(venv) PS hdformat> Get-Content .\test.txt
[2019-08-27 10:42:25,084: INFO/ForkPoolWorker-1] scheduler.push_new.send_push_on_time[c6a36103-80f9-44e8-8ddd-f406b563cded]: waiting countdown=9:48:00                                                                                [2019-08-27 10:43:25,051: INFO/ForkPoolWorker-2] ドキドキ
[2019-08-27 10:40:24,915: INFO/ForkPoolWorker-2] 두근두근

alt + c (binding copyTextWithoutNewlines) & right click
---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0
(venv) PS hdformat> Get-Content .\test.txt                                                                              [2019-08-27 10:42:25,084: INFO/ForkPoolWorker-1] scheduler.push_new.send_push_on_time[c6a36103-80f9-44e8-8ddd-f406b563cded]: waiting countdown=9:48:00                                                                                [2019-08-27 10:43:25,051: INFO/ForkPoolWorker-2] ドキドキ                                                               [2019-08-27 10:40:24,915: INFO/ForkPoolWorker-2] 두근두근                                                               (venv) PS hdformat>

shift + right click & right clcik
---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0---------1---------2---------3---------4---------5---------6---------7---------8---------9---------0
(venv) PS hdformat> Get-Content .\test.txt                                                                              [2019-08-27 10:42:25,084: INFO/ForkPoolWorker-1] scheduler.push_new.send_push_on_time[c6a36103-80f9-44e8-8ddd-f406b563cded]: waiting countdown=9:48:00                                                                                [2019-08-27 10:43:25,051: INFO/ForkPoolWorker-2] ドキドキ                                                               [2019-08-27 10:40:24,915: INFO/ForkPoolWorker-2] 두근두근                                                               (

Hi guys!
I'm facing the same problem. Is there any ETA to fix this? As someone mentioned this bug makes very difficult to use the Terminal since every developer relies heavily on copy and pasting.
Thanks for your effort!

I am also still seeing this, pretty frustrating, haven't found any workarounds yet, trying to figure out if my bash / zsh configuration is contributing to this. Right click copy, copy on select, ctrl+shift+c, all copy a ton of whitespace instead of linebreaks.
Windows Terminal Preview - Version: 0.4.2382.0

Same problem in a DOS window.  Totally unusable.  I copy out of my text editor in a DOS window and paste into a text email within Thunderbird and I have garbage.  It worked up until I upgraded to 1903.  This needs to be fixed.  Or add an option.  This might be useful when pasting into a word processor where you want to reformat but not the way I use it.  I have been able to use this capability for many years and now it is broken.

@EdLy3 Could you file a separate issue to track that regression? This issue is specifically for the missing line breaks in copied text from the Windows Terminal, what it sounds like you're seeing is a regression in conhost.exe, the legacy console for cmd.exe, powershell.exe, wsl.exe, etc. Make sure to include what commandline application you're copying from. Thanks!

I ssh into a linux server, and need to copy-paste some text both ways.
When copying from notepad and pasting into the terminal window, there are empty lines between lines.
When copying from terminal window and pasting into Notepad++, the newlines are gone, and there are spaces for all the selected area - that means the size of the pasted text is dependent on the terminal window size at the time of copying.
Just as a remark: when I use a Powershell window for ssh, copypaste works great, without any of these issues.

I just wanted to add I'm also seeing this issue with Windows Terminal 0.4.2382.0. I can confirm previous comments are correct. Issue seems related to state and affects tabs individually. I can reproduce quickly using both cmd and PowerShell using the cls method posted above, and my WSL immediately falls into the bad state on start (I assume based on my shell setup). After the tab gets into a bad state, it appears to not recover. Only way I have been able to reliably fix the issue is closing and re-opening the tab.
This isn't a set of reproduction steps, but on WSL I'm running zsh with "oh my zsh", "af-magic" theme, and "zsh-syntax-highlighting" plugin. Copy+paste is immediately broken on any command (no newlines, lots of whitespace). Perhaps that helps someone create a faster test.

Any progress on this issue ?

Turns out, the clipboard code is correct. ConHost uses the same clipboard code. The issue arises with the wrap property on the CharRows. Windows Terminal does not set them properly. Significantly more info below.
In the example above, say the output is displayed as follows (line numbers on left):
0 c:\project-system>set path
1 Path=C:\Program Files (x86)\Microsoft Visual Studio\2019\master\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Users\dav
2 kean\AppData\Local\Microsoft\WindowsApps;C:\Users\davkean\.dotnet\tools
3 PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

This means that the wrap is supposed to be...

Line #
wrap? (ConHost)
wrap? (Windows Terminal)

0
false
false

1
true
true

2
false
true

3
false
true

@miniksa and I tried doing a proper fix in branch dev/cazamor/bugfix-copy-newline, but that caused more issues to arise. Specifically, take a look at line 2. In the VT Renderer, we called _EraseCharacter() to put spaces until the end of the line. We noticed that that would trigger the text buffer to set that line as "wrapping". The branch changes it to instead call _EraseLine(), which should be more efficient too.
We also updated the TerminalApi for Terminal Core to writeLine() instead of just Write() in Terminal::EraseInLine().
The result was the following:

Line #
wrap? (dev/cazamor/bugfix-copy-newline)

0
false

1
false

2
false

3
false

@miniksa was saying that this is a combined problem between the TerminalApi and the VTRenderer. May also be related to #780.
@zadjii-msft @miniksa Thoughts?
Removing the "Help-Wanted" tag because this is out of that scope now.
EDIT: I just tried reverting the change to the TerminalApi and this particular instance is fixed. Is that correct?

Turns out that duplicate #2275 was the same as this, and a bunch of info got put in there.

@DHowett Wait, the duplicate #2275, you referenced is closed which was opened after this one, and the code change / PR for #2275 was later deemed unfit and closed out...I don't see any other avenues on how this is going to be resolved. Can you please clarify if I missed another PR or open issue?
The PR in question from #2275 https://github.com/microsoft/terminal/pull/2755

@DHowett Wait, the duplicate #2275, you referenced is closed which was opened after this one, and the code change / PR for #2275 was later deemed unfit and closed out...I don't see any other avenues on how this is going to be resolved. Can you please clarify if I missed another PR or open issue?
The PR in question from #2275 can be found here: #2755

Yeah. I didn't realize it was a dup until after I fixed it. The PR that fixed it was #2797. #2755 was an incorrect approach to solving this problem.

the paste problem was not resolved. please check https://github.com/microsoft/terminal/issues/2275#issuecomment-534936850

For me the paste problem is also not resolved :(

With the current release when I cut and paste I get one giant line with no linebreaks at all.

This is a huge issue, how anybody can be working with this tool, please fix ASAP.....

I still get this copying from Ubuntu 18.04 on latest version of WSL (in Windows10) and pasting to stackoverflow/pastebin in Firefox (latest), and NotePad (latest).

I've been using the Windows Terminal now since it was first pushed, all the way back to when I had to compile each version and this has never worked. Attempting to copy and paste using the shortcuts has issues and the default ctrl+c ctrl+v functionality clearly has problems as well. Combine that with the related issues caused by WSL and I have to question who this is even being built for at this point.
Its nice that you have CI/CD going but clearly its not got great regression testing because I've seen some variant of this bug open/closed/ and then reopened the whole time with no comprehensive solutions. What I don't understand is how every time I've been able to reproduce it easily within minutes so how is this code getting pushed without being tested?
it seems to me that this is all hamstrung to issues inherent in ConPTY which hasn't seen a push in 5 months which smells of project priority issues to me and really should have had a solid year of work on it before this ever saw the light of day on github, because pushing a Terminal that can't even copy and paste at half a year in is paramount to saying "hopefully someone else will fix this for me in the open source community" which is a perfectly fine request of a 1.0 > project with promised features delivered but somewhat distasteful at what appears to be a prototyping phase.
For those of us who are using this to SSH into *nix systems and use vim on our windows box at work which I assume is quite a few of us, or are prototyping in WSL even if just for small things...this piece of software is effectively useless until it can at least pretend to have basic parity with a *nix terminal or even the CMD. Even trying to copy and paste in a CMD session between two files in windows is a dubious proposition at best which makes this an inferior product to the default command prompt bundled with the OS currently.
I don't need tabs, I don't need Acrylic, I don't need some cool new font, in fact the one aesthetic thing that would have been nice was an actual settings menu instead of a profile.json which is another ticket that has been open for months in various states of incomplete.
In summary I need your product to work at a fundamental level where I can actually use it! I don't expect it to be perfect or bug free at any point but its clear you've focused on the wrong things when determining who would want this, what for, and why because currently its just a sad conversation piece about what could have been and talk about how excited and naive we were to think this would turn out well in 6 months.

This is a pretty brutal bug.  Just a note to help indicate criticality.

On Windows 10 Pro (version 1903), using Windows Terminal (version 0.5.2762.0) and PowerShell Core (version 6.2.2), I am having the same problem. I connect to multiple Linux-based systems in my daily job, this issue prevents me from copy-and-paste commands/ text effectively.

Is nobody working on this?

At this exact moment, we've been focusing on making sure the in-box console continues to work well for the upcoming release of Windows. Sorry about the radio silence! 😃

This is the basic need of any ssh client l, we can take learning from putty how consistently it is working.  Even Android client are good at copy paste.
Get Outlook for Androidhttps://aka.ms/ghei36

From: Dustin L. Howett (MSFT<EMAIL_ADDRESS>Sent: Thursday, October 17, 2019 7:56:38 AM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
At this exact moment, we've been focusing on making sure the in-box console continues to work well for the upcoming release of Windows. Sorry about the radio silence! 😃
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLUGBQ42JRZMXUZCLVDQO7EN5A5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBOQSNY#issuecomment-542968119, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLU23SF7FIZ6W7AQ52LQO7EN5ANCNFSM4HRMLYMQ.

This problem appeared in a DOS window with my upgrade to 1903.
Is the DOS window code driving this?  I can no longer copy
out of my Hessling editor.  I am ok if I save the file and
use notepad but this is a real nuisance.
On 10/16/2019 10:46 PM, mikkushukla -<EMAIL_ADDRESS>wrote:

This is the basic need of any ssh client l, we can take learning from putty how consistently it is
working. Even Android client are good at copy paste.
Get Outlook for Androidhttps://aka.ms/ghei36

From: Dustin L. Howett (MSFT<EMAIL_ADDRESS>Sent: Thursday, October 17, 2019 7:56:38 AM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line
breaks (#1073)
At this exact moment, we've been focusing on making sure the in-box console continues to work well
for the upcoming release of Windows. Sorry about the radio silence! 😃
—
You are receiving this because you commented.
Reply to this email directly, view it on
GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLUGBQ42JRZMXUZCLVDQO7EN5A5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBOQSNY#issuecomment-542968119,
or
unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLU23SF7FIZ6W7AQ52LQO7EN5ANCNFSM4HRMLYMQ.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ALPCUVA3GUPVKJ3LDGNLVX3QO7GZRA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBORWUQ#issuecomment-542972754,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALPCUVDPEO26DCQ4CJ6D3BLQO7GZRANCNFSM4HRMLYMQ.

I hope you are kidding, you have major bug that affect the way people interact with the tool and there is no focus on fixing it but you do have time to upgrading it to new windows versions....

Take learning from mac terminal, if you are building a good echo system, you should focus on terminal. Event open-source ubuntu terminal work like charm.
Get Outlook for Androidhttps://aka.ms/ghei36

From: Peter<EMAIL_ADDRESS>Sent: Thursday, October 17, 2019 9:35:13 PM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
I hope you are kidding, you have major bug that affect the way people interact with the tool and there is no focus on fixing it but you do have time to upgrading it to new windows versions....
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLSPOOGMH47FQGRWRMDQPCELTA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBQUG7I#issuecomment-543245181, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLRUZT746SIJAZRJISDQPCELTANCNFSM4HRMLYMQ.

I hope you are kidding, you have major bug that affect the way people interact with the tool and there is no focus on fixing it but you do have time to upgrading it to new windows versions....

Well technically this software is still in preview stage and not even stable yet...

Everyone relax, this is a beta product, don't use it for production. There are other Microsoft terminal programs that function properly so just use those while this isn't working.

I hope you are kidding, you have major bug that affect the way people interact with the tool and there is no focus on fixing it but you do have time to upgrading it to new windows versions....

Well technically this software is still in preview stage and not even stable yet...

This is community's feedback which tries to use the tool, i think the major frustration is that nothing it happening on tool side, especially for major bug as this which was reported months ago...
Would be nice if somebody just let us know that you guys are looking into it.

There are other Microsoft terminal

LOL, which ones???

LOL, which ones???

The one provided when installing a WSL diestro (normally Ubuntu)
Powershell console
cmd console

If you want to stay in ubuntu subsystem, ubuntu one is the only option however as we all know it is basic so we all have been hoping that The Terminal could be the tool.
Please prove us right :)

To those who are impatient and contributing nonse like 'Copying and pasting works in Putty, it should work here!', do consider that the developers of this are dealing with higher severity issues crashes, freezing, rendering issues, etc. Those critical issues can rightfully take priority over this. If you want this resolved sooner, you can help debug the issue, apply to their development team or contribute your own code.
/$0.02

Even putty like copy paste is not working in windows terminal, copy multiline text and it will paste your content with extra \n per line which is very irritating, every time i have to delete extra line.
Yes you are right freeze is very common whenever ssh host startresponding slowly.
Get Outlook for Androidhttps://aka.ms/ghei36

From: Ian<EMAIL_ADDRESS>Sent: Friday, October 18, 2019 1:17:29 AM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
To those who are impatient and contributing nonse like 'Copying and pasting works in Putty, it should work here!', do consider that the developers of this are dealing with higher severity issues crashes, freezing, rendering issues, etc. Those critical issues can rightfully take priority over this. If you want this resolved sooner, you can help debug the issue, apply to their development team or contribute your own code.
/$0.02
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLWN7TLHEIOOMRPJNZDQPC6NDA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBRJTJY#issuecomment-543332775, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLWJEYW4VX454NKCLETQPC6NDANCNFSM4HRMLYMQ.

Looks like this one will be fixed shortly.

To give credit where credit is due, that fix is thanks to @d-bingham. 😸

Thank you, @d-bingham, from all of us waiting on the issue.

Now, can we get feature to move tabs around by using cursor and if you have many tabs they don't hide behind '+' character please! LOL 💃

It's not on-topic for this particular issue, but the tabs are getting a bit of a boost in 0.6. See the tree of issues linked from #3027.

yes, I can confirm that still doesn't work on v0.6.2951.0
Copy from VSCode and paste in Windows Terminal on vim:

This bug is not related to pasting into Terminal, it is pasting from Terminal. I believe what you're referring to is discussed in #1091.

I use different terminal emulators in Win10 1903 and all of them have the same problem.
Clipboard: govc find / -type m -name 'dev1-' | xargs govc vm.ip -a -v4
Pasted as: govcfind/-typem-name'dev1-'|xargsgovcv4

Those are definitely not line breaks that you’re missing... would you mind filing a new separate issue and following the issue template? Thanks.

For what it’s worth: if multiple terminal emulators experience the same issue, it’s probably something in your shell.

Terminal freezes during post laptop sleep and network disconnect. Every time I have to force kill the app via task manager.
Is this a known issue?
Get Outlook for Androidhttps://aka.ms/ghei36

From: Dustin L. Howett (MSFT<EMAIL_ADDRESS>Sent: Monday, November 18, 2019 12:53:38 PM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
For what it’s worth: if multiple terminal emulators experience the same issue, it’s probably something in your shell.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLWZX7H3UFMSROGFRMDQUI7HVA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEJOGGA#issuecomment-554885912, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLS7INF25WKKKYX3USTQUI7HVANCNFSM4HRMLYMQ.

From: Dustin L. Howett (MSFT<EMAIL_ADDRESS>Sent: Monday, November 18, 2019 12:53:38 PM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
For what it’s worth: if multiple terminal emulators experience the same issue, it’s probably something in your shell.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLWZX7H3UFMSROGFRMDQUI7HVA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEJOGGA#issuecomment-554885912, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLS7INF25WKKKYX3USTQUI7HVANCNFSM4HRMLYMQ.

@mikkushukla, please open a new issue to report the problem: https://github.com/microsoft/terminal/issues

@mikkushukla

Terminal freezes during post laptop sleep and network disconnect. Every time I have to force kill the app via task manager.
Is this a known issue?

The problem you described is not related to this issue.

Windows Terminal (Preview)
Version: 0.7.3291.0
Still experiencing this.

Because of freeze issue I have stopped using terminal. I am using command prompt as it is more reliable.  If this is fixed in 0.0.3291.0 I will start using again and will update If i face the same issue.
Get Outlook for Androidhttps://aka.ms/ghei36

From: Stanislav N<EMAIL_ADDRESS>Sent: Sunday, December 8, 2019 10:09:13 PM
To: microsoft/terminal<EMAIL_ADDRESS>Cc: mikkushukla<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [microsoft/terminal] Copy and paste from the Windows Terminal doesn't include line breaks (#1073)
Windows Terminal (Preview)
Version: 0.7.3291.0
Still experiencing this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/terminal/issues/1073?email_source=notifications&email_token=ADAODLR3TDU6UE5XHBIP2SDQXUPLDA5CNFSM4HRMLYM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHDHFA#issuecomment-562967444, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADAODLW37YROKWH374IEQADQXUPLDANCNFSM4HRMLYMQ.

@pztrn, you may be best served opening anew issue and referencing this one. Ensure you provide all relevant information to reproduce the problem.
@mikkushukla: Your statement has nothing to do with this bug report. If you have issues that are unrelated to line breaks in copy and paste functionality, please open a new bug report.

meet this in terminal 1.0

hold ctrl + shift , use cursor to copy multiple lines.
paste  in vscode or other editors ,  lose  line break

Found this issue too
terminal 1.0
If I copy from terminal pasting preserves multiple lines. But If I am inside vim when copying and pasting the line breaks dissapear. Resulting in one long line.
My full environment is: Windows terminal, powershell, logged via ssh to a linux box that is running tmux and inside is running vim.

@JesusCoyotzi could you submit a new bug report here? Please include specific steps on how you performed the copy/paste and what you're running there. Sounds like a real issue but we should be tracking this in more detail separately.

https://github.com/nsf/termbox-go/issues/237#event-4636645181

https://github.com/microsoft/terminal/issues/1073
https://github.com/microsoft/terminal/issues/1126
https://github.com/microsoft/terminal/issues/1621
https://github.com/microsoft/terminal/issues/2275
https://github.com/microsoft/terminal/issues/2278
https://github.com/microsoft/terminal/issues/2324
https://github.com/microsoft/terminal/issues/2395
https://github.com/microsoft/terminal/issues/2717
https://github.com/microsoft/terminal/issues/52

I am on a new machine using Windows 11 and I'm experiencing this problem in the WSL console.

Open a WSL console
Do an ls or something to get multiple lines in the console
Select/Copy multiple lines
Paste into any text editor

The pasted text will be one line with spaces between the text that should be on separate lines.

@zd3nik That's by design for Ctrl+shift+c. See https://github.com/microsoft/terminal/issues/65#issuecomment-437398197
Copy-paste is significantly more reasonable and configurable in the Windows Terminal, I'd recommend that. Conhost's copy-paste is pretty significantly burdened by years of legacy behavior.

That's unfortunate.  Because automatically copying whatever you select into the clipboard is.... not ideal.  Especially when simply clicking somewhere in the terminal (say, to put focus on the terminal) highlights part of the terminal text (one character).  So I'm constantly blowing whatever useful data I may have had in my clipboard whenever I click on a windows terminal window.  Not ideal.
If the terminal was at least smart enough to only highlight when you "drag" the mouse pointer over part of the terminal instead, then it wouldn't be so detrimental to automatically put whatever you highlight into the clipboard.

Thanks for the info @zadjii-msft. Is there a way to select which terminal is used for wsl?  I'm just using the terminal that it opens when I launch my wsl console.

Check out this blog post


Implement support of PEP 440 versioning by means bumpversion.

Here's in this PR I implemented versioning according to PEP 440.
We'll get separation on four sections: alpha, beta, release candidate and final release by means such pattern: {major}.{minor}.{patch}.{release}{n}.
X.Y.ZaN   # Alpha release
X.Y.ZbN   # Beta release
X.Y.ZrcN  # Release Candidate
X.Y.Z     # Final release

The workflow for the version 3.0.0.a0 will be looking somehting like this:
bumpversion patch # 3.0.0.a0 → 3.0.1.a0
bumpversion n # 3.0.1.a0 → 3.0.1.a1
bumpversion release # 3.0.1.a1 → 3.0.1.b0
bumpversion release # 3.0.1.b0 → 3.0.1.rc0
bumpversion release # 3.0.1.rc0 → 3.0.1
bumpversion minor # 3.0.1 → 3.1.0.a0
bumpversion major # 3.1.0.a0 → 4.0.0.a0
bumpversion n # 4.0.0.a0 → 4.0.0.a1
bumpversion release --tag # 4.0.0.a1 → 4.0.0.b0 it will create for us a tag v4.0.0.b0

P.S. I'd like to consult with you where is it sould be placed inside documentation and when these commands should be fired as well because you better understand workflow of WTForms.

Yes, you're right about a release tag. So I guess it'll be better to come up only with a dev option that increments, right? E.g.:
bumpversion patch # 3.0.0 → 3.0.1.dev0
bumpversion n # 3.0.1.dev0 → 3.0.1.dev1
bumpversion release # 3.0.1.dev1 → 3.0.1
bumpversion patch # 3.0.1 → 3.0.2.dev0

About workflow, I meant, if somebody will create a PR, should that person patch version or only core maintainers will update a version of the project?

After releasing a version, I bump to the next version too, so everything that happens on master represents the next feature release, everything that happens on a maintenance branch represents the next bugfix release. Contributors wouldn't bump versions.
To be honest the current process isn't that complex. The only thing bumpversion would automate is setting the release version, tagging, then setting the next dev version. It might actually require more typing to use bumpversion than to do this manually.

So we don't need this one?

I'm going to close this for now. Thanks for looking into it, it's definitely interesting. I'll keep it in mind and think about how we can improve the release process.


Enforce pub calls in pallets

This PR enforces that all Pallets using FRAME v2 should expose their dispatchable functions as pub.
This improves the quality of life of developers.
polkadot companion: https://github.com/paritytech/polkadot/pull/3214

bot merge