From 36cda0a8c83eaaff977a951864269e6a37d16392 Mon Sep 17 00:00:00 2001 From: Haoyu Bai Date: Sun, 16 Aug 2009 06:04:07 +0000 Subject: [PATCH] documented Python 3 support in news [SVN r55608] --- doc/news.html | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/doc/news.html b/doc/news.html index a2418951..da57caeb 100644 --- a/doc/news.html +++ b/doc/news.html @@ -32,7 +32,43 @@
+
Current SVN
+
+
    +
  • Python 3 support:
  • +
      +
    • All the current Boost.Python test cases passed. Extension modules using + Boost.Python expected to support Python 3 smoothly.
    • +
    • Introduced object.contains where x.contains(y) + is equivalent to Python code y in x. + Now dict.has_key is just a wrapper of object.contains. +
    • +
    • When building against Python 3, str.decode will be removed.
    • +
    • When building against Python 3, the original signature of list.sort, which is: +
      void sort(object_cref cmpfunc);
      + will change to: +
      void sort(args_proxy const &args, kwds_proxy const &kwds);
      + + This is because in Python 3 list.sort requires all its arguments be keyword arguments. + So you should call it like this: +
      x.sort(*tuple(), **dict(make_tuple(make_tuple("reverse", true))));
      + +
    • +
    • According to PEP 3123, + when building Boost.Python against Python older than 2.6, the following macros will + be defined in Boost.Python header: +
      +# define Py_TYPE(o)    (((PyObject*)(o))->ob_type)
      +# define Py_REFCNT(o)  (((PyObject*)(o))->ob_refcnt)
      +# define Py_SIZE(o)    (((PyVarObject*)(o))->ob_size)
      + So extension writers can use these macro directly, to make code clean and compatible with Python 3. +
    • +
    +
+
+ +
1.39.0 Release