Skip to content

Update to pyserial 3.4#8815

Merged
feerrenrut merged 1 commit into
nvaccess:thresholdfrom
BabbageCom:pyserial
May 28, 2019
Merged

Update to pyserial 3.4#8815
feerrenrut merged 1 commit into
nvaccess:thresholdfrom
BabbageCom:pyserial

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Oct 3, 2018

Copy link
Copy Markdown
Collaborator

Link to issue number:

None. However, there is some discussion in #6035

Summary of the issue:

We've been on an old version of pyserial for some time now. Currently, pyserial is at version 3.4. Most notably, this version includes some API changes, however there is still backwards compatibility for almost all of them. Though there is not very much information about Python 3 support of older versions, this version should ensure that full and up to date Python 3 support is covered.

Description of how this pull request fixes the issue:

  1. Updates to pyserial 3.4
  2. Changes Serial.hComPort to Serial._port_handle
  3. In all drivers, change Serial.inWaiting calls to the in_waiting property. Note that there is still an inWaiting method for backwards compatibility. The papenmeier driver uses FTDI2 which has a get_queue_status function. Therefore, we still use the inWaiting method here, which is still supported.
  4. _interCharTimeout is now _inter_byte_timeout
  5. _writeTimeout is now _write_timeout

Testing performed:

Tested auto and manual detection of a Handy Tech Modular Evolution. more testing would be appreciated, especially with regard to the papenmeier driver. I don't expect much trouble, though.

Known issues with pull request:

None

Change log entry:

  • Changes for developers
    • Updated pySerial to version 3.4

@LeonarddeR

This comment has been minimized.

Comment thread source/hwIo.py
self._setTimeout(None)
self.inWaiting = self._ser.inWaiting
super(Serial, self).__init__(self._ser.hComPort, onReceive)
super(Serial, self).__init__(self._ser._port_handle, onReceive)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This handle is now private to pyserial, but if there is no public function to retrieve it I guess this is the best we can do.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did an extra check, but there doesn't seem to be one.

@michaelDCurran

Copy link
Copy Markdown
Member

This has the potential to break a lot of add-ons that bundle braille display drivers... and yes, there are a lot of them in the wild.
I feel we need to hold this back until @feerrenrut has completed add-on versioning.

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

This has the potential to break a lot of add-ons that bundle braille display drivers... and yes, there are a lot of them in the wild.

You'll probably know more display drivers than I do.

To clarify, the only backwards incompatible change is Serial.hComPort to Serial._port_handle, and I don't think that this is used directly by any display driver. For the other changes, the former properties are deprecated in favour of the latter, but the original properties are still available, including the inWaiting function.

I feel we need to hold this back until @feerrenrut has completed add-on versioning.

This certainly makes sense.

@LeonarddeR LeonarddeR removed the blocked label Dec 6, 2018
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

I removed the blocked label as #8006 is merged.

@LeonarddeR LeonarddeR changed the base branch from master to threshold April 27, 2019 15:17
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

@feerrenrut: similar to your reasoning in #8647, I can't think of any braille display driver that will suffer from the changes in this pr, though @michaelDCurran noted that there are many display drivers in the wild. Add-on versioning is there now, though.

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Just for your info, I just discovered that this update is mandatory in order for py2exe to be able to create an NVDA distribution.

feerrenrut added a commit that referenced this pull request May 28, 2019
The version number for threshold is currently unknown, I have added a new section at the start of this file as a place holder for this version number.

Merges from master with modifications to this file should not be too hard, the changes from master should always come after the changes on the threshold branch. Because they are in different parts of the file there should be very few conflicts.
@feerrenrut feerrenrut merged commit d5026b8 into nvaccess:threshold May 28, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.2 milestone May 28, 2019
@feerrenrut feerrenrut modified the milestones: 2019.2, 2019.3 Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants