Skip to content

Commit

Permalink
Python version_info import removed
Browse files Browse the repository at this point in the history
  • Loading branch information
ReeceHumphreys committed Jan 17, 2024
1 parent cfc8e6c commit 5bc6d8c
Show file tree
Hide file tree
Showing 27 changed files with 6 additions and 34 deletions.
14 changes: 6 additions & 8 deletions cpp/src/Slice/PythonUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,14 +1959,13 @@ Slice::Python::CodeVisitor::writeConstantValue(const TypePtr& type, const Syntax
}
case Slice::Builtin::KindString:
{
string sv2 = toStringLiteral(value, "\a\b\f\n\r\t\v", "", Octal, 0);
string sv3 = toStringLiteral(value, "\a\b\f\n\r\t\v", "", UCN, 0);
const string controlChars = "\a\b\f\n\r\t\v";
const unsigned char cutOff = 0;

string sv2 = toStringLiteral(value, controlChars, "", Octal, cutOff);
string sv3 = toStringLiteral(value, controlChars, "", UCN, cutOff);

_out << "\"" << sv2<< "\"";
if(sv2 != sv3)
{
_out << " if _version_info_[0] < 3 else \"" << sv3 << "\"";
}
_out << "\"" << (sv2 == sv3 ? sv2 : sv3) << "\"";
break;
}
case Slice::Builtin::KindValue:
Expand Down Expand Up @@ -2843,7 +2842,6 @@ Slice::Python::generate(const UnitPtr& un, bool all, const vector<string>& inclu
Slice::Python::MetaDataVisitor visitor;
un->visit(&visitor, false);

out << nl << "from sys import version_info as _version_info_";
out << nl << "import Ice, IcePy";

if(!all)
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/CommunicatorF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Communicator_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.LoggerF_local
import Ice.InstrumentationF_local
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ConnectionF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Connection_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.ObjectAdapterF_local
import Ice.Identity_ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Current_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.ObjectAdapterF_local
import Ice.ConnectionF_local
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/EndpointF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/EndpointSelectionType_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Endpoint_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.Version_ice
import Ice.BuiltinSequences_ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/FacetMap_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ImplicitContextF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ImplicitContext_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.LocalException_local
import Ice.Current_local
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/InstrumentationF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Instrumentation_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.EndpointF_local
import Ice.ConnectionF_local
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/LocalException_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.Identity_ice
import Ice.Version_ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/LoggerF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Logger_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ObjectAdapterF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ObjectAdapter_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.CommunicatorF_local
import Ice.ServantLocatorF_local
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/PluginF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Plugin_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.LoggerF_local
import Ice.BuiltinSequences_ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/PropertiesF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/Properties_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.BuiltinSequences_ice
import Ice.PropertyDict_ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ServantLocatorF_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ServantLocator_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.ObjectAdapterF_local
import Ice.Current_local
Expand Down
1 change: 0 additions & 1 deletion python/python/Ice/ValueFactory_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module Ice
Expand Down
1 change: 0 additions & 1 deletion python/python/IceBox/Service.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy
import Ice.BuiltinSequences_ice
import Ice.CommunicatorF_ice
Expand Down

0 comments on commit 5bc6d8c

Please sign in to comment.