You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The U file mode was removed in Python 3.11 because it had no effect so the U can merely be removed.
open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. In Python 3, “universal newline” mode is used by default whenever a file is opened in text mode, and the 'U' flag has been deprecated since Python 3.3. The newline parameter to these functions controls how universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
Execution log
$ python3 main.py
Traceback (most recent call last):
File "/home/pi/Dev/peripheral/main.py", line 99, in <module>
bleno = Bleno()
^^^^^^^
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/Emit.py", line 39, in new_init
old_init(self, *k, **kw)
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/Bleno.py", line 41, in __init__
self._bindings = BlenoBindings()
^^^^^^^^^^^^^^^
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/Emit.py", line 39, in new_init
old_init(self, *k, **kw)
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/Bindings.py", line 16, in __init__
self._hci = Hci()
^^^^^
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/Emit.py", line 39, in new_init
old_init(self, *k, **kw)
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/Hci.py", line 20, in __init__
self._socket = BluetoothHCI(auto_start=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/BluetoothHCI/BluetoothHCI.py", line 239, in __init__
self.hci = BluetoothHCISocketProvider(device_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.pyenv/versions/3.11.1/lib/python3.11/site-packages/pybleno/hci_socket/BluetoothHCI/BluetoothHCI.py", line 69, in __init__
self._r = os.fdopen(self.__r, 'rU')
^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen os>", line 1031, in fdopen
ValueError: invalid mode: 'rU'
The text was updated successfully, but these errors were encountered:
@Adam-Langley Are there any plans to release a version with this fix to pip? I know there haven't been any other changes recently, but it would be great if the PyPi release of this package worked on 3.11.
@Adam-Langley Are there any plans to release a version with this fix to pip? I know there haven't been any other changes recently, but it would be great if the PyPi release of this package worked on 3.11.
+1 (Thank you very much, @Adam-Langley, for all the work you have done!)
The U file mode was removed in Python 3.11 because it had no effect so the U can merely be removed.
Execution log
The text was updated successfully, but these errors were encountered: