##// END OF EJS Templates
Use single quotes in sql string literal (#13968)...
Use single quotes in sql string literal (#13968) the SQL spec requires that string literals use single quotes and column references (or other identifiers) use double quotes. sqlite permits the use of double quotes for string literals in "unambiguous cases". For some reason, its understanding of what constitutes unambiguous has changed recently - I'm on FreeBSD 14.0-CURRENT with sqlite 3.41.0 - and attempting to do anything with ipython throws a very strange sqlite operation error: ``` [+] ~% ipython --version (test) audrey@daisy [12:18:02 AM] 8.11.0 [+] ~% ipython (test) audrey@daisy [12:18:04 AM] [TerminalIPythonApp] ERROR | Failed to create history session in /usr/home/audrey/.ipython/profile_default/history.sqlite. History will not be saved. Traceback (most recent call last): File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/IPython/core/history.py", line 545, in __init__ self.new_session() File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), **kw) File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/IPython/core/history.py", line 60, in only_when_enabled return f(self, *a, **kw) File "/usr/home/audrey/.virtualenvs/test/lib/python3.9/site-packages/IPython/core/history.py", line 570, in new_session cur = conn.execute("""INSERT INTO sessions VALUES (NULL, ?, NULL, sqlite3.OperationalError: no such column: Python 3.9.16 (main, Feb 28 2023, 01:31:45) Type 'copyright', 'credits' or 'license' for more information IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help. ``` This patch fixes it. idk if this constitutes a bug in sqlite3, but this is, I guess, more correct.

File last commit:

r28155:f2b2afc9
r28168:9a5baf06 merge
Show More
test.yml
89 lines | 2.9 KiB | text/x-yaml | YamlLexer
name: Run tests
on:
push:
branches:
- main
- '*.x'
pull_request:
# Run weekly on Monday at 1:23 UTC
schedule:
- cron: '23 1 * * 1'
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
deps: [test_extra]
# Test all on ubuntu, test ends on macos
include:
- os: macos-latest
python-version: "3.8"
deps: test_extra
- os: macos-latest
python-version: "3.11"
deps: test_extra
# Tests minimal dependencies set
- os: ubuntu-latest
python-version: "3.11"
deps: test
# Tests latest development Python version
- os: ubuntu-latest
python-version: "3.12-dev"
deps: test
# Installing optional dependencies stuff takes ages on PyPy
- os: ubuntu-latest
python-version: "pypy-3.8"
deps: test
- os: windows-latest
python-version: "pypy-3.8"
deps: test
- os: macos-latest
python-version: "pypy-3.8"
deps: test
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install latex
if: runner.os == 'Linux' && matrix.deps == 'test_extra'
run: echo "disable latex for now, issues in mirros" #sudo apt-get -yq -o Acquire::Retries=3 --no-install-suggests --no-install-recommends install texlive dvipng
- name: Install and update Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build
python -m pip install --upgrade -e .[${{ matrix.deps }}]
python -m pip install --upgrade check-manifest pytest-cov pytest-json-report
- name: Try building with Python build
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
run: |
python -m build
shasum -a 256 dist/*
- name: Check manifest
if: runner.os != 'Windows' # setup.py does not support sdist on Windows
run: check-manifest
- name: pytest
env:
COLUMNS: 120
run: |
pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} --json-report --json-report-file=./report-${{ matrix.python-version }}-${{runner.os}}.json
- uses: actions/upload-artifact@v3
with:
name: upload pytest timing reports as json
path: |
./report-*.json
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
name: Test
files: /home/runner/work/ipython/ipython/coverage.xml