This commit is contained in:
Eric Froemling 2020-06-03 16:55:52 -07:00
parent 58766a8f6e
commit 8fd97b1ee9
6 changed files with 21 additions and 6 deletions

View File

@ -41,6 +41,7 @@
<w>adbcfaca</w>
<w>adbpath</w>
<w>addgame</w>
<w>addlevel</w>
<w>addr</w>
<w>addrstr</w>
<w>adisp</w>
@ -344,6 +345,7 @@
<w>compounddict</w>
<w>compoundlist</w>
<w>conditionalize</w>
<w>configdict</w>
<w>configerror</w>
<w>confighash</w>
<w>configkey</w>
@ -619,6 +621,7 @@
<w>fdict</w>
<w>fecfc</w>
<w>feedparser</w>
<w>ffaeff</w>
<w>ffap</w>
<w>fhash</w>
<w>fhashes</w>
@ -761,6 +764,7 @@
<w>genutils</w>
<w>getaccountid</w>
<w>getactivity</w>
<w>getcampaign</w>
<w>getclass</w>
<w>getcollide</w>
<w>getcollidemodel</w>
@ -772,7 +776,9 @@
<w>getdata</w>
<w>getinputdevice</w>
<w>getkillerplayer</w>
<w>getlevel</w>
<w>getlevelname</w>
<w>getlevels</w>
<w>getlog</w>
<w>getmaps</w>
<w>getmodel</w>

View File

@ -159,6 +159,7 @@ def test_assign() -> None:
dataclass_assign(tclass, {'lfval': [1]})
# noinspection PyTypeHints
def test_validate() -> None:
"""Testing validation."""

View File

@ -80,6 +80,7 @@ class EntityTest(entity.Entity):
fval2 = entity.Field('f2', entity.Float3Value())
# noinspection PyTypeHints
def test_entity_values() -> None:
"""Test various entity assigns for value and type correctness."""
ent = EntityTest()
@ -133,6 +134,7 @@ def test_entity_values() -> None:
assert dict(ent.str_int_dict.items()) == {'foo': 123}
# noinspection PyTypeHints
def test_entity_values_2() -> None:
"""Test various entity assigns for value and type correctness."""
@ -189,6 +191,7 @@ def test_entity_values_2() -> None:
assert static_type_equals(ent.grp.compoundlist[0].subval, bool)
# noinspection PyTypeHints
def test_field_copies() -> None:
"""Test copying various values between fields."""
ent1 = EntityTest()

View File

@ -121,6 +121,7 @@ class EntityMixin:
self.d_data = target.d_data
# Make sure target blows up if someone tries to use it.
# noinspection PyTypeHints
target.d_data = None # type: ignore
def pruned_data(self) -> Dict[str, Any]:

View File

@ -53,6 +53,7 @@ def utc_now() -> datetime.datetime:
return datetime.datetime.now(datetime.timezone.utc)
# noinspection PyUnresolvedReferences
def empty_weakref(objtype: Type[T]) -> ReferenceType[T]:
"""Return an invalidated weak-reference for the specified type."""
# At runtime, all weakrefs are the same; our type arg is just
@ -99,7 +100,7 @@ class DispatchMethodWrapper(Generic[TARG, TRET]):
registry: Dict[Any, Callable]
# noinspection PyProtectedMember
# noinspection PyProtectedMember,PyTypeHints
def dispatchmethod(
func: Callable[[Any, TARG],
TRET]) -> DispatchMethodWrapper[TARG, TRET]:

View File

@ -47,8 +47,11 @@ def build_apple(arch: str, debug: bool = False) -> None:
os.chdir(builddir)
# TEMP: Check out a particular commit while the branch head is broken.
# efrotools.run('git checkout 1a9c71dca298c03517e8236b81cf1d9c8c521cbf')
efrotools.run(f'git checkout {PYTHON_VERSION_MAJOR}')
# We can actually fix this to use the current one, but something
# broke in the underlying build even on old commits so keeping it
# locked for now...
efrotools.run('git checkout bf1ed73d0d5ff46862ba69dd5eb2ffaeff6f19b6')
# efrotools.run(f'git checkout {PYTHON_VERSION_MAJOR}')
# On mac we currently have to add the _scproxy module or urllib will
# fail.
@ -152,7 +155,7 @@ def build_apple(arch: str, debug: bool = False) -> None:
# Turn doc strings on; looks like it only adds a few hundred k.
txt = txt.replace('--without-doc-strings', '--with-doc-strings')
# We're currently aiming at 10.13+ on mac
# Set mac/ios version reqs
# (see issue with utimensat and futimens).
txt = efrotools.replace_one(txt, 'MACOSX_DEPLOYMENT_TARGET=10.8',
'MACOSX_DEPLOYMENT_TARGET=10.13')
@ -178,7 +181,7 @@ def build_apple(arch: str, debug: bool = False) -> None:
dline = 'python$(PYTHON_VER)m'
splitlen = len(txt.split(dline))
if splitlen != 14:
raise Exception('unexpected configure lines')
raise RuntimeError(f'Unexpected configure line count {splitlen}.')
txt = txt.replace(dline, 'python$(PYTHON_VER)dm')
efrotools.writefile('Makefile', txt)
@ -282,7 +285,7 @@ def build_android(rootdir: str, arch: str, debug: bool = False) -> None:
efrotools.writefile('pybuild/packages/python.py', ftxt)
# Set this to a particular cpython commit to target exact releases from git
commit = '43364a7ae01fbe4288ef42622259a0038ce1edcc' # 3.7.6 release
commit = 'd7c567b08f9d7d6aef21b881340a2b72731129db' # 3.7.7 release
if commit is not None:
ftxt = efrotools.readfile('pybuild/source.py')