Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pyasn1/pyasn1-modules
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.0
Choose a base ref
...
head repository: pyasn1/pyasn1-modules
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.4.0
Choose a head ref
  • 4 commits
  • 8 files changed
  • 3 contributors

Commits on Sep 22, 2023

  1. Copy the full SHA
    252ac00 View commit details

Commits on Mar 26, 2024

  1. Drop support for EOL Python 2.7 (#12)

    Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
    hugovk and hugovk authored Mar 26, 2024
    Copy the full SHA
    9ec5409 View commit details
  2. Drop support for EOL Python 3.6 and 3.7 (#14)

    droideck authored Mar 26, 2024
    Copy the full SHA
    0339532 View commit details
  3. Prepare release 0.4.0

    droideck authored Mar 26, 2024
    Copy the full SHA
    98b1e26 View commit details
Showing with 29 additions and 40 deletions.
  1. +12 −12 .github/workflows/main.yml
  2. +1 −1 .github/workflows/pypi.yml
  3. +6 −0 CHANGES.txt
  4. +1 −1 pyasn1_modules/__init__.py
  5. +2 −9 pyasn1_modules/pem.py
  6. +1 −1 requirements.txt
  7. +3 −9 setup.cfg
  8. +3 −7 tox.ini
24 changes: 12 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -22,34 +22,34 @@ on:
permissions:
contents: read

env:
FORCE_COLOR: 1

jobs:
tests:
name: "Python ${{ matrix.python-version }}"
# 20.04 because https://github.com/actions/python-versions
# does not have 2.7 and 3.6 binaries for 22.04.
runs-on: "ubuntu-20.04"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "2.7"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11-dev"
- "pypy-2.7"
- "pypy-3.7"
- "3.11"
- "pypy-3.8"
- "pypy-3.9"
os: ["ubuntu-22.04"]
include:
- { python-version: "3.12", os: "ubuntu-latest" }
steps:
- uses: "actions/checkout@v3"
with:
ref: ${{ inputs.tag || github.ref }}
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
cache: "pip"
- name: "Update pip"
run: python -m pip install --upgrade pip setuptools wheel
@@ -68,7 +68,7 @@ jobs:
ref: ${{ inputs.tag || github.ref }}
- uses: "actions/setup-python@v4"
with:
python-version: "3.10"
python-version: "3.x"
cache: "pip"
- name: "Update pip"
run: python -m pip install --upgrade pip setuptools wheel
@@ -77,14 +77,14 @@ jobs:
- name: "Run 'build'"
run: "python -m build"
- name: "Upload sdist artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sdist
path: |
dist/pyasn1*.tar.gz
if-no-files-found: error
- name: "Upload wheel artifact"
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheel
path: |
2 changes: 1 addition & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.x"
- name: "Update pip"
run: python -m pip install --upgrade pip setuptools wheel
- name: "Install 'build' and 'twine'"
6 changes: 6 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Revision 0.4.0, released 26-03-2024
---------------------------------------

- Added support for Python 3.11, 3.12
- Removed support for EOL Pythons 2.7, 3.6, 3.7

Revision 0.3.0, released 19-04-2023
---------------------------------------

2 changes: 1 addition & 1 deletion pyasn1_modules/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# http://www.python.org/dev/peps/pep-0396/
__version__ = '0.3.0'
__version__ = '0.4.0'
11 changes: 2 additions & 9 deletions pyasn1_modules/pem.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
# License: http://snmplabs.com/pyasn1/license.html
#
import base64
import sys

stSpam, stHam, stDump = 0, 1, 2

@@ -38,10 +37,7 @@ def readPemBlocksFromFile(fileObj, *markers):
else:
certLines.append(certLine)
if state == stDump:
if sys.version_info[0] <= 2:
substrate = ''.join([base64.b64decode(x) for x in certLines])
else:
substrate = ''.encode().join([base64.b64decode(x.encode()) for x in certLines])
substrate = ''.encode().join([base64.b64decode(x.encode()) for x in certLines])
break
return idx, substrate

@@ -55,10 +51,7 @@ def readPemFromFile(fileObj,


def readBase64fromText(text):
if sys.version_info[0] <= 2:
return base64.b64decode(text)
else:
return base64.b64decode(text.encode())
return base64.b64decode(text.encode())


def readBase64FromFile(fileObj):
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyasn1>=0.4.7,<0.6.0
pyasn1>=0.4.7,<0.7.0
12 changes: 3 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -27,28 +27,22 @@ classifiers =
License :: OSI Approved :: BSD License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Communications
Topic :: Software Development :: Libraries :: Python Modules

[options]
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
python_requires = >=3.8
zip_safe = True
setup_requires = setuptools
install_requires =
pyasn1>=0.4.6,<0.6.0
pyasn1>=0.4.6,<0.7.0
packages =
pyasn1_modules

[bdist_wheel]
universal = 1
10 changes: 3 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
minversion = 3.5.0
envlist =
py27, py36, py37, py38, py39, py310, py311, pypy27, pypy37, pypy38, pypy39
py{38, 39, 310, 311, 312, py38, py39}
cover, bandit, build
isolated_build = true
skip_missing_interpreters = true
@@ -10,7 +10,7 @@ skip_missing_interpreters = true
commands =
{envpython} -m unittest discover -s tests
deps =
pyasn1>=0.4.6,<0.6.0
pyasn1>=0.4.6,<0.7.0

[testenv:cover]
basepython = python3
@@ -39,14 +39,10 @@ commands =

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310, cover, build, bandit
3.11: py311
pypy-2.7: pypy27
pypy-3.7: pypy37
3.12: py312
pypy-3.8: pypy38
pypy-3.9: pypy39