pyvisa / pyvisa-py

A pure python PyVISA backend
https://pyvisa-py.readthedocs.io
MIT License
282 stars 120 forks source link

*Session attributes handling enhancement and TcpSocketSession cleanup #116

Closed skrchnavy closed 6 years ago

skrchnavy commented 6 years ago
skrchnavy commented 6 years ago

@MatthieuDartiailh code tested and ready for final review

MatthieuDartiailh commented 6 years ago

I may need some time to review this. Hopefully I will merge sometimes next week.

MatthieuDartiailh commented 6 years ago

One stupid question: shouldn't timeout on the TCPIP session be a private attribute rather than a public one ? From my understanding it should only be set through the visa attribute and not directly.

skrchnavy commented 6 years ago

Further changes / fixes in timeout handling added, some comments applied).

Regarding Session.timeout attribute: it is protected but also 'Session.attrs,Session.interfaceorSession.parsed` are protected. Candidate for writing new issue for this kind of refactoring.

How to cope with the SUCCESS naming convention? spread across Sessions. Which is prefered? (I like StatusCode.success way as it is used for reast of status codes and short enough.)

skrchnavy commented 6 years ago

@MatthieuDartiailh #118 have to be resolved (merged or closed) before this issue (in conflict)

MatthieuDartiailh commented 6 years ago

Merging. Thanks again @skrchnavy

bors r+

bors[bot] commented 6 years ago

Build succeeded