[pypy-commit] pypy default: fix the test to match 432d816c6d7b
Author: Armin Rigo Branch: Changeset: r95673:de85e0ef8bdc Date: 2019-01-19 18:06 +0100 http://bitbucket.org/pypy/pypy/changeset/de85e0ef8bdc/ Log:fix the test to match 432d816c6d7b diff --git a/rpython/memory/gc/test/test_direct.py b/rpython/memory/gc/test/test_direct.py --- a/rpython/memory/gc/test/test_direct.py +++ b/rpython/memory/gc/test/test_direct.py @@ -774,7 +774,7 @@ def test_collect_0(self, debuglog): self.gc.collect(1) # start a major debuglog.reset() -self.gc.collect(0) # do ONLY a minor +self.gc.collect(-1) # do ONLY a minor assert debuglog.summary() == {'gc-minor': 1} def test_enable_disable(self, debuglog): ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy unicode-utf8: fill_char can be a utf8 multibyte codepoint
Author: Matti Picus Branch: unicode-utf8 Changeset: r95674:25ff5465e2c1 Date: 2019-01-19 22:12 +0200 http://bitbucket.org/pypy/pypy/changeset/25ff5465e2c1/ Log:fill_char can be a utf8 multibyte codepoint diff --git a/pypy/objspace/std/newformat.py b/pypy/objspace/std/newformat.py --- a/pypy/objspace/std/newformat.py +++ b/pypy/objspace/std/newformat.py @@ -740,7 +740,7 @@ to_remainder, upper, grouped_digits=None): out = self._builder() if spec.n_lpadding: -out.append_multiple_char(fill_char[0], spec.n_lpadding) +out.append_multiple_char(fill_char, spec.n_lpadding) if spec.n_sign: sign = self._lit(spec.sign) out.append(sign) @@ -750,7 +750,7 @@ pref = self._upcase_string(pref) out.append(pref) if spec.n_spadding: -out.append_multiple_char(fill_char[0], spec.n_spadding) +out.append_multiple_char(fill_char, spec.n_spadding) if spec.n_digits != 0: if self._loc_thousands: if grouped_digits is not None: @@ -770,7 +770,7 @@ if spec.n_remainder: out.append(num[to_remainder:]) if spec.n_rpadding: -out.append_multiple_char(fill_char[0], spec.n_rpadding) +out.append_multiple_char(fill_char, spec.n_rpadding) #if complex, need to call twice - just retun the buffer return out.build() diff --git a/pypy/objspace/std/test/test_unicodeobject.py b/pypy/objspace/std/test/test_unicodeobject.py --- a/pypy/objspace/std/test/test_unicodeobject.py +++ b/pypy/objspace/std/test/test_unicodeobject.py @@ -1133,6 +1133,8 @@ def test_format_repeat(self): assert format(u"abc", u"z<5") == u"abczz" assert format(u"abc", u"\u2007<5") == u"abc\u2007\u2007" +#CPython2 raises UnicodeEncodeError +assert format(123, u"\u2007<5") == u"123\u2007\u2007" def test_formatting_char(self): for num in range(0x80,0x100): ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy unicode-utf8-py3: merge unicode-utf8 into branch
Author: Matti Picus Branch: unicode-utf8-py3 Changeset: r95675:c01df448bea6 Date: 2019-01-19 22:14 +0200 http://bitbucket.org/pypy/pypy/changeset/c01df448bea6/ Log:merge unicode-utf8 into branch diff --git a/pypy/objspace/std/newformat.py b/pypy/objspace/std/newformat.py --- a/pypy/objspace/std/newformat.py +++ b/pypy/objspace/std/newformat.py @@ -751,7 +751,7 @@ to_remainder, upper, grouped_digits=None): out = self._builder() if spec.n_lpadding: -out.append_multiple_char(fill_char[0], spec.n_lpadding) +out.append_multiple_char(fill_char, spec.n_lpadding) if spec.n_sign: sign = self._lit(spec.sign) out.append(sign) @@ -761,7 +761,7 @@ pref = self._upcase_string(pref) out.append(pref) if spec.n_spadding: -out.append_multiple_char(fill_char[0], spec.n_spadding) +out.append_multiple_char(fill_char, spec.n_spadding) if spec.n_digits != 0: if self._loc_thousands: if grouped_digits is not None: @@ -781,7 +781,7 @@ if spec.n_remainder: out.append(num[to_remainder:]) if spec.n_rpadding: -out.append_multiple_char(fill_char[0], spec.n_rpadding) +out.append_multiple_char(fill_char, spec.n_rpadding) #if complex, need to call twice - just retun the buffer return out.build() diff --git a/pypy/objspace/std/test/test_unicodeobject.py b/pypy/objspace/std/test/test_unicodeobject.py --- a/pypy/objspace/std/test/test_unicodeobject.py +++ b/pypy/objspace/std/test/test_unicodeobject.py @@ -1130,6 +1130,8 @@ def test_format_repeat(self): assert format(u"abc", u"z<5") == u"abczz" assert format(u"abc", u"\u2007<5") == u"abc\u2007\u2007" +#CPython2 raises UnicodeEncodeError +assert format(123, u"\u2007<5") == u"123\u2007\u2007" def test_formatting_unicode__repr__(self): # Printable character ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit
[pypy-commit] pypy default: Support for revdb translation
Author: Armin Rigo Branch: Changeset: r95676:30d8fded3b4f Date: 2019-01-19 23:36 +0100 http://bitbucket.org/pypy/pypy/changeset/30d8fded3b4f/ Log:Support for revdb translation diff --git a/pypy/module/gc/__init__.py b/pypy/module/gc/__init__.py --- a/pypy/module/gc/__init__.py +++ b/pypy/module/gc/__init__.py @@ -4,7 +4,6 @@ class Module(MixedModule): interpleveldefs = { 'collect': 'interp_gc.collect', -'collect_step': 'interp_gc.collect_step', 'enable': 'interp_gc.enable', 'disable': 'interp_gc.disable', 'isenabled': 'interp_gc.isenabled', @@ -23,6 +22,7 @@ 'get_stats': 'app_referents.get_stats', }) self.interpleveldefs.update({ +'collect_step': 'interp_gc.collect_step', 'get_rpy_roots': 'referents.get_rpy_roots', 'get_rpy_referents': 'referents.get_rpy_referents', 'get_rpy_memory_usage': 'referents.get_rpy_memory_usage', diff --git a/rpython/translator/c/src/mem.h b/rpython/translator/c/src/mem.h --- a/rpython/translator/c/src/mem.h +++ b/rpython/translator/c/src/mem.h @@ -112,6 +112,8 @@ #define OP_GC__DISABLE_FINALIZERS(r) boehm_gc_finalizer_lock++ #define OP_GC__ENABLE_FINALIZERS(r) (boehm_gc_finalizer_lock--, \ boehm_gc_finalizer_notifier()) +#define OP_GC__DISABLE(r) /* nothing */ +#define OP_GC__ENABLE(r) /* nothing */ #define OP_BOEHM_FQ_REGISTER(tagindex, obj, r) \ boehm_fq_register(boehm_fq_queues + tagindex, obj) @@ -127,6 +129,8 @@ #define OP_BOEHM_DISAPPEARING_LINK(link, obj, r) /* nothing */ #define OP_GC__DISABLE_FINALIZERS(r) /* nothing */ #define OP_GC__ENABLE_FINALIZERS(r) /* nothing */ +#define OP_GC__DISABLE(r) /* nothing */ +#define OP_GC__ENABLE(r) /* nothing */ #define GC_REGISTER_FINALIZER(a, b, c, d, e) /* nothing */ #define GC_gcollect() /* nothing */ #define GC_set_max_heap_size(a) /* nothing */ ___ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit