Comments (7)
This seems to be a duplicate of #368 , which is already fixed in upstream. Distributions just have to upgrade autorandr (or pull the fix) if they are using python 3.12 by default. (I was just affected too on Debian testing).
from autorandr.
For what it is worth, it works for me on python 3.10.12 and python3.11.0rc1. Perhaps you could try an earlier version to see if you get the same issue or not to rule out the python version.
from autorandr.
I am encountering the exact same warning on a fresh install of autorandr, also on python 3.12.2
autorandr still runs just fine. It just outputs that same chain of SyntaxWarnings every time I run it.
from autorandr.
I have the exact same warning but it only occured after upgrading from ubuntu 22.04 to 24.04 so maybe that is the problem?
from autorandr.
Every python code not ported to python 3.12 does that. Therefore autorandr is affected on Fedora 39 and 40. Not a autorandr bug per se.
from autorandr.
Here's a dumb, make it work for now fix:
See what versions of Python you have available:
ls -l /usr/bin/python*
If you have a Python version before 3.12, then you can try that. Use sudo and open the text file /usr/bin/autorandr
for editing:
sudo nano /usr/bin/autorandr
At the top, where you see:
#! /usr/bin/python3 -sP
Change it to the earlier version of Python that you have. For example:
#! /usr/bin/python3.11 -sP
Write out and exit. I don't know whether this will mess up any future updates of autorandr that might show up in your OS's package manager.
from autorandr.
Seems to be caused by the following:
A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence, use raw strings for regular expression: re.compile(r"\d+.\d+")). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)
From https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
autorandr should probably switch to using raw strings when defining regular expressions
from autorandr.
Related Issues (20)
- postscript loses authentication for systemctl commands after suspending HOT 1
- Unhandled exception (local variable 'output' referenced before assignment) HOT 1
- Broken regexes due to missing `r` string literal HOT 6
- Unable to save lid state when using NVIDIA GPU (no eDP / LVDS output)
- Total system crash + soundloop could be caused by autorandr
- Total system crash + soundloop could be caused by autorandr
- No XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE events HOT 2
- Prevent profile change with screen lock HOT 1
- Additional Documentation HOT 7
- autorandr.service "Failed to load profile: 'xxx' : Profile not found" althoug profile exists HOT 1
- Failed to apply profile due to `--crtc` option HOT 3
- Incorrect profile settings HOT 1
- please support appimage , or binary file HOT 1
- Enabling udev rule / systemd service on a per-user basis? HOT 2
- Systemd : StartLimitIntervalSec too short
- Can't open display error
- Readme might be wrong. modset-drm instead of modset_drm
- systemd[1]: Failed to start autorandr.service - autorandr execution hook when switching from Windows 10 to Ubuntu
- Config Never Detected (Framework 16 Laptop)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autorandr.