git: 2a0ccb4c3f80 - main - devel/py-multipart: Add py-multipart 0.2.4

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 02 Nov 2023 07:40:39 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2a0ccb4c3f805490ccdbb57ac6df76038996db9b

commit 2a0ccb4c3f805490ccdbb57ac6df76038996db9b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-11-02 07:33:25 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-11-02 07:37:17 +0000

    devel/py-multipart: Add py-multipart 0.2.4
    
    Multipart provides a parser for the multipart/form-data format. It can read from
    a file, a socket or a WSGI environment. The parser can be used to replace
    cgi.FieldStorage to work around its limitations.
    
    Features:
    - Parses multipart/form-data and application/x-www-form-urlencoded.
    - Produces useful error messages in 'strict'-mode.
    - Gracefully handle uploads of unknown size (missing Content-Length header).
    - Fast memory mapped files (io.BytesIO) for small uploads.
    - Temporary files on disk for big uploads.
    - Memory and disk resource limits to prevent DOS attacks.
    - Fixes many shortcomings and bugs of cgi.FieldStorage.
    - 100% test coverage.
---
 devel/Makefile               |  1 +
 devel/py-multipart/Makefile  | 19 +++++++++++++++++++
 devel/py-multipart/distinfo  |  3 +++
 devel/py-multipart/pkg-descr | 13 +++++++++++++
 4 files changed, 36 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index e62245b80ab8..496744fdd558 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5025,6 +5025,7 @@
     SUBDIR += py-msgpack
     SUBDIR += py-mulpyplexer
     SUBDIR += py-multi_key_dict
+    SUBDIR += py-multipart
     SUBDIR += py-multipledispatch
     SUBDIR += py-multiprocess
     SUBDIR += py-multiset
diff --git a/devel/py-multipart/Makefile b/devel/py-multipart/Makefile
new file mode 100644
index 000000000000..957169c8d311
--- /dev/null
+++ b/devel/py-multipart/Makefile
@@ -0,0 +1,19 @@
+PORTNAME=	multipart
+PORTVERSION=	0.2.4
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Parser for multipart/form-data
+WWW=		https://github.com/defnull/multipart
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-multipart/distinfo b/devel/py-multipart/distinfo
new file mode 100644
index 000000000000..3ff85e2fea6c
--- /dev/null
+++ b/devel/py-multipart/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1698848686
+SHA256 (multipart-0.2.4.tar.gz) = 06ba205360bc7096fefe618e4f1e9b2cdb890b4f2157053a81f386912a2522cb
+SIZE (multipart-0.2.4.tar.gz) = 22300
diff --git a/devel/py-multipart/pkg-descr b/devel/py-multipart/pkg-descr
new file mode 100644
index 000000000000..c089b460eb80
--- /dev/null
+++ b/devel/py-multipart/pkg-descr
@@ -0,0 +1,13 @@
+Multipart provides a parser for the multipart/form-data format. It can read from
+a file, a socket or a WSGI environment. The parser can be used to replace
+cgi.FieldStorage to work around its limitations.
+
+Features:
+- Parses multipart/form-data and application/x-www-form-urlencoded.
+- Produces useful error messages in 'strict'-mode.
+- Gracefully handle uploads of unknown size (missing Content-Length header).
+- Fast memory mapped files (io.BytesIO) for small uploads.
+- Temporary files on disk for big uploads.
+- Memory and disk resource limits to prevent DOS attacks.
+- Fixes many shortcomings and bugs of cgi.FieldStorage.
+- 100% test coverage.