Skip to content

Commit 89008e0

Browse files
committed
Merge remote-tracking branch 'origin/master' into dependabot/pip/requests-2.32.0
2 parents 324394b + db09f99 commit 89008e0

25 files changed

+6665
-15077
lines changed

CHANGELOG.rst

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
v0.5.2
5+
------
6+
- Update link references of ownership from nexB to aboutcode-org
7+
48

59
v0.5.1
610
-------
@@ -9,7 +13,7 @@ v0.5.1
913

1014
v0.5.0
1115
-------
12-
- FetchCode now supports retrieving package info for following generic packages:
16+
- FetchCode now supports retrieving package info for following generic packages:
1317
* pkg:generic/linux
1418
* pkg:generic/mtd-utils
1519
* pkg:generic/barebox
@@ -42,7 +46,7 @@ v0.5.0
4246

4347
v0.4.0
4448
-------
45-
- FetchCode now supports retrieving package info for following generic packages:
49+
- FetchCode now supports retrieving package info for following generic packages:
4650
``busybox``, ``bzip2``, ``dnsmasq``, ``dropbear``, ``ebtables``, ``hostapd``, ``ipkg``,
4751
``iproute2``, ``iptables``, ``libnl``, ``lighttpd``, ``nftables``, ``openssh``, ``samba``,
4852
``syslinux``, ``toybox``, ``uclibc``, ``uclibc-ng``, ``util-linux`` and ``wpa_supplicant``.
@@ -63,4 +67,3 @@ v0.1.0
6367
---------
6468

6569
First, initial release.
66-

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) nexB Inc. and others.
33
# SPDX-License-Identifier: Apache-2.0
44
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
5+
# Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
66
# ScanCode is a trademark of nexB Inc.
77
#
88
# Licensed under the Apache License, Version 2.0 (the "License");

README.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ systems. It can work using plain HTTP and FTP URLs, as well as
77
as used in Python pip and as specified in `SPDX Package Download Location
88
<https://spdx.github.io/spdx-spec/3-package-information/#37-package-download-location>`_
99

10-
Homepage and support: https://github.com/nexB/fetchcode
10+
Homepage and support: https://github.com/aboutcode-org/fetchcode
1111

1212

1313
Why FetchCode?
@@ -24,11 +24,11 @@ Development installation
2424

2525
Clone the repo::
2626

27-
git clone https://github.com/nexB/fetchcode
27+
git clone https://github.com/aboutcode-org/fetchcode
2828

29-
Then install all the requirements using::
29+
Then install all the requirements using this command (on POSIX)::
3030

31-
configure --dev
31+
./configure --dev
3232

3333

3434
Running tests
@@ -45,13 +45,13 @@ Usage
4545
Fetch a code archive and get a ``fetchcode.fetch.Response`` object back::
4646

4747
>>> from fetchcode import fetch
48-
>>> f = fetch('https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
48+
>>> f = fetch('https://github.com/aboutcode-org/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
4949
>>> f.location
5050
'/tmp/tmp_cm02xsg'
5151
>>> f.content_type
5252
'application/zip'
5353
>>> f.url
54-
'https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'
54+
'https://github.com/aboutcode-org/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'
5555

5656
Fetch some package metadata and get a ``fetchcode.packagedcode_models.Package`` object back::
5757

azure-pipelines.yml

+47-57
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,54 @@
1-
21
################################################################################
32
# We use Azure to run the full tests suites on multiple Python 3.x
43
# on multiple Windows, macOS and Linux versions all on 64 bits
54
# These jobs are using VMs with Azure-provided Python builds
65
################################################################################
76

87
jobs:
9-
10-
- template: etc/ci/azure-posix.yml
11-
parameters:
12-
job_name: ubuntu20_cpython
13-
image_name: ubuntu-20.04
14-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
15-
test_suites:
16-
all: venv/bin/pytest -n 2 -vvs
17-
18-
- template: etc/ci/azure-posix.yml
19-
parameters:
20-
job_name: ubuntu22_cpython
21-
image_name: ubuntu-22.04
22-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
23-
test_suites:
24-
all: venv/bin/pytest -n 2 -vvs
25-
26-
- template: etc/ci/azure-posix.yml
27-
parameters:
28-
job_name: macos11_cpython
29-
image_name: macOS-11
30-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
31-
test_suites:
32-
all: venv/bin/pytest -n 2 -vvs
33-
34-
- template: etc/ci/azure-posix.yml
35-
parameters:
36-
job_name: macos12_cpython
37-
image_name: macOS-12
38-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
39-
test_suites:
40-
all: venv/bin/pytest -n 2 -vvs
41-
42-
- template: etc/ci/azure-posix.yml
43-
parameters:
44-
job_name: macos13_cpython
45-
image_name: macOS-13
46-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
47-
test_suites:
48-
all: venv/bin/pytest -n 2 -vvs
49-
50-
- template: etc/ci/azure-win.yml
51-
parameters:
52-
job_name: win2019_cpython
53-
image_name: windows-2019
54-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
55-
test_suites:
56-
all: venv\Scripts\pytest -n 2 -vvs
57-
58-
- template: etc/ci/azure-win.yml
59-
parameters:
60-
job_name: win2022_cpython
61-
image_name: windows-2022
62-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
63-
test_suites:
64-
all: venv\Scripts\pytest -n 2 -vvs
8+
- template: etc/ci/azure-posix.yml
9+
parameters:
10+
job_name: ubuntu20_cpython
11+
image_name: ubuntu-20.04
12+
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
13+
test_suites:
14+
all: venv/bin/pytest -n 2 -vvs
15+
16+
- template: etc/ci/azure-posix.yml
17+
parameters:
18+
job_name: ubuntu22_cpython
19+
image_name: ubuntu-22.04
20+
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
21+
test_suites:
22+
all: venv/bin/pytest -n 2 -vvs
23+
24+
- template: etc/ci/azure-posix.yml
25+
parameters:
26+
job_name: macos12_cpython
27+
image_name: macOS-12
28+
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
29+
test_suites:
30+
all: venv/bin/pytest -n 2 -vvs
31+
32+
- template: etc/ci/azure-posix.yml
33+
parameters:
34+
job_name: macos13_cpython
35+
image_name: macOS-13
36+
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
37+
test_suites:
38+
all: venv/bin/pytest -n 2 -vvs
39+
40+
- template: etc/ci/azure-win.yml
41+
parameters:
42+
job_name: win2019_cpython
43+
image_name: windows-2019
44+
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
45+
test_suites:
46+
all: venv\Scripts\pytest -n 2 -vvs
47+
48+
- template: etc/ci/azure-win.yml
49+
parameters:
50+
job_name: win2022_cpython
51+
image_name: windows-2022
52+
python_versions: ["3.7", "3.8", "3.9", "3.10", "3.11"]
53+
test_suites:
54+
all: venv\Scripts\pytest -n 2 -vvs

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) nexB Inc. and others. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/ for support or download.
6+
# See https://github.com/aboutcode-org/ for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

configure.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@rem Copyright (c) nexB Inc. and others. All rights reserved.
55
@rem SPDX-License-Identifier: Apache-2.0
66
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
@rem See https://github.com/nexB/ for support or download.
7+
@rem See https://github.com/aboutcode-org/ for support or download.
88
@rem See https://aboutcode.org for more information about nexB OSS projects.
99

1010

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = Apache-2.0
66
description = fetchcode is a library to reliably fetch code via HTTP, FTP and version control systems.
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/nexB/fetchcode
9+
url = https://github.com/aboutcode-org/fetchcode
1010

1111
author = nexB. Inc. and others
1212
author_email = [email protected]

src/fetchcode/__init__.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# fetchcode is a free software tool from nexB Inc. and others.
2-
# Visit https://github.com/nexB/fetchcode for support and download.
2+
# Visit https://github.com/aboutcode-org/fetchcode for support and download.
33
#
44
# Copyright (c) nexB Inc. and others. All rights reserved.
55
# http://nexb.com and http://aboutcode.org
@@ -41,7 +41,7 @@ def __init__(self, location, content_type, size, url):
4141
def fetch_http(url, location):
4242
"""
4343
Return a `Response` object built from fetching the content at a HTTP/HTTPS based `url` URL string
44-
saving the content in a file at `location`
44+
saving the content in a file at `location`
4545
"""
4646
r = requests.get(url)
4747
with open(location, 'wb') as f:
@@ -51,15 +51,16 @@ def fetch_http(url, location):
5151
size = r.headers.get('content-length')
5252
size = int(size) if size else None
5353

54-
resp = Response(location=location, content_type=content_type, size=size, url=url)
54+
resp = Response(location=location,
55+
content_type=content_type, size=size, url=url)
5556

5657
return resp
5758

5859

5960
def fetch_ftp(url, location):
6061
"""
6162
Return a `Response` object built from fetching the content at a FTP based `url` URL string
62-
saving the content in a file at `location`
63+
saving the content in a file at `location`
6364
"""
6465
url_parts = urlparse(url)
6566

@@ -84,7 +85,8 @@ def fetch_ftp(url, location):
8485
ftp.retrbinary(file, f.write)
8586
ftp.close()
8687

87-
resp = Response(location=location, content_type=content_type, size=size, url=url)
88+
resp = Response(location=location,
89+
content_type=content_type, size=size, url=url)
8890
return resp
8991

9092

0 commit comments

Comments
 (0)