You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(3) |
Aug
(7) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(12) |
2009 |
Jan
(2) |
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(2) |
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(5) |
Oct
(5) |
Nov
(1) |
Dec
(2) |
2011 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
|
2015 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(4) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2021 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(11) |
From: Barry <ba...@ba...> - 2018-04-17 20:31:43
|
> On 17 Apr 2018, at 21:19, Richard Shaw <hob...@gm...> wrote: > > On Tue, Apr 17, 2018 at 2:44 PM, Barry Scott <ba...@ba...> wrote: >>> On 17 Apr 2018, at 14:07, Richard Shaw <hob...@gm...> wrote: >>> >>> BUILDSTDERR: throw Py::Exception(Base::BaseExceptionFreeCADError,str.str()); >> >> You have two ways to proceed. >> >> 1) define PYCXX_6_2_COMPATIBILITY and use the old API This is the way to get the rpmbuild working until upstram catch up. Barry >> 2) port to the V7 API - have a look at CXX/Python2/Exception.hxx >> and the PYCXX_USER_EXCEPTION_xxx macros. >> >> Oh and you might find the brief notes in the readme informative. >> >> http://cxx.sourceforge.net/README.html > > I'll take a look, but I'm not a C/C++ programmer, I just package FreeCAD for Fedora Linux. I'll pass this along to upstream and see how they would like to proceed. > > Thanks, > Richard > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > CXX-Users mailing list > CXX...@li... > https://lists.sourceforge.net/lists/listinfo/cxx-users |
From: Richard S. <hob...@gm...> - 2018-04-17 20:19:26
|
On Tue, Apr 17, 2018 at 2:44 PM, Barry Scott <ba...@ba...> wrote: > On 17 Apr 2018, at 14:07, Richard Shaw <hob...@gm...> wrote: > > BUILDSTDERR: throw Py::Exception(Base:: > BaseExceptionFreeCADError,str.str()); > > You have two ways to proceed. > > 1) define PYCXX_6_2_COMPATIBILITY and use the old API > 2) port to the V7 API - have a look at CXX/Python2/Exception.hxx > and the PYCXX_USER_EXCEPTION_xxx macros. > > Oh and you might find the brief notes in the readme informative. > > http://cxx.sourceforge.net/README.html <http://cxx.sourceforge.net/> > I'll take a look, but I'm not a C/C++ programmer, I just package FreeCAD for Fedora Linux. I'll pass this along to upstream and see how they would like to proceed. Thanks, Richard |
From: Barry S. <ba...@ba...> - 2018-04-17 19:44:29
|
> On 17 Apr 2018, at 14:07, Richard Shaw <hob...@gm...> wrote: > > BUILDSTDERR: throw Py::Exception(Base::BaseExceptionFreeCADError,str.str()); You have two ways to proceed. 1) define PYCXX_6_2_COMPATIBILITY and use the old API 2) port to the V7 API - have a look at CXX/Python2/Exception.hxx and the PYCXX_USER_EXCEPTION_xxx macros. Oh and you might find the brief notes in the readme informative. http://cxx.sourceforge.net/README.html <http://cxx.sourceforge.net/> Barry |
From: Richard S. <hob...@gm...> - 2018-04-17 14:17:12
|
On Mon, Apr 16, 2018 at 1:10 PM, Barry Scott <ba...@ba...> wrote: > > > On 12 Apr 2018, at 15:59, Richard Shaw <hob...@gm...> wrote: > > ifPyErrorThrowCxxException > > > You need to compile ./Src/Python2/cxx_exceptions.cxx to get this and > other functions. > It new in the V7 series. > I figured that out after digging into the FreeCAD sources. They bundle 6.2.8. The next problem I ran into is that it looks like the arguments have changed? [ 26%] Building CXX object src/App/CMakeFiles/FreeCADApp.dir/GroupExtensionPyImp.cpp.o cd /builddir/build/BUILD/FreeCAD-0.17/build/src/App && /usr/bin/c++ -DBOOST_106600 -DDOCDIR=\"/usr/share/doc/freecad\" -DFreeCADApp_EXPORTS -DHAVE_CONFIG_H -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_UITOOLS_LIB -DQT_WEBKIT_LIB -DQT_XML_LIB -DRESOURCEDIR=\"/usr/share/freecad\" -D_OCC64 -I/builddir/build/BUILD/FreeCAD-0.17/build -I/usr/include/smesh -isystem /usr/include/QtOpenGL -isystem /usr/include/QtSvg -isystem /usr/include/QtUiTools -isystem /usr/include/QtWebKit -isystem /usr/include/QtGui -isystem /usr/include/QtXml -isystem /usr/include/QtNetwork -isystem /usr/include/QtCore -I/builddir/build/BUILD/FreeCAD-0.17/build/src -I/builddir/build/BUILD/FreeCAD-0.17/src -I/builddir/build/BUILD/FreeCAD-0.17/build/src/App -I/usr/include/python2.7 -Wall -Wextra -Wno-write-strings -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -std=c++11 -D_OCC64 -fPIC -o CMakeFiles/FreeCADApp.dir/GroupExtensionPyImp.cpp.o -c /builddir/build/BUILD/FreeCAD-0.17/src/App/GroupExtensionPyImp.cpp BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/App/ExtensionContainerPyImp.cpp: In member function 'PyObject* App::ExtensionContainerPy::hasExtension(PyObject*)': BUILDSTDERR: /builddir/build/BUILD/FreeCAD-0.17/src/App/ExtensionContainerPyImp.cpp:161:70: error: no matching function for call to 'Py::Exception::Exception(PyObject*&, std::__cxx11::basic_stringstream<char>::__string_type)' BUILDSTDERR: throw Py::Exception(Base::BaseExceptionFreeCADError,str.str()); BUILDSTDERR: ^ BUILDSTDERR: In file included from /usr/include/CXX/Exception.hxx:40, BUILDSTDERR: from /usr/include/CXX/Python2/Objects.hxx:44, BUILDSTDERR: from /usr/include/CXX/Objects.hxx:40, BUILDSTDERR: from /builddir/build/BUILD/FreeCAD-0.17/src/Base/PyObjectBase.h:54, BUILDSTDERR: from /builddir/build/BUILD/FreeCAD-0.17/src/App/Application.h:32, BUILDSTDERR: from /builddir/build/BUILD/FreeCAD-0.17/src/App/ExtensionContainerPyImp.cpp:30: BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate: 'Py::Exception::Exception(const string&)' BUILDSTDERR: PYCXX_STANDARD_EXCEPTION( Exception, BaseException ) BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate expects 1 argument, 2 provided BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate: 'Py::Exception::Exception(const char*)' BUILDSTDERR: PYCXX_STANDARD_EXCEPTION( Exception, BaseException ) BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate expects 1 argument, 2 provided BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate: 'Py::Exception::Exception()' BUILDSTDERR: PYCXX_STANDARD_EXCEPTION( Exception, BaseException ) BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate expects 0 arguments, 2 provided BUILDSTDERR: /usr/include/CXX/Python2/cxx_standard_exceptions.hxx:9:1: note: candidate: 'constexpr Py::Exception::Exception(const Py::Exception&)' BUILDSTDERR: PYCXX_STANDARD_EXCEPTION( Exception, BaseException ) BUILDSTDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ Thanks, Richard |
From: Barry S. <ba...@ba...> - 2018-04-16 18:52:17
|
> On 12 Apr 2018, at 15:59, Richard Shaw <hob...@gm...> wrote: > > ifPyErrorThrowCxxException You need to compile ./Src/Python2/cxx_exceptions.cxx to get this and other functions. It new in the V7 series. Barry |
From: Richard S. <hob...@gm...> - 2018-04-12 15:00:10
|
I'm trying to build FreeCAD with pycxx 7.0.3. I think they bundle 6.2.8 in the source archive but as Fedora strongly discourages bundled projects I'm attempting to build with the version available in Fedora. I'm running into a build error that I'm not able to fix. Usually a undefined reference during linking is due to missing a library, but as pycxx is a copy-lib, there's nothing to link to. The full error is: [ 24%] Linking CXX shared library ../../lib/libFreeCADBase.so cd /builddir/build/BUILD/FreeCAD-0.17/build/src/Base && /usr/bin/cmake -E cmake_link_script CMakeFiles/FreeCADBase.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -Wall -Wextra -Wno-write-strings -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -mcet -fcf-protection -std=c++11 -D_OCC64 -Wl,--no-undefined -shared -Wl,-soname,libFreeCADBase.so -o ../../lib/libFreeCADBase.so CMakeFiles/FreeCADBase.dir/usr/src/CXX/cxxextensions.c.o CMakeFiles/FreeCADBase.dir/usr/src/CXX/cxx_extensions.cxx.o CMakeFiles/FreeCADBase.dir/usr/src/CXX/cxxsupport.cxx.o CMakeFiles/FreeCADBase.dir/usr/src/CXX/IndirectPythonInterface.cxx.o CMakeFiles/FreeCADBase.dir/Axis.cpp.o CMakeFiles/FreeCADBase.dir/AxisPyImp.cpp.o CMakeFiles/FreeCADBase.dir/Base64.cpp.o CMakeFiles/FreeCADBase.dir/BaseClass.cpp.o CMakeFiles/FreeCADBase.dir/BaseClassPyImp.cpp.o CMakeFiles/FreeCADBase.dir/BoundBoxPyImp.cpp.o CMakeFiles/FreeCADBase.dir/Builder3D.cpp.o CMakeFiles/FreeCADBase.dir/Console.cpp.o CMakeFiles/FreeCADBase.dir/CoordinateSystem.cpp.o CMakeFiles/FreeCADBase.dir/CoordinateSystemPyImp.cpp.o CMakeFiles/FreeCADBase.dir/Debugger.cpp.o CMakeFiles/FreeCADBase.dir/Exception.cpp.o CMakeFiles/FreeCADBase.dir/ExceptionFactory.cpp.o CMakeFiles/FreeCADBase.dir/Factory.cpp.o CMakeFiles/FreeCADBase.dir/FileInfo.cpp.o CMakeFiles/FreeCADBase.dir/FileTemplate.cpp.o CMakeFiles/FreeCADBase.dir/FutureWatcherProgress.cpp.o CMakeFiles/FreeCADBase.dir/gzstream.cpp.o CMakeFiles/FreeCADBase.dir/GeometryPyCXX.cpp.o CMakeFiles/FreeCADBase.dir/Handle.cpp.o CMakeFiles/FreeCADBase.dir/InputSource.cpp.o CMakeFiles/FreeCADBase.dir/Interpreter.cpp.o CMakeFiles/FreeCADBase.dir/Matrix.cpp.o CMakeFiles/FreeCADBase.dir/MatrixPyImp.cpp.o CMakeFiles/FreeCADBase.dir/MemDebug.cpp.o CMakeFiles/FreeCADBase.dir/Parameter.cpp.o CMakeFiles/FreeCADBase.dir/ParameterPy.cpp.o CMakeFiles/FreeCADBase.dir/Persistence.cpp.o CMakeFiles/FreeCADBase.dir/PersistencePyImp.cpp.o CMakeFiles/FreeCADBase.dir/Placement.cpp.o CMakeFiles/FreeCADBase.dir/PlacementPyImp.cpp.o CMakeFiles/FreeCADBase.dir/PyExport.cpp.o CMakeFiles/FreeCADBase.dir/PyObjectBase.cpp.o CMakeFiles/FreeCADBase.dir/Reader.cpp.o CMakeFiles/FreeCADBase.dir/Rotation.cpp.o CMakeFiles/FreeCADBase.dir/RotationPyImp.cpp.o CMakeFiles/FreeCADBase.dir/Sequencer.cpp.o CMakeFiles/FreeCADBase.dir/Stream.cpp.o CMakeFiles/FreeCADBase.dir/Swap.cpp.o CMakeFiles/FreeCADBase.dir/swigpyrun_1.3.25.cpp.o CMakeFiles/FreeCADBase.dir/swigpyrun_1.3.33.cpp.o CMakeFiles/FreeCADBase.dir/swigpyrun_1.3.36.cpp.o CMakeFiles/FreeCADBase.dir/swigpyrun_1.3.38.cpp.o CMakeFiles/FreeCADBase.dir/swigpyrun_1.3.40.cpp.o CMakeFiles/FreeCADBase.dir/swigpyrun.cpp.o CMakeFiles/FreeCADBase.dir/TimeInfo.cpp.o CMakeFiles/FreeCADBase.dir/Tools.cpp.o CMakeFiles/FreeCADBase.dir/Tools2D.cpp.o CMakeFiles/FreeCADBase.dir/Type.cpp.o CMakeFiles/FreeCADBase.dir/Uuid.cpp.o CMakeFiles/FreeCADBase.dir/Vector3D.cpp.o CMakeFiles/FreeCADBase.dir/VectorPyImp.cpp.o CMakeFiles/FreeCADBase.dir/Writer.cpp.o CMakeFiles/FreeCADBase.dir/XMLTools.cpp.o CMakeFiles/FreeCADBase.dir/UnitsApi.cpp.o CMakeFiles/FreeCADBase.dir/UnitsApiPy.cpp.o CMakeFiles/FreeCADBase.dir/UnitsSchema.cpp.o CMakeFiles/FreeCADBase.dir/UnitsSchemaInternal.cpp.o CMakeFiles/FreeCADBase.dir/UnitsSchemaMKS.cpp.o CMakeFiles/FreeCADBase.dir/UnitsSchemaImperial1.cpp.o CMakeFiles/FreeCADBase.dir/UnitsSchemaCentimeters.cpp.o CMakeFiles/FreeCADBase.dir/UnitsSchemaMmMin.cpp.o CMakeFiles/FreeCADBase.dir/Quantity.cpp.o CMakeFiles/FreeCADBase.dir/QuantityPyImp.cpp.o CMakeFiles/FreeCADBase.dir/Unit.cpp.o CMakeFiles/FreeCADBase.dir/UnitPyImp.cpp.o CMakeFiles/FreeCADBase.dir/PyTools.c.o CMakeFiles/FreeCADBase.dir/PreCompiled.cpp.o -lpython2.7 -lxerces-c -lboost_filesystem -lboost_program_options -lboost_regex -lboost_signals -lboost_system -lboost_thread -lboost_chrono -lboost_date_time -lboost_atomic -lz -lQtCore -lutil -ldl -lzipios BUILDSTDERR: CMakeFiles/FreeCADBase.dir/usr/src/CXX/cxx_extensions.cxx.o: In function `Py::Object::validate()': BUILDSTDERR: /usr/src/CXX/Python2/cxx_extensions.cxx:122: undefined reference to `Py::ifPyErrorThrowCxxException()' BUILDSTDERR: CMakeFiles/FreeCADBase.dir/usr/src/CXX/cxx_extensions.cxx.o: In function `Py::PythonExtensionBase::callOnSelf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Py::Object const&, Py::Object const&, Py::Object const&, Py::Object const&, Py::Object const&, Py::Object const&, Py::Object const&, Py::Object const&, Py::Object const&)': BUILDSTDERR: /usr/include/CXX/Python2/Objects.hxx:2450: undefined reference to `Py::ifPyErrorThrowCxxException()' BUILDSTDERR: /usr/include/CXX/Python2/Objects.hxx:2426: undefined reference to `Py::ifPyErrorThrowCxxException()' BUILDSTDERR: /usr/include/CXX/Python2/Objects.hxx:2426: undefined reference to `Py::ifPyErrorThrowCxxException()' BUILDSTDERR: /usr/include/CXX/Python2/Objects.hxx:2426: undefined reference to `Py::ifPyErrorThrowCxxException()' BUILDSTDERR: CMakeFiles/FreeCADBase.dir/usr/src/CXX/cxx_extensions.cxx.o:/usr/include/CXX/Python2/Objects.hxx:2426: more undefined references to `Py::ifPyErrorThrowCxxException()' follow BUILDSTDERR: collect2: error: ld returned 1 exit status BUILDSTDERR: make[2]: *** [src/Base/CMakeFiles/FreeCADBase.dir/build.make:1262: lib/libFreeCADBase.so] Error 1 Thanks, Richard |
From: Barry S. <ba...@ba...> - 2017-06-05 20:49:45
|
> On 5 Jun 2017, at 06:05, madan kumar yelburgi <mad...@gm...> wrote: > > Hi, > I'm new to pycxx and i installed and ran the demos using pycxx 7.0.2. > > But i did not get how can you use pycxx extension in a c++ code like say "hello world" in visual studio and how do you call it in a command window or a python interpreter. > > I really did not understand from the demo examples and their building. so can you please give me suggestion, how can this be achieved. > > I tried building using setup.py in my file and try to build but didn't get it and there's not much videos or snippets of pycxx basic examples except the demos in installed folder, which i found hard to understand. Please help me in this. > > Any Links to basic c++ example with pycxx extension and the way how it's called in the interpreter would give me a good understanding. Given you have built pycxx examples I suggest you look at Demo/python3/simple.cxx. From python3 you can import simple to play with the code. There are 3 things to pay attention to: 1) the module at liunen 215 > > > Thanks, > Madan > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ > CXX-Users mailing list > CXX...@li... > https://lists.sourceforge.net/lists/listinfo/cxx-users |
From: Barry S. <ba...@ba...> - 2017-06-05 20:07:39
|
> On 5 Jun 2017, at 06:05, madan kumar yelburgi <mad...@gm...> wrote: > > Hi, > I'm new to pycxx and i installed and ran the demos using pycxx 7.0.2. > > But i did not get how can you use pycxx extension in a c++ code like say "hello world" in visual studio and how do you call it in a command window or a python interpreter. > > I really did not understand from the demo examples and their building. so can you please give me suggestion, how can this be achieved. > > I tried building using setup.py in my file and try to build but didn't get it and there's not much videos or snippets of pycxx basic examples except the demos in installed folder, which i found hard to understand. Please help me in this. > > Any Links to basic c++ example with pycxx extension and the way how it's called in the interpreter would give me a good understanding Opss did not mean to send that email unfinshed. Given you have built pycxx examples I suggest you look at Demo/python3/simple.cxx. From python3 you can import simple to play with the code. There are 3 things to pay attention to: 1) the module at line 215 2) the module level func at line 274 3) the class at line 21 and its different types of functions. Here is what I do on mac to test. $ python3.6 setup_makefile.py macosx Makefile $ make clean $ make test And to play with simple module: $ PYTHONPATH=obj python3.6 Python 3.6.0 (v3.6.0:41df79263a11, Dec 22 2016, 17:23:13) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import simple sizeof(int) 4 sizeof(long) 8 sizeof(Py_hash_t) 8 sizeof(Py_ssize_t) 8 >>> simple.func() func Called with 0 normal arguments. and with 0 keyword arguments: >>> Barry > > Thanks, > Madan > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ > CXX-Users mailing list > CXX...@li... > https://lists.sourceforge.net/lists/listinfo/cxx-users |
From: madan k. y. <mad...@gm...> - 2017-06-05 05:06:02
|
Hi, I'm new to pycxx and i installed and ran the demos using pycxx 7.0.2. But i did not get how can you use pycxx extension in a c++ code like say "hello world" in visual studio and how do you call it in a command window or a python interpreter. I really did not understand from the demo examples and their building. so can you please give me suggestion, how can this be achieved. I tried building using setup.py in my file and try to build but didn't get it and there's not much videos or snippets of pycxx basic examples except the demos in installed folder, which i found hard to understand. Please help me in this. Any Links to basic c++ example with pycxx extension and the way how it's called in the interpreter would give me a good understanding. Thanks, Madan |
From: Barry S. <ba...@ba...> - 2017-04-23 08:47:09
|
Version: 7.0.3 (23-April-2017) Update Py::Long to support long long consistently between Python2 and Python3. Barry p.s. Fixed subject line... |
From: Barry S. <ba...@ba...> - 2017-04-23 08:45:24
|
Version: 7.0.3 (23-April-2017) Update Py::Long to support long long consistently between Python2 and Python3. Barry |
From: Barry S. <ba...@ba...> - 2017-04-16 11:08:32
|
Version: 7.0.2 (16-April-2017) Add Py::Char ord() method to return the long value of a character. Fix String::size() that could return twice the actual length. This affected as_ucs4string() which would return a string with its second half as uninitialised memory. Fix setup.py for the Demo code to build all the required C++ code. Barry |
From: Barry S. <ba...@ba...> - 2016-09-07 17:28:39
|
Version: 7.0.1 (29-Aug-2016) Add extra methods to Py::String that as needed on Windows to support full unicode range of code points. On Windows Python defines Py_UNICODE as unsigned short, which is too small to hold all Unicode values. PyCXX has added to the Py::String API to support creating from Py_UCS4 strings and converting Py::String() into Py::ucs4string objects. Fix validate for Bytes to use the correct check function. Barry |
From: Barry S. <ba...@ba...> - 2016-08-17 09:54:20
|
Version 7.0.0 (15-Aug-2016) Warning: This version fixes a number of problems that require source incompatible changes. However by defining PYCXX_6_2_COMPATIBILITY the V6.2.x API is restored. This is not recommended for new code. The first version of python3 that is supported is 3.3. A special thanks goes to Benjamin Webb, working at the US Army Engineer Research and Development Center, who has contributed to the design and testing of this release. 7.0.0 is better for his work. New source file needs to built: Src/cxx_exceptions.cxx. This file implements the new exception handling features. Fix the type used for lengths and sequence indexes to use Py_ssize_t. This will require sources changes for users of PyCXX. Implement smart handling of Exceptions between C++ and Python. You can now catch exceptions in C++ by type that are raised in C++ or Python. All builtin exceptions are support and are user defined exceptions. The base exception type is now BaseException not Exception. To upgrade source code replace all use of Exception with BaseException. The documentation has been updated to describe the new exception features. The supportSequence, supportMapping, supportNumber etc functions now take a bit mask that defines which specific callbacks are handled. Barry |
From: Barry S. <ba...@ba...> - 2016-07-22 14:11:52
|
I am nearing the point of releasing PyCXX 7.0.0. It fixes a number of issues with using 32bit offsets when python uses 64 bit offsets. What this means is that code will fail to compile against 7.0.0 until long/int is replaces with Py_ssize_t for example in the return type for a sequence_length(). The other change is in the setup of types. You can now tell PyCXX which functions to hook up to python on a function by function choice. I encourage any of you that depend on PyCXX to test out the 7.0.0 code from SVN and see what you think. Barry |
From: Barry S. <ba...@ba...> - 2016-06-25 17:18:19
|
My plan is to keep maintaining PyCXX 6.2 with fixes for the time being. In parallel I will release a Beta for PyCXX 7.0 for testing and feedback. I have bumped the version to 7.0 because of the extensive changes to way exceptions are handled in PyCXX. 7.0.0 should be compatible with earlier code, however this needs testing. The major feature of 7.0 is that you can raise and catch all standard python exceptions and any C++ user defined exceptions in an obvious way: try { Py::Callable callback = …; callback.apply( args ); } catch( Py::LookupError &e ) { e.clear(); std::cerr << “Lookup error” << std::endl; } Before you would have had to catch Py::Exception and then match to lookup error. You can have any nesting of C++ and python code calling each other and the exception will rise up the stack until caught by C++ or python code. Demo/Python3/simple.cpp and test_simple.py show how to use the new features. 7.0.0 has been tested on Windows, macOS and Fedora. 32 and 64 bit python has been tested as well as python versions 2.6, 2.7, 3.3, 3.4 and 3.5. Barry |
From: Barry S. <ba...@ba...> - 2016-06-25 11:48:37
|
I have implemented this fix as you suggested in r341. PyCxx uses PyCFunction_NewEx in all cases now. Barry > On 28 Apr 2016, at 19:02, kishor sharma <kis...@gm...> wrote: > > Sorry I hit enter too soon. > > >You might like to add a bug report to tack this issue. If you have a patch to add __module__ I’ll review and add. > > I kind of figured out the issue. Issue is we are using PyCFunction_New to register the modules in the method. If we replace PyCFunction_New with PyCFunction_NewEx it solves the problem with module level function > > e.g. PyObject* func = PyCFunction_NewEx(&method_def->ext_meth_def, new_reference_to(args), PyString_FromString(m_module_name.c_str()) > > I am not sure about how to fix problem for function in the extension class. Any help/pointers? > > On Thu, Apr 28, 2016 at 11:29 PM, kishor sharma <kis...@gm... <mailto:kis...@gm...>> wrote: > >You might like to add a bug report to tack this issue. If you have a patch to add __module__ I’ll review and add. > > I kind of figured out the issue. Issue is we are using PyCFunction_New to register the modules in the method. If we replace PyCFunction_New with PyCFunction_NewEx it solves the problem with module level function > > e.g. PyObject* func = PyCFunction_NewEx( > > > > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into multiple tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________ > CXX-Users mailing list > CXX...@li... > https://lists.sourceforge.net/lists/listinfo/cxx-users |
From: Barry S. <ba...@ba...> - 2016-05-25 19:31:37
|
If any of you have the time to look over the latest changes to PyCXX I would appreciate any feedback. I have added code to pycxx that allows exceptions raise in Python to be caught in C++ using the Python exception name. For example: try { call-python } catch( ValueError &e ) { // handle value error } catch( UserDefinedError &e ) { // handle user defined error } See Demon/Python3/simple.cxx and simple.py for example code. I have checked in the first pas of this code for python3 on trunk. (I also created a pycxx-6.2-maint branch) The way this works is to have a std::map (cxx_exceptions.cxx) that contains a map from python type objects to a function that will raise the C++ equivalent. The fucntion ifPyErrorThrowCxxException is called everywhere pycxx code is entered from python and an exception may have be raise. It will convert into a C++ exception and throw it. I think the code of SimpleError in simple.cxx is all boiler plate and I can turn that into a macros. One to declare the other to init. Barry |
From: Barry S. <ba...@ba...> - 2016-05-11 09:38:51
|
Version 6.2.8 (10-May-2016) * Fix crash when a member function is called via callMemberFunction() and that function raises an exception. * Found in comment on StackOverFlow. Fix memory size allocated for new objects. It used the wrong size calculation, but was big enough to avoid problems. |
From: kishor s. <kis...@gm...> - 2016-04-28 18:02:15
|
Sorry I hit enter too soon. >You might like to add a bug report to tack this issue. If you have a patch to add __module__ I’ll review and add. I kind of figured out the issue. Issue is we are using PyCFunction_New to register the modules in the method. If we replace PyCFunction_New with PyCFunction_NewEx it solves the problem with module level function e.g. PyObject* func = PyCFunction_NewEx(&method_def->ext_meth_def, new_reference_to(args), PyString_FromString(m_module_name.c_str()) I am not sure about how to fix problem for function in the extension class. Any help/pointers? On Thu, Apr 28, 2016 at 11:29 PM, kishor sharma <kis...@gm...> wrote: > >You might like to add a bug report to tack this issue. If you have a > patch to add __module__ I’ll review and add. > > I kind of figured out the issue. Issue is we are using PyCFunction_New to > register the modules in the method. If we replace PyCFunction_New with > PyCFunction_NewEx it solves the problem with module level function > > e.g. PyObject* func = PyCFunction_NewEx( > > > |
From: kishor s. <kis...@gm...> - 2016-04-28 17:59:57
|
>You might like to add a bug report to tack this issue. If you have a patch to add __module__ I’ll review and add. I kind of figured out the issue. Issue is we are using PyCFunction_New to register the modules in the method. If we replace PyCFunction_New with PyCFunction_NewEx it solves the problem with module level function e.g. PyObject* func = PyCFunction_NewEx( |
From: Barry S. <ba...@ba...> - 2016-04-28 12:17:31
|
Version 6.2.7 (28-Apr-2016) * Fix missing ptr__Unicode_Type. * Fixes from lea...@gm... make python2 also remember the m_module and add accessor functions. * Fix for indirection issues from Vivian De Smedt. * Update to work with latest Microsoft Visual C++ for python 2.7. All test run in Win32 and Win64. * PyCXX.html documention has been updated, especially with 2TO3 information. * Use delete[] for objects allocated with new[]. Barry |
From: Barry S. <ba...@ba...> - 2016-04-28 10:21:35
|
> On 28 Apr 2016, at 10:12, kishor sharma <kis...@gm...> wrote: > > >Its been a long time since I used pickle. Personally I would avoid pickle because of the security and robustness issues. > > Anyway. It looks like if you want to pickle an extension object you have to implement the > __reduce__ and/or __reduce_ex__ methods. You would have to see what pickle does with the tuple returned by __reduce__ to recreate the objects. You can also register functions to assist pickle. > > Given that the reason a C++ extension module is created is to wrap around complex resources I wonder if > its reasonable to attempt to pickle a C++ object. > > > Thanks Barry. If we leave pickling issue for a while, do you know why __module__ is not when we create the extension using PyCXX though we pass the module name using below > > example_module() > : Py::ExtensionModule<example_module>( "example" ) > > Most of the python extension module have __module__ set which PyCXX extension doesn't. > > In [4]: cPickle.load.__module__ > Out[4]: 'cPickle' > > > Any thoughts? The module interface has changed a lot over time. No one noticed the need to have __module__ on the extension module. It is clearly not that important to python or we would have seen problems before now. If seem to be a low priority to fix if only pickle is affected and pickle is not useful to use with C++ extensions. You might like to add a bug report to tack this issue. If you have a patch to add __module__ I’ll review and add. Barry > > Thanks, > Kishor > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into multiple tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________ > CXX-Users mailing list > CXX...@li... > https://lists.sourceforge.net/lists/listinfo/cxx-users |
From: kishor s. <kis...@gm...> - 2016-04-28 09:12:33
|
>Its been a long time since I used pickle. Personally I would avoid pickle because of the security and robustness issues. Anyway. It looks like if you want to pickle an extension object you have to implement the __reduce__ and/or __reduce_ex__ methods. You would have to see what pickle does with the tuple returned by __reduce__ to recreate the objects. You can also register functions to assist pickle. Given that the reason a C++ extension module is created is to wrap around complex resources I wonder if its reasonable to attempt to pickle a C++ object. Thanks Barry. If we leave pickling issue for a while, do you know why __module__ is not when we create the extension using PyCXX though we pass the module name using below example_module() : Py::ExtensionModule<example_module>( *"example"* ) Most of the python extension module have __module__ set which PyCXX extension doesn't. In [4]: cPickle.load.__module__ Out[4]: 'cPickle' Any thoughts? Thanks, Kishor |
From: Barry S. <ba...@ba...> - 2016-04-27 20:15:46
|
> On 27 Apr 2016, at 20:24, kishor sharma <kis...@gm...> wrote: > > Hi CXX Users, > > I am using PyCXX to write extension classes. I am trying to pickle the extension object using cPickle. cPickle break as __module__ attribute is not on the objects > e.g. > > In [1]: import example > range object created 0x196b290 > range object destroyed 0x196b290 > > In [2]: example.range.__name__ > Out[2]: 'range' > > In [3]: example.range.__doc__ > Out[3]: 'range(start,stop,stride)' > > In [4]: example.range.__module__ > > In [5]: example.range.__module__ is None > Out[5]: True > > I tried debugging the code it seems to be passing correct module name to Py_InitModule4 function but it is not reflected in the python. > > Any help/pointers on how to fix? Its been a long time since I used pickle. Personally I would avoid pickle because of the security and robustness issues. Anyway. It looks like if you want to pickle an extension object you have to implement the __reduce__ and/or __reduce_ex__ methods. You would have to see what pickle does with the tuple returned by __reduce__ to recreate the objects. You can also register functions to assist pickle. Given that the reason a C++ extension module is created is to wrap around complex resources I wonder if its reasonable to attempt to pickle a C++ object. Barry > > Thanks, > Kishor Sharma > ------------------------------------------------------------------------------ > Find and fix application performance issues faster with Applications Manager > Applications Manager provides deep performance insights into multiple tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________ > CXX-Users mailing list > CXX...@li... > https://lists.sourceforge.net/lists/listinfo/cxx-users |