1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-10-31 22:06:12 +00:00

Compare commits

...

7 Commits

Author SHA1 Message Date
patricksurry
90ee2c8bee
Merge f3d2eb2f22 into 95e152d6cb 2023-11-18 17:07:22 -08:00
Mike Naberezny
95e152d6cb Add changelog entry for b710c742ac 2023-11-18 17:04:42 -08:00
Mike Naberezny
d547dbc07c Test with Python 3.12 on CI 2023-11-18 16:43:21 -08:00
Mike Naberezny
9ae3871388 Fix running Python 3.4 and 3.5 on CI 2023-11-18 16:34:11 -08:00
Mike Naberezny
55eef25998 Fix running Python 2 on CI 2023-11-18 15:06:23 -08:00
Mike Naberezny
db247b9765 Revert "Remove support for Python 2"
This reverts commit ca02d12fc6.
2023-11-18 15:03:03 -08:00
Patrick Surry
f3d2eb2f22 fixes https://github.com/mnaberez/py65/issues/45 2023-07-26 10:12:58 -04:00
6 changed files with 95 additions and 18 deletions

View File

@ -2,13 +2,72 @@ name: Run all tests
on: [push, pull_request] on: [push, pull_request]
env:
PIP: "env PIP_DISABLE_PIP_VERSION_CHECK=1
PYTHONWARNINGS=ignore:DEPRECATION
pip --no-cache-dir"
jobs: jobs:
build: tests_py27:
runs-on: ubuntu-20.04
container: python:2.7
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Show Python version
run: python -V
- name: Install dependencies
run: $PIP install setuptools
- name: Run the tests
run: python setup.py test -q
build_py34:
runs-on: ubuntu-20.04
container: python:3.4
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Show Python version
run: python -V
- name: Install dependencies
run: $PIP install setuptools
- name: Run the tests
run: python setup.py test -q
build_py35:
runs-on: ubuntu-20.04
container: python:3.5
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Show Python version
run: python -V
- name: Install dependencies
run: $PIP install setuptools
- name: Run the tests
run: python setup.py test -q
build_py3x:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11] python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
os: [ubuntu-20.04, windows-2019] os: [ubuntu-20.04]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -23,5 +82,8 @@ jobs:
- name: Show Python version - name: Show Python version
run: python -V run: python -V
- name: Install dependencies
run: $PIP install setuptools
- name: Run the tests - name: Run the tests
run: python setup.py test -q run: python setup.py test -q

View File

@ -1,9 +1,6 @@
2.0.0.dev0 (Next Release) 1.2.0.dev0 (Next Release)
------------------------- -------------------------
- Support for some older Python versions has been dropped. Py65
now requires Python 3.6 or later.
- Fixed a bug with character input that would cause characters to be - Fixed a bug with character input that would cause characters to be
dropped when pasting in larger amounts of text. This makes it possible dropped when pasting in larger amounts of text. This makes it possible
to paste programs into EhBASIC and Taliforth. Patch by SamCoVT. to paste programs into EhBASIC and Taliforth. Patch by SamCoVT.
@ -22,6 +19,8 @@
- Fixed assembly and disassembly of 65C02 instruction $64 (``STZ $12``). - Fixed assembly and disassembly of 65C02 instruction $64 (``STZ $12``).
Patch by Patrick Surry. Patch by Patrick Surry.
- Removed use of the ``asyncore`` module deprecated in Python 3.10.
1.1.0 (2018-07-01) 1.1.0 (2018-07-01)
------------------ ------------------

View File

@ -20,9 +20,9 @@ Installation
Py65 packages are `available <http://pypi.python.org/pypi/py65>`_ on the Py65 packages are `available <http://pypi.python.org/pypi/py65>`_ on the
Python Package Index (PyPI). You download them from there or you can Python Package Index (PyPI). You download them from there or you can
use ``pip3`` to automatically install or upgrade Py65:: use ``pip`` to install Py65::
$ pip3 install -U py65 $ pip install setuptools py65
Devices Devices
------- -------

View File

@ -22,8 +22,6 @@ import shlex
import sys import sys
import traceback import traceback
from urllib.request import urlopen
from py65.devices.mpu6502 import MPU as NMOS6502 from py65.devices.mpu6502 import MPU as NMOS6502
from py65.devices.mpu65c02 import MPU as CMOS65C02 from py65.devices.mpu65c02 import MPU as CMOS65C02
from py65.devices.mpu65org16 import MPU as V65Org16 from py65.devices.mpu65org16 import MPU as V65Org16
@ -34,6 +32,11 @@ from py65.utils import console
from py65.utils.conversions import itoa from py65.utils.conversions import itoa
from py65.memory import ObservableMemory from py65.memory import ObservableMemory
try:
from urllib2 import urlopen
except ImportError: # Python 3
from urllib.request import urlopen
class Monitor(cmd.Cmd): class Monitor(cmd.Cmd):
Microprocessors = {'6502': NMOS6502, '65C02': CMOS65C02, Microprocessors = {'6502': NMOS6502, '65C02': CMOS65C02,
@ -153,7 +156,8 @@ class Monitor(cmd.Cmd):
self._output(usage) self._output(usage)
def onecmd(self, line): def onecmd(self, line):
line = self._preprocess_line(line) if line:
line = self._preprocess_line(line)
result = None result = None
try: try:
@ -164,7 +168,7 @@ class Monitor(cmd.Cmd):
error = ''.join(traceback.format_exception(e)) error = ''.join(traceback.format_exception(e))
self._output(error) self._output(error)
if not line.startswith("quit"): if line and not line.startswith("quit"):
self._output_mpu_status() self._output_mpu_status()
# Switch back to the previous input mode. # Switch back to the previous input mode.

View File

@ -2,11 +2,13 @@ import unittest
import sys import sys
import os import os
import tempfile import tempfile
from io import StringIO
from py65.monitor import Monitor from py65.monitor import Monitor
try:
from StringIO import StringIO
except ImportError: # Python 3
from io import StringIO
class MonitorTests(unittest.TestCase): class MonitorTests(unittest.TestCase):

View File

@ -3,9 +3,14 @@ __version__ = '2.0.0.dev0'
import sys import sys
py_version = sys.version_info[:2] py_version = sys.version_info[:2]
PY3 = py_version[0] == 3
if py_version < (3, 6): if PY3:
raise RuntimeError('On Python 3, Py65 requires Python 3.6 or later') if py_version < (3, 4):
raise RuntimeError('On Python 3, Py65 requires Python 3.4 or later')
else:
if py_version < (2, 7):
raise RuntimeError('On Python 2, Py65 requires Python 2.7 or later')
from setuptools import setup, find_packages from setuptools import setup, find_packages
@ -19,13 +24,18 @@ CLASSIFIERS = [
'Natural Language :: English', 'Natural Language :: English',
'Operating System :: POSIX', 'Operating System :: POSIX',
'Programming Language :: Python', 'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Assembly', 'Programming Language :: Assembly',
'Topic :: Software Development :: Assemblers', 'Topic :: Software Development :: Assemblers',
'Topic :: Software Development :: Disassemblers', 'Topic :: Software Development :: Disassemblers',