forked from thepian/pypy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--HG-- branch : ffistruct
- Loading branch information
Showing
11 changed files
with
307 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import py | ||
import pypy | ||
from commands import getoutput | ||
ROOT = py.path.local(pypy.__file__).dirpath().dirpath() | ||
|
||
|
||
def parse_doc(s): | ||
startrev = None | ||
branches = set() | ||
def parseline(line): | ||
_, value = line.split(':', 1) | ||
return value.strip() | ||
# | ||
for line in s.splitlines(): | ||
if line.startswith('.. startrev:'): | ||
startrev = parseline(line) | ||
elif line.startswith('.. branch:'): | ||
branches.add(parseline(line)) | ||
return startrev, branches | ||
|
||
def get_merged_branches(path, startrev, endrev): | ||
# X = take all the merges which are descendants of startrev and are on default | ||
# revset = all the parents of X which are not on default | ||
# ===> | ||
# revset contains all the branches which have been merged to default since | ||
# startrev | ||
revset = 'parents(%s::%s and \ | ||
merge() and \ | ||
branch(default)) and \ | ||
not branch(default)' % (startrev, endrev) | ||
cmd = r"hg log -R '%s' -r '%s' --template '{branches}\n'" % (path, revset) | ||
out = getoutput(cmd) | ||
branches = set(map(str.strip, out.splitlines())) | ||
return branches | ||
|
||
|
||
def test_parse_doc(): | ||
s = """ | ||
===== | ||
Title | ||
===== | ||
.. startrev: 12345 | ||
bla bla bla bla | ||
.. branch: foobar | ||
xxx yyy zzz | ||
.. branch: hello | ||
qqq www ttt | ||
""" | ||
startrev, branches = parse_doc(s) | ||
assert startrev == '12345' | ||
assert branches == set(['foobar', 'hello']) | ||
|
||
def test_get_merged_branches(): | ||
branches = get_merged_branches(ROOT, 'f34f0c11299f', '79770e0c2f93') | ||
assert branches == set(['numpy-indexing-by-arrays-bool', | ||
'better-jit-hooks-2', | ||
'numpypy-ufuncs']) | ||
|
||
def test_whatsnew(): | ||
doc = ROOT.join('pypy', 'doc') | ||
whatsnew_list = doc.listdir('whatsnew-*.rst') | ||
whatsnew_list.sort() | ||
last_whatsnew = whatsnew_list[-1].read() | ||
startrev, documented = parse_doc(last_whatsnew) | ||
merged = get_merged_branches(ROOT, startrev, '') | ||
not_documented = merged.difference(documented) | ||
not_merged = documented.difference(merged) | ||
print 'Branches merged but not documented:' | ||
print '\n'.join(not_documented) | ||
print 'Branches documented but not merged:' | ||
print '\n'.join(not_merged) | ||
assert not not_documented and not not_merged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
====================== | ||
What's new in PyPy 1.9 | ||
====================== | ||
|
||
.. this is the revision just after the creation of the release-1.8.x branch | ||
.. startrev: a4261375b359 | ||
.. branch: array_equal | ||
.. branch: better-jit-hooks-2 | ||
.. branch: exception-cannot-occur | ||
.. branch: faster-heapcache | ||
.. branch: faster-str-decode-escape | ||
.. branch: float-bytes | ||
Added some pritives for dealing with floats as raw bytes. | ||
.. branch: float-bytes-2 | ||
Added more float byte primitives. | ||
.. branch: jit-frame-counter | ||
Put more debug info into resops. | ||
.. branch: kill-geninterp | ||
.. branch: kqueue | ||
Finished select.kqueue. | ||
.. branch: kwargsdict-strategy | ||
.. branch: matrixmath-dot | ||
numpypy can now handle matrix multiplication. | ||
.. branch: merge-2.7.2 | ||
The stdlib was updated to version 2.7.2 | ||
.. branch: ndmin | ||
.. branch: newindex | ||
.. branch: non-null-threadstate | ||
cpyext: Better support for PyEval_SaveThread and other PyTreadState_* | ||
functions. | ||
.. branch: numppy-flatitter | ||
.. branch: numpy-back-to-applevel | ||
.. branch: numpy-concatenate | ||
.. branch: numpy-indexing-by-arrays-bool | ||
.. branch: numpy-record-dtypes | ||
.. branch: numpy-single-jitdriver | ||
.. branch: numpy-ufuncs2 | ||
.. branch: numpy-ufuncs3 | ||
.. branch: numpypy-issue1137 | ||
.. branch: numpypy-out | ||
The "out" argument was added to most of the numypypy functions. | ||
.. branch: numpypy-shape-bug | ||
.. branch: numpypy-ufuncs | ||
.. branch: pytest | ||
.. branch: safe-getargs-freelist | ||
.. branch: set-strategies | ||
.. branch: speedup-list-comprehension | ||
.. branch: stdlib-unification | ||
The directory "lib-python/modified-2.7" has been removed, and its | ||
content merged into "lib-python/2.7". | ||
.. branch: step-one-xrange | ||
The common case of a xrange iterator with no step argument specifed | ||
was somewhat optimized. The tightest loop involving it, | ||
sum(xrange(n)), is now 18% faster on average. | ||
.. branch: string-NUL | ||
PyPy refuses filenames with chr(0) characters. This is implemented in | ||
RPython which can enforce no-NUL correctness and propagation, similar | ||
to const-correctness in C++. | ||
.. branch: win32-cleanup | ||
.. branch: win32-cleanup2 | ||
.. branch: win32-cleanup_2 | ||
Many bugs were corrected for windows 32 bit. New functionality was added to | ||
test validity of file descriptors, leading to the removal of the global | ||
_invalid_parameter_handler | ||
.. branch: win64-stage1 | ||
.. branch: zlib-mem-pressure | ||
.. "uninteresting" branches that we should just ignore for the whatsnew: | ||
.. branch: sanitize-finally-stack | ||
.. branch: revive-dlltool (preliminary work for sepcomp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.