Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asyncio deprecation fix #421

Merged
merged 3 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ For a detailed view of what has changed, refer to the {uri-repo}/commits/master[
* Updated instructions to extract the RDP certificate and private key ({uri-issue}345[#345])
* Documentation updates ({uri-issue}335[#335], {uri-issue}339[#339], {uri-issue}340[#340], {uri-issue}360[#360], {uri-issue}371[#371], {uri-issue}381[#381], {uri-issue}383[#383], {uri-issue}384[#384], {uri-issue}408[#408], {uri-issue}420[#420])
* Replaced unmaintained dependency notify2 with py-notifier ({uri-issue}363[#363], {uri-issue}365[#365])
* Some Python 3.10 compatibility work ({uri-issue}366[#366], {uri-issue}380[#380])
* Some Python 3.10 compatibility work ({uri-issue}366[#366], {uri-issue}380[#380], {uri-issue}421[#421])
* Enable play/pause replay on the Player by pressing the Space key ({uri-issue}403[#403]).

=== Bug fixes
Expand Down
8 changes: 3 additions & 5 deletions bin/pyrdp-clonecert.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

#
# This file is part of the PyRDP project.
# Copyright (C) 2018, 2019 GoSecure Inc.
# Copyright (C) 2018, 2019, 2022 GoSecure Inc.
# Licensed under the GPLv3 or later.
#

# Need to install this reactor before importing any other code
import asyncio

from twisted.internet import asyncioreactor

asyncioreactor.install(asyncio.get_event_loop())
asyncioreactor.install(asyncio.new_event_loop())

import argparse
import logging
Expand Down
24 changes: 11 additions & 13 deletions bin/pyrdp-player.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,27 @@

#
# This file is part of the PyRDP project.
# Copyright (C) 2018-2021 GoSecure Inc.
# Copyright (C) 2018-2022 GoSecure Inc.
# Licensed under the GPLv3 or later.
#

# asyncio needs to be imported first to ensure that the reactor is
# installed properly. ***DO NOT RE-ORDER***.
import asyncio # noqa

# Need to install this reactor before importing any other code
import asyncio
from twisted.internet import asyncioreactor
asyncioreactor.install(asyncio.new_event_loop())

asyncioreactor.install(asyncio.get_event_loop())
from pathlib import Path
import argparse
import logging
import logging.handlers
import os
import sys

from pyrdp.core import settings # noqa
from pyrdp.logging import LOGGER_NAMES, NotifyHandler, configure as configureLoggers # noqa
from pyrdp.player import HAS_GUI # noqa
from pyrdp.player.config import DEFAULTS # noqa

from pathlib import Path # noqa
import argparse # noqa
import logging # noqa
import logging.handlers # noqa
import sys # noqa
import os # noqa

# Workaround a macOS bug: https://bugreports.qt.io/browse/QTBUG-87014
os.environ['QT_MAC_WANTS_LAYER']='1'
if HAS_GUI:
Expand Down