···1313 runs-on: ubuntu-latest
1414 if: github.repository_owner == 'NixOS'
1515 steps:
1616- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1616+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1717 with:
1818 # pull_request_target checks out the base branch by default
1919 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+1-1
.github/workflows/check-nix-format.yml
···1818 runs-on: ubuntu-latest
1919 if: "!contains(github.event.pull_request.title, '[skip treewide]')"
2020 steps:
2121- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2121+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2222 with:
2323 # pull_request_target checks out the base branch by default
2424 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+1-1
.github/workflows/check-nixf-tidy.yml
···1212 runs-on: ubuntu-latest
1313 if: "!contains(github.event.pull_request.title, '[skip treewide]')"
1414 steps:
1515- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1515+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1616 with:
1717 # pull_request_target checks out the base branch by default
1818 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+2-2
.github/workflows/check-shell.yml
···1010 name: shell-check-x86_64-linux
1111 runs-on: ubuntu-latest
1212 steps:
1313- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1313+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1414 with:
1515 # pull_request_target checks out the base branch by default
1616 ref: refs/pull/${{ github.event.pull_request.number }}/merge
···2222 name: shell-check-aarch64-darwin
2323 runs-on: macos-latest
2424 steps:
2525- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2525+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2626 with:
2727 # pull_request_target checks out the base branch by default
2828 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+3-3
.github/workflows/codeowners.yml
···3535 # Important: Because we use pull_request_target, this checks out the base branch of the PR, not the PR itself.
3636 # We later build and run code from the base branch with access to secrets,
3737 # so it's important this is not the PRs code.
3838- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
3838+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
3939 with:
4040 path: base
4141···4848 app-id: ${{ vars.OWNER_APP_ID }}
4949 private-key: ${{ secrets.OWNER_APP_PRIVATE_KEY }}
50505151- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
5151+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
5252 with:
5353 ref: refs/pull/${{ github.event.number }}/merge
5454 path: pr
···72727373 # Important: Because we use pull_request_target, this checks out the base branch of the PR, not the PR head.
7474 # This is intentional, because we need to request the review of owners as declared in the base branch.
7575- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
7575+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
76767777 - uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
7878 id: app-token
+1-1
.github/workflows/editorconfig.yml
···2525 - name: print list of changed files
2626 run: |
2727 cat "$HOME/changed_files"
2828- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2828+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2929 with:
3030 # pull_request_target checks out the base branch by default
3131 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+1-1
.github/workflows/manual-nixos.yml
···1515 runs-on: ubuntu-latest
1616 if: github.repository_owner == 'NixOS'
1717 steps:
1818- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
1818+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
1919 with:
2020 # pull_request_target checks out the base branch by default
2121 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+1-1
.github/workflows/manual-nixpkgs.yml
···1717 runs-on: ubuntu-latest
1818 if: github.repository_owner == 'NixOS'
1919 steps:
2020- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2020+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2121 with:
2222 # pull_request_target checks out the base branch by default
2323 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+1-1
.github/workflows/nix-parse.yml
···2525 if [[ -s "$HOME/changed_files" ]]; then
2626 echo "CHANGED_FILES=$HOME/changed_files" > "$GITHUB_ENV"
2727 fi
2828- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
2828+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2929 with:
3030 # pull_request_target checks out the base branch by default
3131 ref: refs/pull/${{ github.event.pull_request.number }}/merge
+2-2
.github/workflows/nixpkgs-vet.yml
···2727 timeout-minutes: 10
2828 steps:
2929 # This checks out the base branch because of pull_request_target
3030- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
3030+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
3131 with:
3232 path: base
3333 sparse-checkout: ci
···4242 echo "Skipping the rest..."
4343 fi
4444 rm -rf base
4545- - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
4545+ - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
4646 if: env.mergedSha
4747 with:
4848 # pull_request_target checks out the base branch by default
···12121313class CalledProcessError(Exception):
1414 process: asyncio.subprocess.Process
1515+ stderr: Optional[bytes]
15161617class UpdateFailedException(Exception):
1718 pass
···1920def eprint(*args, **kwargs):
2021 print(*args, file=sys.stderr, **kwargs)
21222222-async def check_subprocess(*args, **kwargs):
2323+async def check_subprocess_output(*args, **kwargs):
2324 """
2424- Emulate check argument of subprocess.run function.
2525+ Emulate check and capture_output arguments of subprocess.run function.
2526 """
2627 process = await asyncio.create_subprocess_exec(*args, **kwargs)
2727- returncode = await process.wait()
2828+ # We need to use communicate() instead of wait(), as the OS pipe buffers
2929+ # can fill up and cause a deadlock.
3030+ stdout, stderr = await process.communicate()
28312929- if returncode != 0:
3232+ if process.returncode != 0:
3033 error = CalledProcessError()
3134 error.process = process
3535+ error.stderr = stderr
32363337 raise error
34383535- return process
3939+ return stdout
36403741async def run_update_script(nixpkgs_root: str, merge_lock: asyncio.Lock, temp_dir: Optional[Tuple[str, str]], package: Dict, keep_going: bool):
3842 worktree: Optional[str] = None
···4347 worktree, _branch = temp_dir
44484549 # Ensure the worktree is clean before update.
4646- await check_subprocess('git', 'reset', '--hard', '--quiet', 'HEAD', cwd=worktree)
5050+ await check_subprocess_output('git', 'reset', '--hard', '--quiet', 'HEAD', cwd=worktree)
47514852 # Update scripts can use $(dirname $0) to get their location but we want to run
4953 # their clones in the git worktree, not in the main nixpkgs repo.
···5256 eprint(f" - {package['name']}: UPDATING ...")
53575458 try:
5555- update_process = await check_subprocess(
5959+ update_info = await check_subprocess_output(
5660 'env',
5761 f"UPDATE_NIX_NAME={package['name']}",
5862 f"UPDATE_NIX_PNAME={package['pname']}",
···6367 stderr=asyncio.subprocess.PIPE,
6468 cwd=worktree,
6569 )
6666- update_info = await update_process.stdout.read()
6767-6870 await merge_changes(merge_lock, package, update_info, temp_dir)
6971 except KeyboardInterrupt as e:
7072 eprint('Cancelling…')
···7476 eprint()
7577 eprint(f"--- SHOWING ERROR LOG FOR {package['name']} ----------------------")
7678 eprint()
7777- stderr = await e.process.stderr.read()
7878- eprint(stderr.decode('utf-8'))
7979+ eprint(e.stderr.decode('utf-8'))
7980 with open(f"{package['pname']}.log", 'wb') as logfile:
8080- logfile.write(stderr)
8181+ logfile.write(e.stderr)
8182 eprint()
8283 eprint(f"--- SHOWING ERROR LOG FOR {package['name']} ----------------------")
8384···101102 for change in changes:
102103 # Git can only handle a single index operation at a time
103104 async with merge_lock:
104104- await check_subprocess('git', 'add', *change['files'], cwd=worktree)
105105+ await check_subprocess_output('git', 'add', *change['files'], cwd=worktree)
105106 commit_message = '{attrPath}: {oldVersion} -> {newVersion}'.format(**change)
106107 if 'commitMessage' in change:
107108 commit_message = change['commitMessage']
108109 elif 'commitBody' in change:
109110 commit_message = commit_message + '\n\n' + change['commitBody']
110110- await check_subprocess('git', 'commit', '--quiet', '-m', commit_message, cwd=worktree)
111111- await check_subprocess('git', 'cherry-pick', branch)
111111+ await check_subprocess_output('git', 'commit', '--quiet', '-m', commit_message, cwd=worktree)
112112+ await check_subprocess_output('git', 'cherry-pick', branch)
112113113114async def check_changes(package: Dict, worktree: str, update_info: str):
114115 if 'commit' in package['supportedFeatures']:
···129130130131 if 'newVersion' not in changes[0]:
131132 attr_path = changes[0]['attrPath']
132132- obtain_new_version_process = await check_subprocess('nix-instantiate', '--expr', f'with import ./. {{}}; lib.getVersion {attr_path}', '--eval', '--strict', '--json', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, cwd=worktree)
133133- changes[0]['newVersion'] = json.loads((await obtain_new_version_process.stdout.read()).decode('utf-8'))
133133+ obtain_new_version_output = await check_subprocess_output('nix-instantiate', '--expr', f'with import ./. {{}}; lib.getVersion {attr_path}', '--eval', '--strict', '--json', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, cwd=worktree)
134134+ changes[0]['newVersion'] = json.loads(obtain_new_version_output.decode('utf-8'))
134135135136 if 'files' not in changes[0]:
136136- changed_files_process = await check_subprocess('git', 'diff', '--name-only', 'HEAD', stdout=asyncio.subprocess.PIPE, cwd=worktree)
137137- changed_files = (await changed_files_process.stdout.read()).splitlines()
137137+ changed_files_output = await check_subprocess_output('git', 'diff', '--name-only', 'HEAD', stdout=asyncio.subprocess.PIPE, cwd=worktree)
138138+ changed_files = changed_files_output.splitlines()
138139 changes[0]['files'] = changed_files
139140140141 if len(changed_files) == 0:
···176177 # Do not create more workers than there are packages.
177178 num_workers = min(max_workers, len(packages))
178179179179- nixpkgs_root_process = await check_subprocess('git', 'rev-parse', '--show-toplevel', stdout=asyncio.subprocess.PIPE)
180180- nixpkgs_root = (await nixpkgs_root_process.stdout.read()).decode('utf-8').strip()
180180+ nixpkgs_root_output = await check_subprocess_output('git', 'rev-parse', '--show-toplevel', stdout=asyncio.subprocess.PIPE)
181181+ nixpkgs_root = nixpkgs_root_output.decode('utf-8').strip()
181182182183 # Set up temporary directories when using auto-commit.
183184 for i in range(num_workers):
+3
nixos/doc/manual/release-notes/rl-2411.section.md
···605605 lists by default. Backwards-compatible behavior can be enabled with
606606 `atomsCoercedToLists`.
607607608608+- `python3Packages.nose` has been removed, as it has been deprecated and unmaintained for almost a decade and does not work on Python 3.12.
609609+ Please switch to `pytest` or another test runner/framework.
610610+608611## Other Notable Changes {#sec-release-24.11-notable-changes}
609612610613<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+8
nixos/tests/networking/networkd-and-scripted.nix
···132132 client.wait_until_succeeds("ip addr show dev enp2s0 | grep -q '192.168.2'")
133133 client.wait_until_succeeds("ip addr show dev enp2s0 | grep -q 'fd00:1234:5678:2:'")
134134135135+ with subtest("Wait until we have received the nameservers"):
136136+ if "${builtins.toJSON networkd}" == "true":
137137+ client.wait_until_succeeds("resolvectl status enp2s0 | grep -q 2001:db8::1")
138138+ client.wait_until_succeeds("resolvectl status enp2s0 | grep -q 192.168.2.1")
139139+ else:
140140+ client.wait_until_succeeds("resolvconf -l | grep -q 2001:db8::1")
141141+ client.wait_until_succeeds("resolvconf -l | grep -q 192.168.2.1")
142142+135143 with subtest("Test vlan 1"):
136144 client.wait_until_succeeds("ping -c 1 192.168.1.1")
137145 client.wait_until_succeeds("ping -c 1 fd00:1234:5678:1::1")
···11-diff --git a/LICENSE.cpython b/LICENSE.cpython
22-new file mode 100644
33-index 0000000..14603b9
44---- /dev/null
55-+++ b/LICENSE.cpython
66-@@ -0,0 +1,277 @@
77-+A. HISTORY OF THE SOFTWARE
88-+==========================
99-+
1010-+Python was created in the early 1990s by Guido van Rossum at Stichting
1111-+Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands
1212-+as a successor of a language called ABC. Guido remains Python's
1313-+principal author, although it includes many contributions from others.
1414-+
1515-+In 1995, Guido continued his work on Python at the Corporation for
1616-+National Research Initiatives (CNRI, see https://www.cnri.reston.va.us)
1717-+in Reston, Virginia where he released several versions of the
1818-+software.
1919-+
2020-+In May 2000, Guido and the Python core development team moved to
2121-+BeOpen.com to form the BeOpen PythonLabs team. In October of the same
2222-+year, the PythonLabs team moved to Digital Creations, which became
2323-+Zope Corporation. In 2001, the Python Software Foundation (PSF, see
2424-+https://www.python.org/psf/) was formed, a non-profit organization
2525-+created specifically to own Python-related Intellectual Property.
2626-+Zope Corporation was a sponsoring member of the PSF.
2727-+
2828-+All Python releases are Open Source (see https://opensource.org for
2929-+the Open Source Definition). Historically, most, but not all, Python
3030-+releases have also been GPL-compatible; the table below summarizes
3131-+the various releases.
3232-+
3333-+ Release Derived Year Owner GPL-
3434-+ from compatible? (1)
3535-+
3636-+ 0.9.0 thru 1.2 1991-1995 CWI yes
3737-+ 1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
3838-+ 1.6 1.5.2 2000 CNRI no
3939-+ 2.0 1.6 2000 BeOpen.com no
4040-+ 1.6.1 1.6 2001 CNRI yes (2)
4141-+ 2.1 2.0+1.6.1 2001 PSF no
4242-+ 2.0.1 2.0+1.6.1 2001 PSF yes
4343-+ 2.1.1 2.1+2.0.1 2001 PSF yes
4444-+ 2.1.2 2.1.1 2002 PSF yes
4545-+ 2.1.3 2.1.2 2002 PSF yes
4646-+ 2.2 and above 2.1.1 2001-now PSF yes
4747-+
4848-+Footnotes:
4949-+
5050-+(1) GPL-compatible doesn't mean that we're distributing Python under
5151-+ the GPL. All Python licenses, unlike the GPL, let you distribute
5252-+ a modified version without making your changes open source. The
5353-+ GPL-compatible licenses make it possible to combine Python with
5454-+ other software that is released under the GPL; the others don't.
5555-+
5656-+(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
5757-+ because its license has a choice of law clause. According to
5858-+ CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
5959-+ is "not incompatible" with the GPL.
6060-+
6161-+Thanks to the many outside volunteers who have worked under Guido's
6262-+direction to make these releases possible.
6363-+
6464-+
6565-+B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
6666-+===============================================================
6767-+
6868-+Python software and documentation are licensed under the
6969-+Python Software Foundation License Version 2.
7070-+
7171-+Starting with Python 3.8.6, examples, recipes, and other code in
7272-+the documentation are dual licensed under the PSF License Version 2
7373-+and the Zero-Clause BSD license.
7474-+
7575-+Some software incorporated into Python is under different licenses.
7676-+The licenses are listed with code falling under that license.
7777-+
7878-+
7979-+PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
8080-+--------------------------------------------
8181-+
8282-+1. This LICENSE AGREEMENT is between the Python Software Foundation
8383-+("PSF"), and the Individual or Organization ("Licensee") accessing and
8484-+otherwise using this software ("Python") in source or binary form and
8585-+its associated documentation.
8686-+
8787-+2. Subject to the terms and conditions of this License Agreement, PSF hereby
8888-+grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
8989-+analyze, test, perform and/or display publicly, prepare derivative works,
9090-+distribute, and otherwise use Python alone or in any derivative version,
9191-+provided, however, that PSF's License Agreement and PSF's notice of copyright,
9292-+i.e., "Copyright (c) 2001-2024 Python Software Foundation; All Rights Reserved"
9393-+are retained in Python alone or in any derivative version prepared by Licensee.
9494-+
9595-+3. In the event Licensee prepares a derivative work that is based on
9696-+or incorporates Python or any part thereof, and wants to make
9797-+the derivative work available to others as provided herein, then
9898-+Licensee hereby agrees to include in any such work a brief summary of
9999-+the changes made to Python.
100100-+
101101-+4. PSF is making Python available to Licensee on an "AS IS"
102102-+basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
103103-+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
104104-+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
105105-+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
106106-+INFRINGE ANY THIRD PARTY RIGHTS.
107107-+
108108-+5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
109109-+FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
110110-+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
111111-+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
112112-+
113113-+6. This License Agreement will automatically terminate upon a material
114114-+breach of its terms and conditions.
115115-+
116116-+7. Nothing in this License Agreement shall be deemed to create any
117117-+relationship of agency, partnership, or joint venture between PSF and
118118-+Licensee. This License Agreement does not grant permission to use PSF
119119-+trademarks or trade name in a trademark sense to endorse or promote
120120-+products or services of Licensee, or any third party.
121121-+
122122-+8. By copying, installing or otherwise using Python, Licensee
123123-+agrees to be bound by the terms and conditions of this License
124124-+Agreement.
125125-+
126126-+
127127-+BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
128128-+-------------------------------------------
129129-+
130130-+BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
131131-+
132132-+1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
133133-+office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
134134-+Individual or Organization ("Licensee") accessing and otherwise using
135135-+this software in source or binary form and its associated
136136-+documentation ("the Software").
137137-+
138138-+2. Subject to the terms and conditions of this BeOpen Python License
139139-+Agreement, BeOpen hereby grants Licensee a non-exclusive,
140140-+royalty-free, world-wide license to reproduce, analyze, test, perform
141141-+and/or display publicly, prepare derivative works, distribute, and
142142-+otherwise use the Software alone or in any derivative version,
143143-+provided, however, that the BeOpen Python License is retained in the
144144-+Software, alone or in any derivative version prepared by Licensee.
145145-+
146146-+3. BeOpen is making the Software available to Licensee on an "AS IS"
147147-+basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
148148-+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
149149-+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
150150-+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
151151-+INFRINGE ANY THIRD PARTY RIGHTS.
152152-+
153153-+4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
154154-+SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
155155-+AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
156156-+DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
157157-+
158158-+5. This License Agreement will automatically terminate upon a material
159159-+breach of its terms and conditions.
160160-+
161161-+6. This License Agreement shall be governed by and interpreted in all
162162-+respects by the law of the State of California, excluding conflict of
163163-+law provisions. Nothing in this License Agreement shall be deemed to
164164-+create any relationship of agency, partnership, or joint venture
165165-+between BeOpen and Licensee. This License Agreement does not grant
166166-+permission to use BeOpen trademarks or trade names in a trademark
167167-+sense to endorse or promote products or services of Licensee, or any
168168-+third party. As an exception, the "BeOpen Python" logos available at
169169-+http://www.pythonlabs.com/logos.html may be used according to the
170170-+permissions granted on that web page.
171171-+
172172-+7. By copying, installing or otherwise using the software, Licensee
173173-+agrees to be bound by the terms and conditions of this License
174174-+Agreement.
175175-+
176176-+
177177-+CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
178178-+---------------------------------------
179179-+
180180-+1. This LICENSE AGREEMENT is between the Corporation for National
181181-+Research Initiatives, having an office at 1895 Preston White Drive,
182182-+Reston, VA 20191 ("CNRI"), and the Individual or Organization
183183-+("Licensee") accessing and otherwise using Python 1.6.1 software in
184184-+source or binary form and its associated documentation.
185185-+
186186-+2. Subject to the terms and conditions of this License Agreement, CNRI
187187-+hereby grants Licensee a nonexclusive, royalty-free, world-wide
188188-+license to reproduce, analyze, test, perform and/or display publicly,
189189-+prepare derivative works, distribute, and otherwise use Python 1.6.1
190190-+alone or in any derivative version, provided, however, that CNRI's
191191-+License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
192192-+1995-2001 Corporation for National Research Initiatives; All Rights
193193-+Reserved" are retained in Python 1.6.1 alone or in any derivative
194194-+version prepared by Licensee. Alternately, in lieu of CNRI's License
195195-+Agreement, Licensee may substitute the following text (omitting the
196196-+quotes): "Python 1.6.1 is made available subject to the terms and
197197-+conditions in CNRI's License Agreement. This Agreement together with
198198-+Python 1.6.1 may be located on the internet using the following
199199-+unique, persistent identifier (known as a handle): 1895.22/1013. This
200200-+Agreement may also be obtained from a proxy server on the internet
201201-+using the following URL: http://hdl.handle.net/1895.22/1013".
202202-+
203203-+3. In the event Licensee prepares a derivative work that is based on
204204-+or incorporates Python 1.6.1 or any part thereof, and wants to make
205205-+the derivative work available to others as provided herein, then
206206-+Licensee hereby agrees to include in any such work a brief summary of
207207-+the changes made to Python 1.6.1.
208208-+
209209-+4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
210210-+basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
211211-+IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
212212-+DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
213213-+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
214214-+INFRINGE ANY THIRD PARTY RIGHTS.
215215-+
216216-+5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
217217-+1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
218218-+A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
219219-+OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
220220-+
221221-+6. This License Agreement will automatically terminate upon a material
222222-+breach of its terms and conditions.
223223-+
224224-+7. This License Agreement shall be governed by the federal
225225-+intellectual property law of the United States, including without
226226-+limitation the federal copyright law, and, to the extent such
227227-+U.S. federal law does not apply, by the law of the Commonwealth of
228228-+Virginia, excluding Virginia's conflict of law provisions.
229229-+Notwithstanding the foregoing, with regard to derivative works based
230230-+on Python 1.6.1 that incorporate non-separable material that was
231231-+previously distributed under the GNU General Public License (GPL), the
232232-+law of the Commonwealth of Virginia shall govern this License
233233-+Agreement only as to issues arising under or with respect to
234234-+Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
235235-+License Agreement shall be deemed to create any relationship of
236236-+agency, partnership, or joint venture between CNRI and Licensee. This
237237-+License Agreement does not grant permission to use CNRI trademarks or
238238-+trade name in a trademark sense to endorse or promote products or
239239-+services of Licensee, or any third party.
240240-+
241241-+8. By clicking on the "ACCEPT" button where indicated, or by copying,
242242-+installing or otherwise using Python 1.6.1, Licensee agrees to be
243243-+bound by the terms and conditions of this License Agreement.
244244-+
245245-+ ACCEPT
246246-+
247247-+
248248-+CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
249249-+--------------------------------------------------
250250-+
251251-+Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
252252-+The Netherlands. All rights reserved.
253253-+
254254-+Permission to use, copy, modify, and distribute this software and its
255255-+documentation for any purpose and without fee is hereby granted,
256256-+provided that the above copyright notice appear in all copies and that
257257-+both that copyright notice and this permission notice appear in
258258-+supporting documentation, and that the name of Stichting Mathematisch
259259-+Centrum or CWI not be used in advertising or publicity pertaining to
260260-+distribution of the software without specific, written prior
261261-+permission.
262262-+
263263-+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
264264-+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
265265-+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
266266-+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
267267-+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
268268-+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
269269-+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
270270-+
271271-+ZERO-CLAUSE BSD LICENSE FOR CODE IN THE PYTHON DOCUMENTATION
272272-+----------------------------------------------------------------------
273273-+
274274-+Permission to use, copy, modify, and/or distribute this software for any
275275-+purpose with or without fee is hereby granted.
276276-+
277277-+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
278278-+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
279279-+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
280280-+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
281281-+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
282282-+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
283283-+PERFORMANCE OF THIS SOFTWARE.
284284-diff --git a/nose/importer.py b/nose/importer.py
285285-index e677658..77099eb 100644
286286---- a/nose/importer.py
287287-+++ b/nose/importer.py
288288-@@ -7,9 +7,10 @@ the builtin importer.
289289- import logging
290290- import os
291291- import sys
292292-+import tokenize
293293- from nose.config import Config
294294--
295295--from imp import find_module, load_module, acquire_lock, release_lock
296296-+from importlib import _imp
297297-+from importlib import machinery
298298-299299- log = logging.getLogger(__name__)
300300-301301-@@ -20,6 +21,244 @@ except AttributeError:
302302- return (os.path.normcase(os.path.realpath(src)) ==
303303- os.path.normcase(os.path.realpath(dst)))
304304-305305-+################################################################################
306306-+# BEGIN IMPORTLIB SHIMS
307307-+################################################################################
308308-+
309309-+# Adapted from the CPython 3.11 imp.py code.
310310-+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Python Software Foundation; All Rights Reserved
311311-+# Originally licensed under the PSLv2 (see LICENSE.cpython) and incorporated under the LGPL 2.1 (see lgpl.txt).
312312-+
313313-+try:
314314-+ from _imp import create_dynamic
315315-+except ImportError:
316316-+ # Platform doesn't support dynamic loading.
317317-+ create_dynamic = None
318318-+
319319-+from importlib._bootstrap import _ERR_MSG, _exec, _load, _builtin_from_name
320320-+from importlib._bootstrap_external import SourcelessFileLoader
321321-+
322322-+from importlib import machinery
323323-+from importlib import util
324324-+import importlib
325325-+import os
326326-+import sys
327327-+import tokenize
328328-+import types
329329-+
330330-+
331331-+SEARCH_ERROR = 0
332332-+PY_SOURCE = 1
333333-+PY_COMPILED = 2
334334-+C_EXTENSION = 3
335335-+PY_RESOURCE = 4
336336-+PKG_DIRECTORY = 5
337337-+C_BUILTIN = 6
338338-+PY_FROZEN = 7
339339-+PY_CODERESOURCE = 8
340340-+IMP_HOOK = 9
341341-+
342342-+
343343-+def get_suffixes():
344344-+ extensions = [(s, 'rb', C_EXTENSION) for s in machinery.EXTENSION_SUFFIXES]
345345-+ source = [(s, 'r', PY_SOURCE) for s in machinery.SOURCE_SUFFIXES]
346346-+ bytecode = [(s, 'rb', PY_COMPILED) for s in machinery.BYTECODE_SUFFIXES]
347347-+
348348-+ return extensions + source + bytecode
349349-+
350350-+
351351-+class _HackedGetData:
352352-+
353353-+ """Compatibility support for 'file' arguments of various load_*()
354354-+ functions."""
355355-+
356356-+ def __init__(self, fullname, path, file=None):
357357-+ super().__init__(fullname, path)
358358-+ self.file = file
359359-+
360360-+ def get_data(self, path):
361361-+ """Gross hack to contort loader to deal w/ load_*()'s bad API."""
362362-+ if self.file and path == self.path:
363363-+ # The contract of get_data() requires us to return bytes. Reopen the
364364-+ # file in binary mode if needed.
365365-+ if not self.file.closed:
366366-+ file = self.file
367367-+ if 'b' not in file.mode:
368368-+ file.close()
369369-+ if self.file.closed:
370370-+ self.file = file = open(self.path, 'rb')
371371-+
372372-+ with file:
373373-+ return file.read()
374374-+ else:
375375-+ return super().get_data(path)
376376-+
377377-+
378378-+class _LoadSourceCompatibility(_HackedGetData, machinery.SourceFileLoader):
379379-+
380380-+ """Compatibility support for implementing load_source()."""
381381-+
382382-+
383383-+def load_source(name, pathname, file=None):
384384-+ loader = _LoadSourceCompatibility(name, pathname, file)
385385-+ spec = util.spec_from_file_location(name, pathname, loader=loader)
386386-+ if name in sys.modules:
387387-+ module = _exec(spec, sys.modules[name])
388388-+ else:
389389-+ module = _load(spec)
390390-+ # To allow reloading to potentially work, use a non-hacked loader which
391391-+ # won't rely on a now-closed file object.
392392-+ module.__loader__ = machinery.SourceFileLoader(name, pathname)
393393-+ module.__spec__.loader = module.__loader__
394394-+ return module
395395-+
396396-+
397397-+class _LoadCompiledCompatibility(_HackedGetData, SourcelessFileLoader):
398398-+
399399-+ """Compatibility support for implementing load_compiled()."""
400400-+
401401-+
402402-+def load_compiled(name, pathname, file=None):
403403-+ loader = _LoadCompiledCompatibility(name, pathname, file)
404404-+ spec = util.spec_from_file_location(name, pathname, loader=loader)
405405-+ if name in sys.modules:
406406-+ module = _exec(spec, sys.modules[name])
407407-+ else:
408408-+ module = _load(spec)
409409-+ # To allow reloading to potentially work, use a non-hacked loader which
410410-+ # won't rely on a now-closed file object.
411411-+ module.__loader__ = SourcelessFileLoader(name, pathname)
412412-+ module.__spec__.loader = module.__loader__
413413-+ return module
414414-+
415415-+
416416-+def load_package(name, path):
417417-+ if os.path.isdir(path):
418418-+ extensions = (machinery.SOURCE_SUFFIXES[:] +
419419-+ machinery.BYTECODE_SUFFIXES[:])
420420-+ for extension in extensions:
421421-+ init_path = os.path.join(path, '__init__' + extension)
422422-+ if os.path.exists(init_path):
423423-+ path = init_path
424424-+ break
425425-+ else:
426426-+ raise ValueError('{!r} is not a package'.format(path))
427427-+ spec = util.spec_from_file_location(name, path,
428428-+ submodule_search_locations=[])
429429-+ if name in sys.modules:
430430-+ return _exec(spec, sys.modules[name])
431431-+ else:
432432-+ return _load(spec)
433433-+
434434-+
435435-+def load_module(name, file, filename, details):
436436-+ """
437437-+
438438-+ Load a module, given information returned by find_module().
439439-+
440440-+ The module name must include the full package name, if any.
441441-+
442442-+ """
443443-+ suffix, mode, type_ = details
444444-+ if mode and (not mode.startswith('r') or '+' in mode):
445445-+ raise ValueError('invalid file open mode {!r}'.format(mode))
446446-+ elif file is None and type_ in {PY_SOURCE, PY_COMPILED}:
447447-+ msg = 'file object required for import (type code {})'.format(type_)
448448-+ raise ValueError(msg)
449449-+ elif type_ == PY_SOURCE:
450450-+ return load_source(name, filename, file)
451451-+ elif type_ == PY_COMPILED:
452452-+ return load_compiled(name, filename, file)
453453-+ elif type_ == PKG_DIRECTORY:
454454-+ return load_package(name, filename)
455455-+ elif type_ == C_BUILTIN:
456456-+ return init_builtin(name)
457457-+ elif type_ == PY_FROZEN:
458458-+ return _imp.init_frozen(name)
459459-+ else:
460460-+ msg = "Don't know how to import {} (type code {})".format(name, type_)
461461-+ raise ImportError(msg, name=name)
462462-+
463463-+
464464-+def find_module(name, path=None):
465465-+ """
466466-+
467467-+ Search for a module.
468468-+
469469-+ If path is omitted or None, search for a built-in, frozen or special
470470-+ module and continue search in sys.path. The module name cannot
471471-+ contain '.'; to search for a submodule of a package, pass the
472472-+ submodule name and the package's __path__.
473473-+
474474-+ """
475475-+ if not isinstance(name, str):
476476-+ raise TypeError("'name' must be a str, not {}".format(type(name)))
477477-+ elif not isinstance(path, (type(None), list)):
478478-+ # Backwards-compatibility
479479-+ raise RuntimeError("'path' must be None or a list, "
480480-+ "not {}".format(type(path)))
481481-+
482482-+ if path is None:
483483-+ if _imp.is_builtin(name):
484484-+ return None, None, ('', '', C_BUILTIN)
485485-+ elif _imp.is_frozen(name):
486486-+ return None, None, ('', '', PY_FROZEN)
487487-+ else:
488488-+ path = sys.path
489489-+
490490-+ for entry in path:
491491-+ package_directory = os.path.join(entry, name)
492492-+ for suffix in ['.py', machinery.BYTECODE_SUFFIXES[0]]:
493493-+ package_file_name = '__init__' + suffix
494494-+ file_path = os.path.join(package_directory, package_file_name)
495495-+ if os.path.isfile(file_path):
496496-+ return None, package_directory, ('', '', PKG_DIRECTORY)
497497-+ for suffix, mode, type_ in get_suffixes():
498498-+ file_name = name + suffix
499499-+ file_path = os.path.join(entry, file_name)
500500-+ if os.path.isfile(file_path):
501501-+ break
502502-+ else:
503503-+ continue
504504-+ break # Break out of outer loop when breaking out of inner loop.
505505-+ else:
506506-+ raise ImportError(_ERR_MSG.format(name), name=name)
507507-+
508508-+ encoding = None
509509-+ if 'b' not in mode:
510510-+ with open(file_path, 'rb') as file:
511511-+ encoding = tokenize.detect_encoding(file.readline)[0]
512512-+ file = open(file_path, mode, encoding=encoding)
513513-+ return file, file_path, (suffix, mode, type_)
514514-+
515515-+
516516-+def reload(module):
517517-+ """
518518-+
519519-+ Reload the module and return it.
520520-+
521521-+ The module must have been successfully imported before.
522522-+
523523-+ """
524524-+ return importlib.reload(module)
525525-+
526526-+
527527-+def init_builtin(name):
528528-+ """
529529-+
530530-+ Load and return a built-in module by name, or None is such module doesn't
531531-+ exist
532532-+ """
533533-+ try:
534534-+ return _builtin_from_name(name)
535535-+ except ImportError:
536536-+ return None
537537-+
538538-+
539539-+################################################################################
540540-+# END IMPORTLIB SHIMS
541541-+################################################################################
542542-+
543543-544544- class Importer(object):
545545- """An importer class that does only path-specific imports. That
546546-@@ -73,7 +312,7 @@ class Importer(object):
547547- else:
548548- part_fqname = "%s.%s" % (part_fqname, part)
549549- try:
550550-- acquire_lock()
551551-+ _imp.acquire_lock()
552552- log.debug("find module part %s (%s) in %s",
553553- part, part_fqname, path)
554554- fh, filename, desc = find_module(part, path)
555555-@@ -95,7 +334,7 @@ class Importer(object):
556556- finally:
557557- if fh:
558558- fh.close()
559559-- release_lock()
560560-+ _imp.release_lock()
561561- if parent:
562562- setattr(parent, part, mod)
563563- if hasattr(mod, '__path__'):
564564-diff --git a/nose/result.py b/nose/result.py
565565-index f974a14..228a42c 100644
566566---- a/nose/result.py
567567-+++ b/nose/result.py
568568-@@ -13,7 +13,7 @@ try:
569569- # 2.7+
570570- from unittest.runner import _TextTestResult
571571- except ImportError:
572572-- from unittest import _TextTestResult
573573-+ from unittest import TextTestResult as _TextTestResult
574574- from nose.config import Config
575575- from nose.util import isclass, ln as _ln # backwards compat
576576-
···359359 net2grid = gridnet; # add 2022-04-22
360360 nghttp2 = throw "in 1.52.0 removed deprecated python bindings."; # added 2023-06-08
361361 ninja-python = ninja; # add 2022-08-03
362362+ nose = throw "nose has been removed since it has been deprecated and unmaintained for almost a decade and does not work on Python 3.12; please switch to pytest or another test runner/framework"; # added 2024-07-28
362363 nose3 = throw "nose3 has been removed since it is unmaintained and does not work with Python 3.12"; # added 2024-07-28
363364 nosejs = throw "nosejs has been removed since it has not been maintained for 15 years and there are no dependent packages"; # added 2024-05-21
364365 nose-cov = throw "nose-cov has been removed, it was archived and unmaintained since 2012"; # added 2024-05-21