Ok so I am doing something wrong here. I am trying to change the version of a layer using the python command line.
I don't want to use change version from the versioning toolbar because that does all of the layer in all for the maps.
The supplied sde connection points to a different version as specified in the geodatabase properties. I uses easy connect syntax.
apr = arcpy.mp.ArcGISProject('current')
map3 = apr.listMaps("Map3")[0]
ptLayer = map3.listLayers()[0]
ptLayer.connectionProperties
{'dataset': 'xyz.XXXPoint', 'workspace_factory': 'SDE', 'connection_info': {'password': '<*********>', 'server': 'xyz.xyz.xyz.xyz.xyz', 'instance': 'sde:oracle$xyz.xyz.xyz.xyz.xyz:xyz/xyz.xyz.xyz.xyz.xyz', 'authentication_mode': 'OSA', 'version': 'xyz.Atlantic Week 26'}}
ptLayer.updateConnectionProperties(ptLayer.connectionProperties, r'C:\xyz\ArcGIS\Project\Demo\xyz_Reg_Week26.sde')
ptLayer.connectionProperties
{'dataset': 'xyz.XXXPoint', 'workspace_factory': 'SDE', 'connection_info': {'password': '<*********>', 'server': 'xyz.xyz.xyz.xyz.xyz', 'instance': 'sde:oracle$xyz.xyz.xyz.xyz.xyz:xyz/xyz.xyz.xyz.xyz.xyz', 'authentication_mode': 'OSA', 'version': 'xyz.Atlantic Week 26'}}