diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 03eea961..61935c3e 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -43,10 +43,10 @@ jobs: npm-v18-${{ runner.os }}-${{ github.ref }}- npm-v18-${{ runner.os }}-refs/heads/master- - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.9 - name: Install Node.js and npm uses: actions/setup-node@v1 diff --git a/example/serverless.yml b/example/serverless.yml index 349cdcb8..e5c4c924 100644 --- a/example/serverless.yml +++ b/example/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/example_native_deps/serverless.yml b/example_native_deps/serverless.yml index 4deed44a..cfbd4913 100644 --- a/example_native_deps/serverless.yml +++ b/example_native_deps/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/test.js b/test.js index a4bb992b..f4afca45 100644 --- a/test.js +++ b/test.js @@ -234,7 +234,7 @@ test('default pythonBin can package flask with default options', async (t) => { t.end(); }); -test('py3.7 packages have the same hash', async (t) => { +test('py3.9 packages have the same hash', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -249,7 +249,7 @@ test('py3.7 packages have the same hash', async (t) => { t.end(); }); -test('py3.7 can package flask with default options', async (t) => { +test('py3.9 can package flask with default options', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -261,7 +261,7 @@ test('py3.7 can package flask with default options', async (t) => { }); test( - 'py3.7 can package flask with hashes', + 'py3.9 can package flask with hashes', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -279,7 +279,7 @@ test( { skip: brokenOn('win32') } ); -test('py3.7 can package flask with nested', async (t) => { +test('py3.9 can package flask with nested', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -295,7 +295,7 @@ test('py3.7 can package flask with nested', async (t) => { t.end(); }); -test('py3.7 can package flask with zip option', async (t) => { +test('py3.9 can package flask with zip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -313,7 +313,7 @@ test('py3.7 can package flask with zip option', async (t) => { t.end(); }); -test('py3.7 can package flask with slim option', async (t) => { +test('py3.9 can package flask with slim option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -332,7 +332,7 @@ test('py3.7 can package flask with slim option', async (t) => { t.end(); }); -test('py3.7 can package flask with slim & slimPatterns options', async (t) => { +test('py3.9 can package flask with slim & slimPatterns options', async (t) => { process.chdir('tests/base'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); const path = npm(['pack', '../..']); @@ -353,7 +353,7 @@ test('py3.7 can package flask with slim & slimPatterns options', async (t) => { t.end(); }); -test("py3.7 doesn't package bottle with noDeploy option", async (t) => { +test("py3.9 doesn't package bottle with noDeploy option", async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -371,7 +371,7 @@ test("py3.7 doesn't package bottle with noDeploy option", async (t) => { t.end(); }); -test('py3.7 can package boto3 with editable', async (t) => { +test('py3.9 can package boto3 with editable', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -391,7 +391,7 @@ test('py3.7 can package boto3 with editable', async (t) => { }); test( - 'py3.7 can package flask with dockerizePip option', + 'py3.9 can package flask with dockerizePip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -406,7 +406,7 @@ test( ); test( - 'py3.7 can package flask with slim & dockerizePip option', + 'py3.9 can package flask with slim & dockerizePip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -430,7 +430,7 @@ test( ); test( - 'py3.7 can package flask with slim & dockerizePip & slimPatterns options', + 'py3.9 can package flask with slim & dockerizePip & slimPatterns options', async (t) => { process.chdir('tests/base'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); @@ -455,7 +455,7 @@ test( ); test( - 'py3.7 can package flask with zip & dockerizePip option', + 'py3.9 can package flask with zip & dockerizePip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -487,7 +487,7 @@ test( ); test( - 'py3.7 can package flask with zip & slim & dockerizePip option', + 'py3.9 can package flask with zip & slim & dockerizePip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -520,7 +520,7 @@ test( { skip: !canUseDocker() || brokenOn('win32') } ); -test('pipenv py3.7 can package flask with default options', async (t) => { +test('pipenv py3.9 can package flask with default options', async (t) => { process.chdir('tests/pipenv'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -535,7 +535,7 @@ test('pipenv py3.7 can package flask with default options', async (t) => { t.end(); }); -test('pipenv py3.7 can package flask with slim option', async (t) => { +test('pipenv py3.9 can package flask with slim option', async (t) => { process.chdir('tests/pipenv'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -554,7 +554,7 @@ test('pipenv py3.7 can package flask with slim option', async (t) => { t.end(); }); -test('pipenv py3.7 can package flask with slim & slimPatterns options', async (t) => { +test('pipenv py3.9 can package flask with slim & slimPatterns options', async (t) => { process.chdir('tests/pipenv'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); @@ -576,7 +576,7 @@ test('pipenv py3.7 can package flask with slim & slimPatterns options', async (t t.end(); }); -test('pipenv py3.7 can package flask with zip option', async (t) => { +test('pipenv py3.9 can package flask with zip option', async (t) => { process.chdir('tests/pipenv'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -594,7 +594,7 @@ test('pipenv py3.7 can package flask with zip option', async (t) => { t.end(); }); -test("pipenv py3.7 doesn't package bottle with noDeploy option", async (t) => { +test("pipenv py3.9 doesn't package bottle with noDeploy option", async (t) => { process.chdir('tests/pipenv'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -633,7 +633,7 @@ test('non poetry pyproject.toml without requirements.txt packages handler only', t.end(); }); -test('poetry py3.7 can package flask with default options', async (t) => { +test('poetry py3.9 can package flask with default options', async (t) => { process.chdir('tests/poetry'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -645,7 +645,7 @@ test('poetry py3.7 can package flask with default options', async (t) => { t.end(); }); -test('poetry py3.7 can package flask with slim option', async (t) => { +test('poetry py3.9 can package flask with slim option', async (t) => { process.chdir('tests/poetry'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -664,7 +664,7 @@ test('poetry py3.7 can package flask with slim option', async (t) => { t.end(); }); -test('poetry py3.7 can package flask with slim & slimPatterns options', async (t) => { +test('poetry py3.9 can package flask with slim & slimPatterns options', async (t) => { process.chdir('tests/poetry'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); @@ -686,7 +686,7 @@ test('poetry py3.7 can package flask with slim & slimPatterns options', async (t t.end(); }); -test('poetry py3.7 can package flask with zip option', async (t) => { +test('poetry py3.9 can package flask with zip option', async (t) => { process.chdir('tests/poetry'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -704,7 +704,7 @@ test('poetry py3.7 can package flask with zip option', async (t) => { t.end(); }); -test("poetry py3.7 doesn't package bottle with noDeploy option", async (t) => { +test("poetry py3.9 doesn't package bottle with noDeploy option", async (t) => { process.chdir('tests/poetry'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -722,7 +722,7 @@ test("poetry py3.7 doesn't package bottle with noDeploy option", async (t) => { t.end(); }); -test('py3.7 can package flask with zip option and no explicit include', async (t) => { +test('py3.9 can package flask with zip option and no explicit include', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -742,7 +742,7 @@ test('py3.7 can package flask with zip option and no explicit include', async (t t.end(); }); -test('py3.7 can package lambda-decorators using vendor option', async (t) => { +test('py3.9 can package lambda-decorators using vendor option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -805,7 +805,7 @@ test( { skip: process.platform === 'win32' } ); -test('py3.7 can package flask in a project with a space in it', async (t) => { +test('py3.9 can package flask in a project with a space in it', async (t) => { copySync('tests/base', 'tests/base with a space'); process.chdir('tests/base with a space'); const path = npm(['pack', '../..']); @@ -818,7 +818,7 @@ test('py3.7 can package flask in a project with a space in it', async (t) => { }); test( - 'py3.7 can package flask in a project with a space in it with docker', + 'py3.9 can package flask in a project with a space in it with docker', async (t) => { copySync('tests/base', 'tests/base with a space'); process.chdir('tests/base with a space'); @@ -833,7 +833,7 @@ test( { skip: !canUseDocker() || brokenOn('win32') } ); -test('py3.7 supports custom file name with fileName option', async (t) => { +test('py3.9 supports custom file name with fileName option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); writeFileSync('puck', 'requests'); @@ -849,7 +849,7 @@ test('py3.7 supports custom file name with fileName option', async (t) => { t.end(); }); -test("py3.7 doesn't package bottle with zip option", async (t) => { +test("py3.9 doesn't package bottle with zip option", async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -885,7 +885,7 @@ test("py3.7 doesn't package bottle with zip option", async (t) => { t.end(); }); -test('py3.7 can package flask with slim, slimPatterns & slimPatternsAppendDefaults=false options', async (t) => { +test('py3.9 can package flask with slim, slimPatterns & slimPatternsAppendDefaults=false options', async (t) => { process.chdir('tests/base'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); const path = npm(['pack', '../..']); @@ -908,7 +908,7 @@ test('py3.7 can package flask with slim, slimPatterns & slimPatternsAppendDefaul }); test( - 'py3.7 can package flask with slim & dockerizePip & slimPatterns & slimPatternsAppendDefaults=false options', + 'py3.9 can package flask with slim & dockerizePip & slimPatterns & slimPatternsAppendDefaults=false options', async (t) => { process.chdir('tests/base'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); @@ -937,7 +937,7 @@ test( { skip: !canUseDocker() || brokenOn('win32') } ); -test('pipenv py3.7 can package flask with slim & slimPatterns & slimPatternsAppendDefaults=false option', async (t) => { +test('pipenv py3.9 can package flask with slim & slimPatterns & slimPatternsAppendDefaults=false option', async (t) => { process.chdir('tests/pipenv'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); const path = npm(['pack', '../..']); @@ -960,7 +960,7 @@ test('pipenv py3.7 can package flask with slim & slimPatterns & slimPatternsAppe t.end(); }); -test('poetry py3.7 can package flask with slim & slimPatterns & slimPatternsAppendDefaults=false option', async (t) => { +test('poetry py3.9 can package flask with slim & slimPatterns & slimPatternsAppendDefaults=false option', async (t) => { process.chdir('tests/poetry'); copySync('_slimPatterns.yml', 'slimPatterns.yml'); const path = npm(['pack', '../..']); @@ -983,7 +983,7 @@ test('poetry py3.7 can package flask with slim & slimPatterns & slimPatternsAppe t.end(); }); -test('poetry py3.7 can package flask with package individually option', async (t) => { +test('poetry py3.9 can package flask with package individually option', async (t) => { process.chdir('tests/poetry_individually'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -998,7 +998,7 @@ test('poetry py3.7 can package flask with package individually option', async (t t.end(); }); -test('py3.7 can package flask with package individually option', async (t) => { +test('py3.9 can package flask with package individually option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1080,7 +1080,7 @@ test('py3.7 can package flask with package individually option', async (t) => { t.end(); }); -test('py3.7 can package flask with package individually & slim option', async (t) => { +test('py3.9 can package flask with package individually & slim option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1162,7 +1162,7 @@ test('py3.7 can package flask with package individually & slim option', async (t t.end(); }); -test('py3.7 can package only requirements of module', async (t) => { +test('py3.9 can package only requirements of module', async (t) => { process.chdir('tests/individually'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1218,7 +1218,7 @@ test('py3.7 can package only requirements of module', async (t) => { t.end(); }); -test('py3.7 can package lambda-decorators using vendor and invidiually option', async (t) => { +test('py3.9 can package lambda-decorators using vendor and invidiually option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1373,7 +1373,8 @@ test( { skip: !canUseDocker() || process.platform === 'win32' } ); -test('py3.7 uses download cache by default option', +test( + 'py3.9 uses download cache by default option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1381,7 +1382,7 @@ test('py3.7 uses download cache by default option', sls(['package'], { env: {} }); const cachepath = getUserCachePath(); t.true( - pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`), + pathExistsSync(`${cachepath}${sep}downloadCacheslspyc${sep}http`), 'cache directory exists' ); t.end(); @@ -1389,7 +1390,8 @@ test('py3.7 uses download cache by default option', { skip: true } ); -test('py3.7 uses download cache by default', +test( + 'py3.9 uses download cache by default', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1405,7 +1407,7 @@ test('py3.7 uses download cache by default', ); test( - 'py3.7 uses download cache with dockerizePip option', + 'py3.9 uses download cache with dockerizePip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1423,7 +1425,7 @@ test( ); test( - 'py3.7 uses download cache with dockerizePip by default option', + 'py3.9 uses download cache with dockerizePip by default option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1441,7 +1443,8 @@ test( { skip: true } ); -test('py3.7 uses static and download cache', +test( + 'py3.9 uses static and download cache', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1466,7 +1469,7 @@ test('py3.7 uses static and download cache', ); test( - 'py3.7 uses static and download cache with dockerizePip option', + 'py3.9 uses static and download cache with dockerizePip option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1490,7 +1493,7 @@ test( { skip: !canUseDocker() || brokenOn('win32') } ); -test('py3.7 uses static cache', async (t) => { +test('py3.9 uses static cache', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1511,7 +1514,7 @@ test('py3.7 uses static cache', async (t) => { '.completed_requirements exists in static-cache' ); - // py3.7 checking that static cache actually pulls from cache (by poisoning it) + // py3.9 checking that static cache actually pulls from cache (by poisoning it) writeFileSync( `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}injected_file_is_bad_form`, 'injected new file into static cache folder' @@ -1526,7 +1529,7 @@ test('py3.7 uses static cache', async (t) => { t.end(); }); -test('py3.7 uses static cache with cacheLocation option', async (t) => { +test('py3.9 uses static cache with cacheLocation option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1550,7 +1553,7 @@ test('py3.7 uses static cache with cacheLocation option', async (t) => { }); test( - 'py3.7 uses static cache with dockerizePip & slim option', + 'py3.9 uses static cache with dockerizePip & slim option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1572,7 +1575,7 @@ test( '.completed_requirements exists in static-cache' ); - // py3.7 checking that static cache actually pulls from cache (by poisoning it) + // py3.9 checking that static cache actually pulls from cache (by poisoning it) writeFileSync( `${cachepath}${sep}${cacheFolderHash}_${arch}_slspyc${sep}injected_file_is_bad_form`, 'injected new file into static cache folder' @@ -1595,7 +1598,7 @@ test( ); test( - 'py3.7 uses download cache with dockerizePip & slim option', + 'py3.9 uses download cache with dockerizePip & slim option', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); @@ -1620,7 +1623,7 @@ test( { skip: !canUseDocker() || brokenOn('win32') } ); -test('py3.7 can ignore functions defined with `image`', async (t) => { +test('py3.9 can ignore functions defined with `image`', async (t) => { process.chdir('tests/base'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1646,7 +1649,7 @@ test('py3.7 can ignore functions defined with `image`', async (t) => { t.end(); }); -test('poetry py3.7 fails packaging if poetry.lock is missing and flag requirePoetryLockFile is set to true', async (t) => { +test('poetry py3.9 fails packaging if poetry.lock is missing and flag requirePoetryLockFile is set to true', async (t) => { copySync('tests/poetry', 'tests/base with a space'); process.chdir('tests/base with a space'); removeSync('poetry.lock'); @@ -1678,7 +1681,7 @@ test('works with provider.runtime not being python', async (t) => { t.end(); }); -test('poetry py3.7 packages additional optional packages', async (t) => { +test('poetry py3.9 packages additional optional packages', async (t) => { process.chdir('tests/poetry_packages'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1694,7 +1697,7 @@ test('poetry py3.7 packages additional optional packages', async (t) => { t.end(); }); -test('poetry py3.7 skips additional optional packages specified in withoutGroups', async (t) => { +test('poetry py3.9 skips additional optional packages specified in withoutGroups', async (t) => { process.chdir('tests/poetry_packages'); const path = npm(['pack', '../..']); npm(['i', path]); @@ -1711,7 +1714,7 @@ test('poetry py3.7 skips additional optional packages specified in withoutGroups t.end(); }); -test('poetry py3.7 only installs optional packages specified in onlyGroups', async (t) => { +test('poetry py3.9 only installs optional packages specified in onlyGroups', async (t) => { process.chdir('tests/poetry_packages'); const path = npm(['pack', '../..']); npm(['i', path]); diff --git a/tests/base/serverless.yml b/tests/base/serverless.yml index ef48e901..a82187ff 100644 --- a/tests/base/serverless.yml +++ b/tests/base/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: ${env:runtime, 'python3.7'} + runtime: ${env:runtime, 'python3.9'} plugins: - serverless-python-requirements diff --git a/tests/individually/serverless.yml b/tests/individually/serverless.yml index d73d613a..6409532b 100644 --- a/tests/individually/serverless.yml +++ b/tests/individually/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test-indiv provider: name: aws - runtime: python3.7 + runtime: python3.9 package: individually: true diff --git a/tests/non_build_pyproject/serverless.yml b/tests/non_build_pyproject/serverless.yml index b0436e61..d1bbaee6 100644 --- a/tests/non_build_pyproject/serverless.yml +++ b/tests/non_build_pyproject/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/tests/non_poetry_pyproject/serverless.yml b/tests/non_poetry_pyproject/serverless.yml index 2b16790c..7338b10b 100644 --- a/tests/non_poetry_pyproject/serverless.yml +++ b/tests/non_poetry_pyproject/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/tests/pipenv/serverless.yml b/tests/pipenv/serverless.yml index 315f6741..2b471526 100644 --- a/tests/pipenv/serverless.yml +++ b/tests/pipenv/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/tests/poetry/serverless.yml b/tests/poetry/serverless.yml index 2d032acd..d10c4997 100644 --- a/tests/poetry/serverless.yml +++ b/tests/poetry/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/tests/poetry_individually/serverless.yml b/tests/poetry_individually/serverless.yml index 527a2846..86dbb547 100644 --- a/tests/poetry_individually/serverless.yml +++ b/tests/poetry_individually/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements diff --git a/tests/poetry_packages/serverless.yml b/tests/poetry_packages/serverless.yml index 03652968..c6972ede 100644 --- a/tests/poetry_packages/serverless.yml +++ b/tests/poetry_packages/serverless.yml @@ -2,7 +2,7 @@ service: sls-py-req-test provider: name: aws - runtime: python3.7 + runtime: python3.9 plugins: - serverless-python-requirements