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

Support python 3.12 #5408

Merged
merged 7 commits into from
Nov 9, 2023
Merged

Support python 3.12 #5408

merged 7 commits into from
Nov 9, 2023

Conversation

jenshnielsen
Copy link
Collaborator

@jenshnielsen jenshnielsen commented Oct 3, 2023

  • Requires wrapt 1.16.0. Otherwise connectionplus wrapper fails in Sphinx build and in ipython
  • Skip zhinst type checking until zhinst is released for 3.12 Supported in 23.10 release
  • Fix some ast related deprecations
  • Cleanup expected warnings in test to match what we actually see.

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #5408 (1079819) into main (fb99819) will increase coverage by 1.00%.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##             main    #5408      +/-   ##
==========================================
+ Coverage   67.36%   68.37%   +1.00%     
==========================================
  Files         342      342              
  Lines       30029    30029              
==========================================
+ Hits        20230    20533     +303     
+ Misses       9799     9496     -303     

@jenshnielsen
Copy link
Collaborator Author

Currently blocked on zhinst not being avilable. We could skip typechecking against that for 3.12

@jenshnielsen jenshnielsen force-pushed the python_312 branch 3 times, most recently from 577c621 to e2e6267 Compare October 29, 2023 08:30
@jenshnielsen
Copy link
Collaborator Author

Building the docs fails with 3.12 this is due to wrapt not yet supporting 3.12 in a release version 1.16.0rc1 is out which seems to work. This can be reproduced in ipython where the full name generation of ConnectionPlus fails.


In [1]: from qcodes.dataset import ConnectionPlus

In [2]: ConnectionPlus
Out[2]: ---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
File ~\miniconda3\envs\qcodespip312\Lib\site-packages\IPython\core\formatters.py:708, in PlainTextFormatter.__call__(self, obj)
    701 stream = StringIO()
    702 printer = pretty.RepresentationPrinter(stream, self.verbose,
    703     self.max_width, self.newline,
    704     max_seq_length=self.max_seq_length,
    705     singleton_pprinters=self.singleton_printers,
    706     type_pprinters=self.type_printers,
    707     deferred_pprinters=self.deferred_printers)
--> 708 printer.pretty(obj)
    709 printer.flush()
    710 return stream.getvalue()

File ~\miniconda3\envs\qcodespip312\Lib\site-packages\IPython\lib\pretty.py:393, in RepresentationPrinter.pretty(self, obj)
    390 for cls in _get_mro(obj_class):
    391     if cls in self.type_pprinters:
    392         # printer registered in self.type_pprinters
--> 393         return self.type_pprinters[cls](obj, self, cycle)
    394     else:
    395         # deferred printer
    396         printer = self._in_deferred_types(cls)

File ~\miniconda3\envs\qcodespip312\Lib\site-packages\IPython\lib\pretty.py:772, in _type_pprint(obj, p, cycle)
    770     p.text(name)
    771 else:
--> 772     p.text(mod + '.' + name)

TypeError: unsupported operand type(s) for +: 'property' and 'str'

@jenshnielsen jenshnielsen changed the title start testing against python 3.12 Support python 3.12 Nov 9, 2023
@jenshnielsen
Copy link
Collaborator Author

@astafan8 wrapt 1.16.0 is released so this is ready for review

@jenshnielsen jenshnielsen added this pull request to the merge queue Nov 9, 2023
Merged via the queue into microsoft:main with commit ddab0ad Nov 9, 2023
16 checks passed
@jenshnielsen jenshnielsen deleted the python_312 branch October 25, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants