Skip to content

Commit 7e0e1fa

Browse files
authored
Merge branch 'master' into master
2 parents 8a8dabe + 8829b52 commit 7e0e1fa

740 files changed

Lines changed: 312494 additions & 57464 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ====== IDE Settings
2+
.idea/
3+
14
# ====== File extensions anywhere
25
*.nogit
36
*.pyc
@@ -13,7 +16,9 @@ __javascript__/
1316
__pycache__/
1417
.mypy_cache/
1518
dist/
19+
build/
1620
node_modules/
21+
venv/
1722

1823
# ======== Directories at specific locations
1924
transcrypt/docs/sphinx/_build/

.travis.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
dist: xenial
2-
sudo: yes
3-
4-
addons:
5-
chrome: stable
6-
apt:
7-
packages:
8-
- chromium-chromedriver
9-
10-
language: python
11-
python:
12-
- '3.7'
13-
14-
script:
15-
- bash ./transcrypt/development/continuous_integration/run.sh
1+
addons:
2+
chrome: stable
3+
apt:
4+
packages:
5+
- chromium-chromedriver
6+
7+
language: python
8+
python:
9+
- '3.9'
10+
11+
script:
12+
- bash ./transcrypt/development/continuous_integration/run.sh

LICENSE

Lines changed: 201 additions & 201 deletions
Large diffs are not rendered by default.

MANIFEST.in

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
global-include *.py *.js *.rst *.html *.css *.lyx *.pdf *.png *.gif *.jpg *.txt *.jar *.bat *
2-
global-exclude *.pyc .gitignore
3-
4-
prune .git
5-
prune dist
6-
prune transcrypt.egg-info
7-
prune transcrypt/development/attic
8-
prune transcrypt/development/docs
9-
prune transcrypt/development/experiments
1+
global-include *.py *.js *.rst *.html *.css *.lyx *.pdf *.png *.gif *.jpg *.txt *.jar *.bat *
2+
global-exclude *.pyc .gitignore workspace.*
3+
4+
prune .git
5+
prune .idea
6+
prune build
7+
prune dist
8+
prune transcrypt.egg-info
9+
prune venv
10+
prune transcrypt/ts_travis
11+
prune transcrypt/development/attic
12+
prune transcrypt/development/docs
13+
prune transcrypt/development/experiments

README.rst

Lines changed: 18 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
.. figure:: http://www.transcrypt.org/illustrations/ruler_banner2.png
1+
.. figure:: https://www.transcrypt.org/illustrations/ruler_banner2.png
22
:alt: Logo
3-
:target: http://www.transcrypt.org
3+
:target: https://www.transcrypt.org
44

5-
Python in the browser, precompiled for speed: http://www.transcrypt.org
6-
=======================================================================
5+
Python in the browser, precompiled for speed: https://www.transcrypt.org
6+
=========================================================================
77

88
- Precompiled into highly readable, efficient JavaScript, downloads kB's rather than MB's
99
- Multiple inheritance, optional operator overloading, metaclasses, async/await, properties, decorators, hierarchical modules etc.
1010
- Seamless integration with the universe of high-quality web-oriented JavaScript libraries, rather than the desktop-oriented Python ones
11-
- Pure Python 3.7 syntax, using Python's native parser
11+
- Pure Python 3.9 syntax, using Python's native parser
1212
- Debug directly from Python sourcecode, through integrated sourcemaps
1313
- Generates JavaScript for humans, resembling the Python source line by line, optionally annotated with source line numbers
1414
- Lightning fast JavaScript 6 code: call caching, for-loop optimization, in-line JavaScript etc.
@@ -18,11 +18,11 @@ Python in the browser, precompiled for speed: http://www.transcrypt.org
1818
- Apache 2.0 license
1919
- Pip-install and go!
2020

21-
Latest stable release: London
21+
Latest stable release: Berlin
2222
=============================
2323

24-
`>>> GET STARTED!_ <http://www.transcrypt.org/#hello>`_
25-
=======================================================
24+
`>>> GET STARTED! <https://www.transcrypt.org/#hello>`__
25+
========================================================
2626

2727
Thanks to everyone who contributed!
2828

@@ -33,7 +33,7 @@ As can be seen below, there's a simple parallel between the Python and the JavaS
3333
In combination with the use of sourcemaps, this enables efficient debugging.
3434
Also, code can be tested from the command prompt using stubs.
3535

36-
.. figure:: http://www.transcrypt.org/illustrations/class_compare.png
36+
.. figure:: https://www.transcrypt.org/illustrations/class_compare.png
3737
:alt: Screenshot of Python versus JavaScript code
3838

3939
**Classic OO with multiple inheritance in JavaScript**
@@ -47,13 +47,13 @@ Main differences with CPython
4747
License
4848
=======
4949

50-
Copyright 2014 - 2018 Jacques de Hooge, GEATEC engineering, www.geatec.com
50+
Copyright 2014 - 2023 Jacques de Hooge, GEATEC engineering, www.geatec.com
5151

5252
Licensed under the Apache License, Version 2.0 (the "License");
5353
you may not use this file except in compliance with the License.
5454
You may obtain a copy of the License at
5555

56-
http://www.apache.org/licenses/LICENSE-2.0
56+
https://www.apache.org/licenses/LICENSE-2.0
5757

5858
Unless required by applicable law or agreed to in writing, software
5959
distributed under the License is distributed on an "AS IS" BASIS,
@@ -67,6 +67,7 @@ How to contribute
6767
Transcrypt started out as a personal repo, owned by Jacques de Hooge.
6868
As the project caught on and the number of people contributing issues, ideas and code grew,
6969
the repo was transferred to the QQuick organisation, to be able to form a developer team on GitHub.
70+
Then more recently, to insure its continued development, the GitHub repo has been moved to `TranscryptOrg <https://github.com/TranscryptOrg>`_, where Transcrypt and related projects can be more centrally located.
7071

7172
There was also a clear message in this: Transcrypt isn't owned by anyone in particular.
7273
It is the collective property of everyone using it or contributing to it.
@@ -86,7 +87,7 @@ A special place is taken by implementing standard libraries. While Transcrypt mo
8687
availability of a limited number of standard libraries will help acceptance by Python programmers. So you're most welcome to make a contribution here.
8788
The design goal again is: better 90% complete, fast, small, and reliable, than 100% complete, slow, bulky and buggy.
8889
If you contribute a library, please also contribute an autotest (see docs) and some documentation for it.
89-
The supported platforms are Windows and Linux (and, with that, OsX).
90+
The supported platforms are Windows and Linux (and, with that, OSX).
9091

9192
While being open and respectful to any good ideas, the final say as to what gets in and what doesn't, is with Jacques.
9293
So this is a dictatorial rather than a democratic project.
@@ -98,144 +99,21 @@ In that case be sure to add the keyword Transcrypt to allow people to find your
9899
Making your package pip-installable will also help it to catch on.
99100
Contributing packages via PyPi of course means total freedom for the developer.
100101

101-
Development build status
102+
Deployment testing
102103
========================
103-
104-
.. image:: https://travis-ci.org/QQuick/Transcrypt.svg?branch=master
105-
:target: https://travis-ci.org/QQuick/Transcrypt
106-
107-
The icon above shows the outcome of the continous integration test that is done on Linux after each commit.
108-
The test consists of running a set of testlets, systematically covering all facilities of Transcrypt. Each testlet performs an automated back to back test against CPython.
109-
110104
The full set of testlets is described in the documentation and comes with the distribution.
111-
Since the branching model has been deliberately kept simple, continuous integration may be transiently broken.
112-
In that case you can use the latest passing version, that you'll find by clicking on the icon above and then on 'Build History'.
113-
114-
Each release, on the other hand, is preceded by at least the following tests:
105+
Each release is preceded by at least the following tests:
115106

116-
- The automated back to back test described above, not only on Linux but also on Windows and, in case of relevant issues, on OsX.
107+
- The automated back to back test described above, not only on Linux but also on Windows and, in case of relevant issues, on OSX.
117108
- Automated compilation of the manual tests, human exercising of the resulting applications and a visual check of the results.
118109
- Automated compilation of the demo's, human exercising of the resulting applications and a visual check of the results.
119110
- A documentation build, followed by a visual sample check.
120111

121112
What's new in the latest commits
122113
================================
123114

124-
- Parcel bundler demo simplified and added to demo directory, included in shipment test
125-
- Executable comments: skip code either in CPython or, with the skip pragma, in Transcrypt (issue 602)
126-
- Integration with Parcel bundler incl. auto-reload (issue 596)
127-
- Correct formatting of None fixed, autotests added (issue 494, issue 515)
128-
- Invalid link removed from doc (issue 595)
129-
- Fix for ameclass with 'async' verified (issue 543)
130-
- Fix for js_is and py_is aliases verified (issue 562)
131-
- Selenium tests tab switching and alert handling fixed
132-
- Compilation error reports fixed (pr584, issue 586)
133-
- Module paths can now contain dots (issue 578 revisited)
134-
- Module name can be reexported (pr 575)
135-
- Exported vars can contain $ (issue 578)
136-
- Import now can contain hyphens in filename (issue 576), (-am / -alimod switch)
137-
- Import and re-export via __init__.py fixed (issue 559)
138-
- Extension .py allowed for source file name on command line (issue 569)
139-
- Minimal recompilation (make versus build) fixed, was broken after introduction of modules (pull request 560)
140-
- -dl / -dlog "Log compiler messages to file" switch added
141-
- Static typing tutorial repaired
142-
- Builtin pow function added
143-
- Context managers added + testcases
144-
- Python 3.7 dataclasses added + testcases
145-
- Everything written in __target__ subdir rather than installation dir
146-
- Python modules now implemented as ES6 modules pervasively, multiple apps per page, runtime and libs only once
147-
- String formatting mini language added as an option (-sf / --sform switch) + autotest
148-
- Div internal improvements and fixes
149-
- Time module made suitable for use in combination with Node.js
150-
- Single line pragma's (issue 460) + doc + autotest
151-
- Negative list indices allowed when operator overloading is enabled (issue 460)
152-
- Added pragma's and switches jscall and nojscall, 30% speedup, use only locally for insulated methods in a class
153-
- Fix for callable (None) (issue 450)
154-
- Start made with /tutorials/baseline mini Python tutorial
155-
- Fix for decorator from module (issue 448)
156-
- Examples for datetime, time and re added to docs
157-
- Module datetime added (pr 435)
158-
- Conjugate of real now compiled correctly
159-
- Property decorators now supported for getters and setters
160-
- Metaclasses and method decorators now execute in correct order (issue 430)
161-
- Complex numbers now support comparison operators and conjugate
162-
- Max and min now accept sequences (issue 331)
163-
- Aliasers more completely dealt with in combination with keyword args and getattr, setattr, hasattr, delattr (issue 414)
164-
- Compiler switch -xt / --xtiny added to considerably reduce size of runtime if operator overloading isn't used
165-
- Compiler switch -dn / --dnostrip added to avoid stripping comments in __builtin__ and __core__
166-
- Comments in __builtin__ and __core__ JavaScript-only modules are now stripped by default
167-
- Initial support for bytes and bytearrays added (issue 405 a.o.)
168-
- Remark about heuristic interpretation of dictionary keys added to docs (issue 401)
169-
- Fisher-Yates shuffle added to random module
170-
- Exception type TypeError added, currently unused by Transcrypt itself (issue 365)
171-
- Name of main program file now really doesn't need .py extension anymore... (issue 416, bugfix)
172-
- Name of main program file doesn't need .py extension anymore (issue 416)
173-
- DRY implementation of __module__, lean enough to remove the -mc / --modclass switch
174-
- -mc / --modclass switch now controls generation of __module__ to prevent code bloat
175-
- Issue 397 a.o., __module__ attribute added to classes, __name__ of main module is now '__main__',
176-
- Enhancement for issue 399: __pragma__ ('keycheck') + command line switch + autotest
177-
- Fixes for issues 398, 412, 413 + autotests
178-
- __pragma__ ('xtrans', ...) added to facilitate partial translation by external tools (EXPERIMENTAL, issue 404, e.g. to deal with JSX)
179-
- Default messages for ValueError and KeyError removed for better CPython compatibility (pr 395)
180-
- Small fix of re module (issue 392)
181-
- Conversion from bool to int now succeeds (issue 391)
182-
- Overloadable operators __truediv__ and __floordiv__ added (issue 389)
183-
- Class methods, static methods, class decorators, method decorators and static method decorators
184-
- If an object doesn't have a specific string representation, function repr and str now return <object of type: object> rather than ???, and this case isn't reported as an error anymore
185-
- Function len now calls __len__ if it exists (pr 378)
186-
- More Pythonic truthyness when using -t (or --tconv) switch (pr 367 a.o.)
187-
- Source file spec on command line can now be a full path (free afer pr #362)
188-
- The zip function now also works for finite iterators (issue #369) + autotest
189-
- -xc (or --confimp) switch added, to confine imported names to the directly importing module (so prevent imports from being be transitive)
190-
- Cleaned up some generated files
191-
- Module search order fixed, continuous integration functional again
192-
- Regular expressions autotest workaround added for Python 3.6 enums
193-
- Async/await added + manual test
194-
- Made Python 3.6 the default in several places
195-
- Pragma and command line switch added to augment module search path
196-
- Better example of use of __getattr__ and __setattr__ added to autotest suite
197-
- Method dict.values () added
198-
- Demo added for three.js with encapsulated constructors
199-
- Doc link repaired
200-
- Fix for #317: Wrong exception type for aList ['aStringLiteral']
201-
- Enhancement for #316: filter doesn't support None for func
202-
- Enhancement for #314: float (' ') returns 0
203-
- Enhancement for #310: hasattr () raises 'Uncaught TypeError'
204-
- Enhancement for # 306: dict.popitem () added + autotest
205-
- Integrated with newest API of mypy
206-
- Fix for issue #304: Invalid JS when using global --opov flag
207-
- Fix for issue #301: zip broken for strings
208-
- Comment-like pragma's (issue #295) added: # \_\_pragma\_\_ (<parameters>)
209-
- Fix for issue #284 (+= problem) and autotest case
210-
- Bundled version 0.4.4 of mypy static typechecker replaced by dependency on mypy (currently 0.4.7)
211-
- Added in-place overloads for @=, \*\*=, %=, \*=, /=, +=, -=, <<=, >>=, \|=, ^=
212-
- Operator \*\*= added, a \*\*= b converted to a = a \*\* b
213-
- Operator @= added, M3 @= M2 converted to M3 = M3 @ M2, same as for other augmented assignment ops
214-
- Compilation error report now contains detailed import sequence
215-
- Enhancement for issue #281: tuple keys allowed for dictionaries
216-
- Enhancement for issue #26: super () added for unique path to single ancestor method
217-
- Fix for issue #279: TypeError exists both in Python and JavaScrip, needs alias
218-
- Fix for issue #277: Alias needed for new
219-
- Fix for issue #274: Cannot delete unqualified property in strict mode
220-
- Fix for issue #268: Module import trace missing in error messages
221-
- Autotest for regular expression module made part of shipment test and CI test. Some parts commented out, marked with @JdeH
222-
- Documentation updated, also on-line
223-
- Fix for issue #256: Parenthesis aren't translated (before dot, e.g. in return)
224-
- Option -b (or --blind) added to shipment test. Running it with -c (or --clean) -b (or --blind) will not show anything, just clean repo by removing all generated files. Meant for usage before a commit.
225-
- [Release Paris (PyPi v3.6.4, GitHub #14): Support for Python 3.6, div. fixes and enhancements]
226-
- Function globals () is now available to dynamically get and set module attribs, issue #251
227-
- Demo for cyclejs was added, also to the shipment test
228-
- Enhancement for issue #247: One web page can now hold multiple Transcrypt apps
229-
- Regular expression module finished! (issue #98)
230-
- Fixes for issues #254 and #252, both having to do with sourcemap being one line off in else clause
231-
- Emulation of sync console I/O for educational purposes, text only
232-
- Autotest output now in tabular form for easy comparison, incl. source line nrs
233-
- Fix for issue #178: List Comprehensions / Operator Precedence Bug
234-
- Div. enhancements and fixes for CI tests
235-
- Enhancement for issue #139: 'yield from' now supported.
236-
- Enhancement for issue #89 and #149: __getattr__ and __setattr__ are now supported, requiring the -e 6 switch. Testlet 'proxies' added.
237-
- New aliases added to prevent name clashes. The orignal name can always be reached by prepending \js_. So e.g. if you need 'clear' in JS, use 'js_clear' in Python. A complete list of aliases is in the docs. Any alias can be undefined to maintain backward compatibility, e.g __pragma__ ('noalias', 'clear').
238-
- Enhancement for issue #169: Add support for float('inf') and float('-inf')
115+
- Code generator adapted to Python 3.9 parser
116+
- Updated README and packaging configuration
239117

240118
Known bugs in latest commits
241119
============================
@@ -245,6 +123,5 @@ None
245123
Other packages you might like
246124
=============================
247125

248-
- Htmltree - effective, minimalistic HTML generator running both on the server using CPython and Bottle and on the client using Transcrypt: https://github.com/Michael-F-Ellis/NearlyPurePythonWebAppDemo (demo) and https://github.com/Michael-F-Ellis/htmltree (package).
249126
- Numscrypt - port of a microscopic part of NumPy to Transcrypt, using JavaScript typed arrays: https://github.com/QQuick/Numscrypt
250127
- SimPyLC - PLC simulator with Arduino code generation: https://github.com/QQuick/SimPyLC

npm/README.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

npm/package.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
[wheel]
2-
universal = 1
1+
[wheel]
2+
universal = 1

0 commit comments

Comments
 (0)