Giter Site home page Giter Site logo

naftaliharris / tauthon Goto Github PK

View Code? Open in Web Editor NEW
667.0 667.0 43.0 292.63 MB

Fork of Python 2.7 with new syntax, builtins, and libraries backported from Python 3.

License: Other

Shell 0.95% Python 52.27% Makefile 0.79% C 42.06% HTML 0.47% Batchfile 0.07% C++ 0.12% PLSQL 0.05% Objective-C 0.06% Assembly 1.32% TeX 0.72% DIGITAL Command Language 0.06% M4 0.49% Roff 0.52% Rich Text Format 0.02% VBScript 0.01% Vim Script 0.02%

tauthon's People

Contributors

akuchling avatar amauryfa avatar benjaminp avatar birkenfeld avatar bitdancer avatar brettcannon avatar doerwalter avatar ezio-melotti avatar freddrake avatar gpshead avatar gvanrossum avatar gward avatar jackjansen avatar jeremyhylton avatar kbkaiser avatar loewis avatar mdickinson avatar merwok avatar ncoghlan avatar nnorwitz avatar orsenthil avatar pitrou avatar rhettinger avatar ronaldoussoren avatar serhiy-storchaka avatar terryjreedy avatar tim-one avatar tiran avatar vsajip avatar warsaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tauthon's Issues

pip should just work out of the box

The first thing you want to do after compiling / installing Tauthon is probably to install third party products like numpy and scipy.

pip install [package]

This should just work out of the box.

help() : Tauthon 2.8 show PSF

I using help().

    Release         Derived     Year        Owner       GPL-
                    from                                compatible? (1)

    0.9.0 thru 1.2              1991-1995   CWI         yes
    1.3 thru 1.5.2  1.2         1995-1999   CNRI        yes
    1.6             1.5.2       2000        CNRI        no
    2.0             1.6         2000        BeOpen.com  no
    1.6.1           1.6         2001        CNRI        yes (2)
    2.1             2.0+1.6.1   2001        PSF         no
    2.0.1           2.0+1.6.1   2001        PSF         yes
    2.1.1           2.1+2.0.1   2001        PSF         yes
    2.1.2           2.1.1       2002        PSF         yes
    2.1.3           2.1.2       2002        PSF         yes
    2.2 and above   2.1.1       2001-2015   PSF         yes
    Tauthon 2.8+    2.7.10      2015-now    PSF         yes

Build with Microsoft's UCRT (Visual Studio 2015 and above)

I apologize if discussion has already happened on this feature request.

If someone wants to use a C library that uses C99 or a C++ library that uses C++11 or later, that is not possible with Python 2.7 because it (and every C/C++ compiled module) are built with Visual Studio 2008. Building with the UCRT would offer a way forward for people who want Python 2.x and modern C and C++ libraries to work together on Windows.

Tauthon file extension

I'm about to create a Tauthon debugging environment (yes, after LOTS of consideration and experimentation, python3 was a lesser option due to various reasons I won't discuss here) and plan to add Tauthon specific features.

What are your stand on adding (library enhancements, not language) features not present in Python3, especially additions to libraries like ctypes?

My Tauthon scripts probably will not run on either python2.7 or python3 (regardless of any library enhancements). I think in that case I should have another file-extension to avoid confusion. What is your stance on this? Is ".tau" something pretty we could live with (and ".py" only if backwards compatible with Python2.7) ? :-)

tauthon help() refers to python 2.8

└─╼ ./tauthon.exe
Tauthon 2.8.0a0 (default, Feb 24 2017, 00:03:02)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

help()

Welcome to Python 2.8! This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://docs.python.org/2.8/tutorial/.

========

looks like it's coming from here in pydoc

grep -n Welcome tauthon-master/Lib/pydoc.py
1859:Welcome to Python %s! This is the online help utility.

grep -n Internet tauthon-master/Lib/pydoc.py
1862:the tutorial on the Internet at http://docs.python.org/%s/tutorial/.

tauthon license() needs updating to include tauthon for releases 2.2 and above

└─╼ ./tauthon.exe
Tauthon 2.8.0a0 (default, Feb 24 2017, 00:03:02)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

license()
A. HISTORY OF THE SOFTWARE
...
Release Derived Year Owner GPL-
...
2.2 and above 2.1.1 2001-now PSF yes
...

owner of tauthon is likely not ?PSF

Documentation for __await__ is busted

>>> async def f(): pass
>>> help(f())

gives:

Help on coroutine object:

f = class coroutine(object)
 |  Methods defined here:
 |
 |  __await__(...)
 |      __await__($self, /)
 |      --
 |
 |      Return an iterator to be used in await expression.
 |

python3 features ported to tauthon in a dictionary or otherwise

the tauthon docs do a nice job of describing what's been ported to tauthon. it would be helpful to have a feature list available during execution, so developers could test whether or not it's been implemented in their build of tauthon or not.

possibly implemented by a "what'snewintauthon" module which could be imported. each feature could be indicated by an entry in a tuple or list, or by a dictionary entry with e.g. yes/no/partial entries.

likewise, this might also be applicable to 2.7.x features with needed to be broken by tauthon or which have not yet been incorporated into the base

tauthon awareness of which version of 2.7 it's built on

using the platform module, in a vanilla python, the version of python is found using , e,g, 2.7.13. with tauthon standing in for the python in many places how would a running program be able to determine whether it's 2.7.13 based or 2.7.14

using tauthon:
"""
In[20]: import platform
In [21]: platform.python_version()
Out[21]: '2.8.0a0'

In [22]: platform.python_version_tuple()
Out[22]: ('2', '8', '0a0')
"""

while the platform module might be modified to to show both the tauthon version and the base python, it night be useful to have a new module that could be imported by tauthon

tauthon to replace python2.8 on startup banner

└─╼ ./tauthon.exe
Python 2.8.0a0 (default, Feb 23 2017, 16:57:01)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

seems that Python 2.8.0a0. should be tauthon2.8.0a0 ?

running on OS X

Fix unparser.py for matrix multiplication

$ ./python.exe Demo/parser/test_unparse.py

fails with (eventually):

FAILED (errors=1)
Traceback (most recent call last):
  File "Demo/parser/test_unparse.py", line 213, in <module>
    test_main()
  File "Demo/parser/test_unparse.py", line 210, in test_main
    test_support.run_unittest(UnparseTestCase, DirectoryTestCase)
  File "/Users/naftali/repos/cpython/Lib/test/test_support.py", line 1470, in run_unittest
    _run_suite(suite)
  File "/Users/naftali/repos/cpython/Lib/test/test_support.py", line 1453, in _run_suite
    raise TestFailed(err)
test.test_support.TestFailed: Traceback (most recent call last):
  File "Demo/parser/test_unparse.py", line 206, in test_files
    self.check_roundtrip(source)
  File "Demo/parser/test_unparse.py", line 85, in check_roundtrip
    unparse.Unparser(ast1, unparse_buffer)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 35, in __init__
    self.dispatch(tree)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 63, in dispatch
    meth(tree)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 75, in _Module
    self.dispatch(stmt)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 63, in dispatch
    meth(tree)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 246, in _ClassDef
    self.dispatch(t.body)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 60, in dispatch
    self.dispatch(t)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 63, in dispatch
    meth(tree)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 250, in _FunctionDef
    self.__FunctionDef_helper(t, "def")
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 265, in __FunctionDef_helper
    self.dispatch(t.body)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 60, in dispatch
    self.dispatch(t)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 63, in dispatch
    meth(tree)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 80, in _Expr
    self.dispatch(tree.value)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 63, in dispatch
    meth(tree)
  File "/Users/naftali/repos/cpython/Demo/parser/unparse.py", line 471, in _BinOp
    self.write(" " + self.binop[t.op.__class__.__name__] + " ")
KeyError: 'MatMult'

environment variables PYTHON vs TAUTHON

OSX 10.12.3 (Sierra)

there are a number of env vars used by tauthon as shown by help:

"""
└─╼ tauthon -h | egrep -i "PY|TAU"
usage: tauthon [option] ... [-c cmd | -m mod | file | -] [arg] ...
-B : don't write .py[co] files on import; also PYTHONDONTWRITEBYTECODE=x
-d : debug output from parser; also PYTHONDEBUG=x
-E : ignore PYTHON* environment variables (such as PYTHONPATH)
if stdin does not appear to be a terminal; also PYTHONINSPECT=x
-O : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE
-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x
-v : verbose (trace import statements); also PYTHONVERBOSE=x
also PYTHONWARNINGS=arg
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH : ':'-separated list of directories prefixed to the
PYTHONHOME : alternate directory (or :<exec_prefix>).
The default module search path uses /pythonX.X.
PYTHONCASEOK : ignore case in 'import' statements (Windows).
PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
PYTHONHASHSEED: if this variable is set to 'random', the effect is the same
"""

note: python3 supports all of these plus

"""
PYTHONFAULTHANDLER: dump the Python traceback on fatal errors.
PYTHONMALLOC: set the Python memory allocators and/or install debug hooks
"""

do any of these need TAUTHON analogs? if so, should the PYTHON one then be ignored?
is there a need to allow for different values for tauthon and python applications.

perhaps, for the time being it isn't necessary to do anything.

Rename this Project

The current name might confuse people into thinking this was an official port, filing bugs on the official bug tracker for it and so on.

There will never be an official Python 2.8, so there should never be something called “Python 2.8” or similar.

@gvanrossum might confirm this if you don't believe my words.

man page for tauthon

OSX 10.12.3 (Sierra)
"""
$ make install | grep man | egrep -v 'command|roman|manager'
...
/usr/bin/install -c -m 644 ./Misc/python.man
/usr/local/share/man/man1/python2.8.1
rm -f /usr/local/share/man/man1/python2.1
(cd /usr/local/share/man/man1; ln -s python2.8.1 python2.1)
rm -f /usr/local/share/man/man1/python.1
(cd /usr/local/share/man/man1; ln -s python2.1 python.1)
"""

"""
└─╼ man -w python2.8
/usr/local/share/man/man1/python2.8.1
"""

"""man python2.8

PYTHON(1) PYTHON(1)

NAME
python - an interpreted, interactive, object-oriented programming lan-
guage

SYNOPSIS
python [ -B ] [ -d ] [ -E ] [ -h ] [ -i ] [ -m module-name ]
[ -O ] [ -OO ] [ -R ] [ -Q argument ] [ -s ] [ -S ] [ -t ] [ -u
]
[ -v ] [ -V ] [ -W argument ] [ -x ] [ -3 ] [ -? ]
[ -c command | script | - ] [ arguments ]

DESCRIPTION
Python is an interpreted,
"""

if there will be tauthon man page, does it need to be tauthonized ?

Would you consider adding a contrib/ folder?

Would you consider adding a contrib/ folder with a few useful-to-haves like get-pip.py, perhaps a port of google's pytype for python2.8, or other tools? The python source is normally meant for ppl experimenting with the compiler and therefore lacks a few of the things you'd want in a download like this that is intended for a wider audience. Makes sense if you're not considering this for the time being though - obviously you've gone out of your way to not add anything outside the python3 PEPs.

If nothing else, having a anaconda style wrapper around this (even if not provided by continuum) would make it a lot easier for people to get started, and therefore for ppl to share their tools based on it.

Quiet test_set_wrapper_3 in test_coroutines.py

$ ./python.exe Lib/test/test_coroutines.py

produces

...
test_set_wrapper_3 (__main__.SysSetCoroWrapperTest) ... Lib/test/test_coroutines.py:1389: RuntimeWarning: coroutine 'foo' was never awaited
  sys.set_coroutine_wrapper(None)
ok
...

itauthon needed as either an ipython or isympy analog?

not sure if itauthon is needed - it could be the analog of ipython, or it could be a wrapper like isympy which does a few helpful things for sympy by pre-populating.

"""
ipython:

if name == 'main':
import sys
import IPython

sys.exit(IPython.start_ipython())

"""

"""
└─╼ isympy -h
Python shell for SymPy.

This is just a normal Python shell (IPython shell if you have the
IPython package installed), that executes the following commands for
the user:

>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
>>> init_printing()

"""

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.