ActivityPub Viewer

A small tool to view real-world ActivityPub objects as JSON! Enter a URL or username from Mastodon or a similar service below, and we'll send a request with the right Accept header to the server to view the underlying object.

Open in browser →
{ "@context": [ "https://join-lemmy.org/context.json", "https://www.w3.org/ns/activitystreams" ], "type": "OrderedCollection", "id": "https://programming.dev/c/python/outbox", "totalItems": 50, "orderedItems": [ { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/05f0eb89-c22d-4852-bdd5-6dc67c46eeb2", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/28293781", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python 3.14.0a7, 3.13.3, 3.12.10, 3.11.12, 3.10.17 and 3.9.22 are now available", "cc": [], "content": "", "mediaType": "text/html", "source": { "content": "", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://discuss.python.org/t/python-3-14-0a7-3-13-3-3-12-10-3-11-12-3-10-17-and-3-9-22-are-now-available/87580", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/35485aae-db34-488c-8949-4232f61aa367.png" }, "sensitive": false, "published": "2025-04-09T01:59:30.762014Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/28293781", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/cc663ad3-a0bd-4347-9ea4-9b7ce48ad193" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/08ae8675-3caf-468b-8c0a-5a5c53fb9d4c", "actor": "https://programming.dev/u/jnovinger", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/29139521", "attributedTo": "https://programming.dev/u/jnovinger", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python Performance: Why 'if not list' is 2x Faster Than Using len()", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://blog.codingconfessions.com/p/python-performance-why-if-not-list", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/f9e29aaa-9450-43b2-a637-4ec0950b874c.jpeg" }, "sensitive": false, "published": "2025-04-24T01:15:10.148890Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/29139521", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/c0f05c19-d71c-451a-82a1-f43aa6e79fb3" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/219fd5e3-c1f9-4261-bdcc-126864f9fa8d", "actor": "https://lemmy.world/u/fubarx", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.world/post/28263587", "attributedTo": "https://lemmy.world/u/fubarx", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "PyPi tariff", "cc": [], "content": "<p>cross-posted from: <a href=\"https://lemmy.world/post/28263533\">lemmy.world/post/28263533</a></p>\n<blockquote>\n<p>👊 TARIFF 🔥</p>\n<p>The GREATEST, most TREMENDOUS Python package that makes importing great again!</p>\n<p>TARIFF is a fantastic tool that lets you impose import tariffs on Python packages. We’re going to bring manufacturing BACK to your codebase by making foreign imports more EXPENSIVE!</p>\n</blockquote>\n", "mediaType": "text/html", "source": { "content": "cross-posted from: https://lemmy.world/post/28263533\n\n> 👊 TARIFF 🔥\n> \n> The GREATEST, most TREMENDOUS Python package that makes importing great again!\n> \n> TARIFF is a fantastic tool that lets you impose import tariffs on Python packages. We're going to bring manufacturing BACK to your codebase by making foreign imports more EXPENSIVE!", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://pypi.org/project/tariff/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-04-15T16:29:45.138170Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.world/post/28263587", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/7cfffb71-c53d-41a9-b44a-95c08eb4b9bf" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/5834524f-26ba-41d2-ab7d-b34bb474f8cf", "actor": "https://programming.dev/u/learnbyexample", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/28650613", "attributedTo": "https://programming.dev/u/learnbyexample", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Understanding Context Manager and its Syntastic Sugar", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://bjoernricks.github.io/posts/python/context-manager/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-04-15T11:44:41.736646Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/28650613", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/e4f67e37-8b41-498c-b4b4-021894837b6f" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/6388f6ed-caf8-42e8-9caa-f9cd0aa56a46", "actor": "https://lemmy.nz/u/absGeekNZ", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.nz/post/21454411", "attributedTo": "https://lemmy.nz/u/absGeekNZ", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Venv pandoc issue", "cc": [], "content": "<p>I can’t get my program to use pandoc from inside a venv.</p>\n<p>I can use pandoc from the system context.</p>\n<p>From inside the venv</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">which pandoc\n</span><span style=\"color:#323232;\">/usr/bin/pandoc \n</span></pre>\n<p>I’ve installed pandoc inside the venv with pip, and confirmed the files are in the venv.</p>\n<p>What am I missing?</p>\n", "mediaType": "text/html", "source": { "content": "I can't get my program to use pandoc from inside a venv.\n\nI can use pandoc from the system context.\n\nFrom inside the venv\n```\nwhich pandoc\n/usr/bin/pandoc \n```\n\nI've installed pandoc inside the venv with pip, and confirmed the files are in the venv.\n\nWhat am I missing?", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-04-12T04:46:02.508146Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.nz/post/21454411", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/2b8eb67b-4a15-43fa-a424-3cbc36fc8c37" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/64421a25-8a8b-4c1c-a7bf-f94fb778f3ef", "actor": "https://discuss.online/u/peterg75", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://discuss.online/post/18325956", "attributedTo": "https://discuss.online/u/peterg75", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Help! Connecting to IBM Informix DB", "cc": [], "content": "<p>Hello, Python Community!</p>\n<p>Has someone been able to successfully connect to an IBM Informix DB with a Python app? I have the following environment:\nDEV:\nWindows 11\nPython 3.13.3 64-bit\nVS Code</p>\n<p>DB:\nIBM Informix 12.10 hosted in Azure\nI’m able to connect to it usind DBeaver (JDBC)</p>\n<p>I have tried the following libraries to try to establish the connection:\nibm_db:\n<code> Traceback (most recent call last): File “c:\\Users\\peterg\\source\\python\\dbApp\\ibm_db_test.py”, line 1, in &lt;module&gt; import ibm_db as db ImportError: DLL load failed while importing ibm_db: The specified module could not be found._</code></p>\n<p>pyodbc:\nI have an ODBC DSN connection established\n<code>Traceback (most recent call last): File “c:\\Users\\peterg\\source\\python\\dbApp\\pyodbc_test.py”, line 3, in &lt;module&gt; conn = db.connect(“Dsn=‘DSN_NAME’”) pyodbc.InterfaceError: (‘IM002’, ‘[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)’)</code></p>\n<p>JayDeBeAPI:\nI have downloaded the same JAR files as DBeaver uses and copied them to a dir local to the project and added the CLASSPATH variable: set “CLASSPATH=%PROJECT_ROOT%\\Java\\jbc-4.50.10.1.jar:%PROJECT_ROOT%\\Java\\bson-3.8.0.jar”</p>\n<p><code>File “c:\\Users\\peterg\\source\\python\\dbApp\\JayDeBeApi_test.py”, line 3, in &lt;module&gt; dbConn = db.connect(“com.informix.jdbc.IfxDriver”, “jdbc:informix-sqli://hostname:port/db_name:INFORMIXSERVER=server_name”, [‘user’, ‘pass’]) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py”, line 412, in connect jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py”, line 221, in _jdbc_connect_jpype jpype.JClass(jclassname) ~~~~~~~~~~~~^^^^^^^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jpype\\_jclass.py”, line 99, in __new__ return _jpype._getClass(jc) ~~~~~~~~~~~~~~~~^^^^ TypeError: Class com.informix.jdbc.IfxDriver is not found</code></p>\n<p>PyInformix:\n<code>SADeprecationWarning: The dbapi() classmethod on dialect classes has been renamed to import_dbapi(). Implement an import_dbapi() classmethod directly on class &lt;class ‘pyinformix.ifx_jdbc.InformixJDBCDialect’&gt; to remove this warning; the old .dbapi() classmethod may be maintained for backwards compatibility. engine = create_engine(‘informix+ifx_jdbc://hostname:port/db_name;INFORMIXSERVER=server_name;delimident=y;user=user;password=pass’) Traceback (most recent call last): File “c:\\Users\\peterg\\source\\python\\dbApp\\PyInformix_test.py”, line 5, in &lt;module&gt; conn = engine.connect() File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\base.py”, line 3274, in connect return self._connection_cls(self) ~~~~~~~~~~~~~~~~~~~~^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\base.py”, line 146, in __init__ self._dbapi_connection = engine.raw_connection() ~~~~~~~~~~~~~~~~~~~~~^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\base.py”, line 3298, in raw_connection return self.pool.connect() ~~~~~~~~~~~~~~~~~^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 449, in connect return _ConnectionFairy._checkout(self) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 1264, in _checkout fairy = _ConnectionRecord.checkout(pool) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 713, in checkout rec = pool._do_get() File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\impl.py”, line 179, in _do_get with util.safe_reraise(): ~~~~~~~~~~~~~~~~~^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\util\\langhelpers.py”, line 146, in __exit__ raise exc_value.with_traceback(exc_tb) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\impl.py”, line 177, in _do_get return self._create_connection() ~~~~~~~~~~~~~~~~~~~~~~~^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 390, in _create_connection return _ConnectionRecord(self) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 675, in __init__ self.__connect() ~~~~~~~~~~~~~~^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 901, in __connect with util.safe_reraise(): ~~~~~~~~~~~~~~~~~^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\util\\langhelpers.py”, line 146, in __exit__ raise exc_value.with_traceback(exc_tb) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py”, line 897, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) ~~~~~~~~~~~~~~~~~~~~^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\create.py”, line 646, in connect return dialect.connect(*cargs, **cparams) ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\default.py”, line 625, in connect return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501 ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py”, line 412, in connect jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs) File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py”, line 221, in _jdbc_connect_jpype jpype.JClass(jclassname) ~~~~~~~~~~~~^^^^^^^^^^^^ File “C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jpype\\_jclass.py”, line 99, in __new__ return _jpype._getClass(jc) ~~~~~~~~~~~~~~~~^^^^ TypeError: Class com.informix.jdbc.IfxDriver is not found</code></p>\n<p>IfxPy:</p>\n<p>Uanble to install, seems that it does not support the latest Python 3 version.</p>\n<p>Any help would be appreciated. I can attach the sample code of every method I tried if that would help.</p>\n", "mediaType": "text/html", "source": { "content": "Hello, Python Community!\n\nHas someone been able to successfully connect to an IBM Informix DB with a Python app? I have the following environment:\nDEV:\nWindows 11\nPython 3.13.3 64-bit\nVS Code\n\nDB:\nIBM Informix 12.10 hosted in Azure\nI'm able to connect to it usind DBeaver (JDBC)\n\nI have tried the following libraries to try to establish the connection:\nibm_db:\n` \nTraceback (most recent call last):\n File \"c:\\Users\\peterg\\source\\python\\dbApp\\ibm_db_test.py\", line 1, in <module>\n import ibm_db as db\nImportError: DLL load failed while importing ibm_db: The specified module could not be found._\n`\n\npyodbc:\nI have an ODBC DSN connection established\n`\nTraceback (most recent call last):\n File \"c:\\Users\\peterg\\source\\python\\dbApp\\pyodbc_test.py\", line 3, in <module>\n conn = db.connect(\"Dsn='DSN_NAME'\")\npyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')\n`\n\nJayDeBeAPI:\nI have downloaded the same JAR files as DBeaver uses and copied them to a dir local to the project and added the CLASSPATH variable: set \"CLASSPATH=%PROJECT_ROOT%\\Java\\jbc-4.50.10.1.jar:%PROJECT_ROOT%\\Java\\bson-3.8.0.jar\"\n\n`\nFile \"c:\\Users\\peterg\\source\\python\\dbApp\\JayDeBeApi_test.py\", line 3, in <module>\n dbConn = db.connect(\"com.informix.jdbc.IfxDriver\",\n \"jdbc:informix-sqli://hostname:port/db_name:INFORMIXSERVER=server_name\",\n ['user', 'pass'])\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py\", line 412, in connect\n jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py\", line 221, in _jdbc_connect_jpype\n jpype.JClass(jclassname)\n ~~~~~~~~~~~~^^^^^^^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jpype\\_jclass.py\", line 99, in __new__\n return _jpype._getClass(jc)\n ~~~~~~~~~~~~~~~~^^^^\nTypeError: Class com.informix.jdbc.IfxDriver is not found\n`\n\nPyInformix:\n`\nSADeprecationWarning: The dbapi() classmethod on dialect classes has been renamed to import_dbapi(). Implement an import_dbapi() classmethod directly on class <class 'pyinformix.ifx_jdbc.InformixJDBCDialect'> to remove this warning; the old .dbapi() classmethod may be maintained for backwards compatibility.\n engine = create_engine('informix+ifx_jdbc://hostname:port/db_name;INFORMIXSERVER=server_name;delimident=y;user=user;password=pass')\nTraceback (most recent call last):\n File \"c:\\Users\\peterg\\source\\python\\dbApp\\PyInformix_test.py\", line 5, in <module>\n conn = engine.connect()\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 3274, in connect\n return self._connection_cls(self)\n ~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 146, in __init__\n self._dbapi_connection = engine.raw_connection()\n ~~~~~~~~~~~~~~~~~~~~~^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\base.py\", line 3298, in raw_connection\n return self.pool.connect()\n ~~~~~~~~~~~~~~~~~^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 449, in connect\n return _ConnectionFairy._checkout(self)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 1264, in _checkout\n fairy = _ConnectionRecord.checkout(pool)\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 713, in checkout\n rec = pool._do_get()\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\impl.py\", line 179, in _do_get\n with util.safe_reraise():\n ~~~~~~~~~~~~~~~~~^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\util\\langhelpers.py\", line 146, in __exit__\n raise exc_value.with_traceback(exc_tb)\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\impl.py\", line 177, in _do_get\n return self._create_connection()\n ~~~~~~~~~~~~~~~~~~~~~~~^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 390, in _create_connection\n return _ConnectionRecord(self)\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 675, in __init__\n self.__connect()\n ~~~~~~~~~~~~~~^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 901, in __connect\n with util.safe_reraise():\n ~~~~~~~~~~~~~~~~~^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\util\\langhelpers.py\", line 146, in __exit__\n raise exc_value.with_traceback(exc_tb)\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\pool\\base.py\", line 897, in __connect\n self.dbapi_connection = connection = pool._invoke_creator(self)\n ~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\create.py\", line 646, in connect\n return dialect.connect(*cargs, **cparams)\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\sqlalchemy\\engine\\default.py\", line 625, in connect\n return self.loaded_dbapi.connect(*cargs, **cparams) # type: ignore[no-any-return] # NOQA: E501\n ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py\", line 412, in connect\n jconn = _jdbc_connect(jclassname, url, driver_args, jars, libs)\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jaydebeapi\\__init__.py\", line 221, in _jdbc_connect_jpype\n jpype.JClass(jclassname)\n ~~~~~~~~~~~~^^^^^^^^^^^^\n File \"C:\\Users\\peterg\\AppData\\Local\\Programs\\Python\\Python313\\Lib\\site-packages\\jpype\\_jclass.py\", line 99, in __new__\n return _jpype._getClass(jc)\n ~~~~~~~~~~~~~~~~^^^^\nTypeError: Class com.informix.jdbc.IfxDriver is not found\n`\n\nIfxPy:\n\nUanble to install, seems that it does not support the latest Python 3 version.\n\nAny help would be appreciated. I can attach the sample code of every method I tried if that would help.", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-04-11T12:56:55.248581Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://discuss.online/post/18325956", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/27f92a33-4114-4a4e-9539-1d5bc1aee23c" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/b9493743-3fc3-4a95-9f10-d0834f7023dd", "actor": "https://lemmy.zip/u/ArmoredThirteen", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.zip/post/36083163", "attributedTo": "https://lemmy.zip/u/ArmoredThirteen", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "I'm making a tool for converting Obsidian vaults into html pages", "cc": [], "content": "<p>It isn’t anything particularly amazing but I’m proud of it! Code can be found here: <a href=\"https://github.com/ArmoredThirteen/PysidianSiteMaker\">github.com/ArmoredThirteen/PysidianSiteMaker</a></p>\n<p>The general use case is that I’m making a setting and I store all my notes in an Obsidian project. It used to be when I shared notes it was a giant pain trying to send people files so I decided to set up a website. I was using a tool called <a href=\"https://github.com/obsidian-html/obsidian-html\" rel=\"nofollow\">ObsidianHTML</a> but it doesn’t get updated very often and I’ve had to do some questionable downgrades on my build server to keep using it. It’s also way more advanced than what I have use for and I get lost in the aging documentation</p>\n<p>So now I’m building a replacement command line tool! My build server picks up on changes made to the settings repo, pulls them in and my PSM code, converts the vault to an html website, and deploys from there. Bonus points is that since my tool is so dedicated purpose the build times have been cut so I can deploy faster than ever</p>\n<p>I’ve never made anything like this before and I’m admittedly not great at Python, I’ve spent most my time in C#. I know there are lots of areas that aren’t written the best and I’m sure there’s plenty I don’t know about too, despite the small size. I’m always up for feedback!</p>\n", "mediaType": "text/html", "source": { "content": "It isn't anything particularly amazing but I'm proud of it! Code can be found here: https://github.com/ArmoredThirteen/PysidianSiteMaker\n\nThe general use case is that I'm making a setting and I store all my notes in an Obsidian project. It used to be when I shared notes it was a giant pain trying to send people files so I decided to set up a website. I was using a tool called [ObsidianHTML](https://github.com/obsidian-html/obsidian-html) but it doesn't get updated very often and I've had to do some questionable downgrades on my build server to keep using it. It's also way more advanced than what I have use for and I get lost in the aging documentation\n\nSo now I'm building a replacement command line tool! My build server picks up on changes made to the settings repo, pulls them in and my PSM code, converts the vault to an html website, and deploys from there. Bonus points is that since my tool is so dedicated purpose the build times have been cut so I can deploy faster than ever\n\nI've never made anything like this before and I'm admittedly not great at Python, I've spent most my time in C#. I know there are lots of areas that aren't written the best and I'm sure there's plenty I don't know about too, despite the small size. I'm always up for feedback!", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-04-10T22:34:01.370858Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.zip/post/36083163", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/762577c1-476d-43a3-9ae7-5a964158c930" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/e6355592-7770-47a9-aa5e-a34b00ec390a", "actor": "https://lemm.ee/u/neme", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemm.ee/post/60590671", "attributedTo": "https://lemm.ee/u/neme", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python in Visual Studio Code - April 2025 Release", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://devblogs.microsoft.com/python/python-in-visual-studio-code-april-2025-release/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-04-07T00:02:16.342005Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemm.ee/post/60590671", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/c47ebb3d-6897-4ad0-a990-9e109d56df9c" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/44811b04-cfd4-4d02-8231-5ffc027eb03f", "actor": "https://lemmy.world/u/cm0002", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.world/post/27838286", "attributedTo": "https://lemmy.world/u/cm0002", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python now has a standard package lock file format – though winning full adoption will be a challenge", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://devclass.com/2025/04/04/python-now-has-a-standard-package-lock-file-format-though-winning-full-adoption-will-be-a-challenge/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/26727272-bd86-4645-a529-f7398805b993.jpeg" }, "sensitive": false, "published": "2025-04-06T02:54:32.723924Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.world/post/27838286", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/7e1824e2-d80b-4f31-93ee-3d538cd05b43" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/6b2088f5-a90a-4537-b9d9-d58c6ee9a1be", "actor": "https://programming.dev/u/learnbyexample", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/28095870", "attributedTo": "https://programming.dev/u/learnbyexample", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Pytorch internals", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://blog.ezyang.com/2019/05/pytorch-internals/", "mediaType": null, "type": "Link" } ], "sensitive": false, "published": "2025-04-05T12:17:11.214358Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/28095870", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/ee086ad5-5042-4005-a9e1-db0a66064e26" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/cf688265-08c3-4922-a345-2208a9edc826", "actor": "https://programming.dev/u/3rr4tt1c", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/28081248", "attributedTo": "https://programming.dev/u/3rr4tt1c", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Are docstrings commonly used?", "cc": [], "content": "<p>Was going through a Python tutorial, but it seems kinda dated. Wanted to know if people regularly use docstrings in the workforce. Or are they somewhat irrelevant because you can convey most of that info via comments and context? Do jobs make you use them?</p>\n", "mediaType": "text/html", "source": { "content": "Was going through a Python tutorial, but it seems kinda dated. Wanted to know if people regularly use docstrings in the workforce. Or are they somewhat irrelevant because you can convey most of that info via comments and context? Do jobs make you use them?", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-04-05T05:01:34.312889Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/28081248", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/dedc719e-9f44-43b6-bf50-b7510922c9d1" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/e22db7bc-dbd9-48ca-a6a5-ff12cdf982a4", "actor": "https://lemm.ee/u/neme", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemm.ee/post/60388546", "attributedTo": "https://lemm.ee/u/neme", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "NVIDIA Finally Adds Native Python Support to CUDA", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://thenewstack.io/nvidia-finally-adds-native-python-support-to-cuda/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/e428411a-94e8-4c1c-aaac-6f8fff0e8929.jpeg" }, "sensitive": false, "published": "2025-04-04T19:51:27.344736Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemm.ee/post/60388546", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/211343ca-2e70-4593-a592-7d85102b95d2" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/96565b26-0fe3-41bb-9354-1be970c780a6", "actor": "https://lemmy.zip/u/ArmoredThirteen", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.zip/post/35579839", "attributedTo": "https://lemmy.zip/u/ArmoredThirteen", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "[Solved] Using markdown library to convert to html pages isn't formatting how I would like it to", "cc": [], "content": "<p>Hello if anyone knows of a way to get python-markdown to behave in the way I’d like, or of an alternative way to do it, I’d love some help! My use case is I’m converting .md files made with Obsidian into html files. Obsidian has tags that are a pound sign followed by the tag (so like “#TagName”). When the tag is the first item on a line the pound sign is confused for a heading, even though there is no space after it.</p>\n<p>Is there a way that I can avoid this so it only reads it as a heading if there is a space between the pound and the next word? I’m even considering some kind of find/replace logic so I can swap it out with like a link to a page that lists all the pages with that tag or something that gets run before the markdown to html conversion.</p>\n<p>Edit:\nThe solution I’m going for is a regex find/replace. Currently the string pattern looks like <code>“#[^\\s#][^\\s” + string.punctuation + “#]*”</code> which can find tags but ignores headers. Since the ultimate goal is to have the tags link to a tag page anyway I can solve it all in one step by doing a replace with a relevant link.</p>\n", "mediaType": "text/html", "source": { "content": "Hello if anyone knows of a way to get python-markdown to behave in the way I'd like, or of an alternative way to do it, I'd love some help! My use case is I'm converting .md files made with Obsidian into html files. Obsidian has tags that are a pound sign followed by the tag (so like \"#TagName\"). When the tag is the first item on a line the pound sign is confused for a heading, even though there is no space after it.\n\nIs there a way that I can avoid this so it only reads it as a heading if there is a space between the pound and the next word? I'm even considering some kind of find/replace logic so I can swap it out with like a link to a page that lists all the pages with that tag or something that gets run before the markdown to html conversion.\n\nEdit:\nThe solution I'm going for is a regex find/replace. Currently the string pattern looks like `\"#[^\\s#][^\\s\" + string.punctuation + \"#]*\"` which can find tags but ignores headers. Since the ultimate goal is to have the tags link to a tag page anyway I can solve it all in one step by doing a replace with a relevant link.", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-04-04T06:44:24.313714Z", "updated": "2025-04-07T18:04:05.549724Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.zip/post/35579839", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/76002a25-e2df-4576-8d73-9997e73ced5c" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/c09f21db-a718-4446-b71e-c94a1100b132", "actor": "https://lemm.ee/u/thickertoofan", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemm.ee/post/59714351", "attributedTo": "https://lemm.ee/u/thickertoofan", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "How do I segment this QR code from the white background using opencv", "cc": [], "content": "<p>cross-posted from: <a href=\"https://lemm.ee/post/59714239\">lemm.ee/post/59714239</a></p>\n<blockquote>\n<p>Some custom filter kernel to average out values from a chunk of pixels with some kind of “border aware” behaviour?</p>\n</blockquote>\n", "mediaType": "text/html", "source": { "content": "cross-posted from: https://lemm.ee/post/59714239\n\n> Some custom filter kernel to average out values from a chunk of pixels with some kind of \"border aware\" behaviour?", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://imgur.com/a/BchnHse", "mediaType": "application/json", "type": "Link" } ], "sensitive": false, "published": "2025-03-28T16:53:45.252951Z", "updated": "2025-03-28T17:19:27.590209Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemm.ee/post/59714351", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/ad4c4f96-c368-49d0-bc4d-19999d87011a" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/2f1b15f0-91f8-415f-b92d-b5209ee8513f", "actor": "https://lemmy.world/u/zkfcfbzr", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.world/post/27385536", "attributedTo": "https://lemmy.world/u/zkfcfbzr", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Why is pynput typing incorrect output, but only on Linux?", "cc": [], "content": "<p>I have a rather large Python script that I use as basically a replacement for autohotkey. It uses pynput for keyboard and mouse control - and at least on Windows, it works exactly how I expect.</p>\n<p>I recently started dual-booting with Linux and have been trying to get the script to work here as well. It does work but with mixed results - in particular, I found that pynput has bizarrely wrong output for special characters, in a way that’s both consistent and inconsistent.</p>\n<p>The simplest possible case I found that reproduces the error is this script:</p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"font-weight:bold;color:#a71d5d;\">import </span><span style=\"color:#323232;\">time\n</span><span style=\"font-weight:bold;color:#a71d5d;\">from </span><span style=\"color:#323232;\">pynput </span><span style=\"font-weight:bold;color:#a71d5d;\">import </span><span style=\"color:#323232;\">keyboard\n</span><span style=\"color:#323232;\">\n</span><span style=\"font-style:italic;color:#969896;\"># Sleep statement is just to give time to move the mouse cursor to a text input field\n</span><span style=\"color:#323232;\">time.sleep(</span><span style=\"color:#0086b3;\">2</span><span style=\"color:#323232;\">)\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">my_kb </span><span style=\"font-weight:bold;color:#a71d5d;\">= </span><span style=\"color:#323232;\">keyboard.Controller()\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">text </span><span style=\"font-weight:bold;color:#a71d5d;\">= </span><span style=\"color:#183691;\">&#39;🍆&#39; </span><span style=\"font-style:italic;color:#969896;\"># Eggplant emoji\n</span><span style=\"color:#323232;\">my_kb.type(text)\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">time.sleep(</span><span style=\"color:#0086b3;\">1</span><span style=\"color:#323232;\">)\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">text </span><span style=\"font-weight:bold;color:#a71d5d;\">= </span><span style=\"color:#183691;\">&#39;𝕥𝕖𝕤𝕥&#39; </span><span style=\"font-style:italic;color:#969896;\"># blackboard bold test\n</span><span style=\"color:#323232;\">my_kb.type(text)\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">time.sleep(</span><span style=\"color:#0086b3;\">1</span><span style=\"color:#323232;\">)\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">text </span><span style=\"font-weight:bold;color:#a71d5d;\">= </span><span style=\"color:#183691;\">&#39;𝐭𝐞𝐬𝐭&#39; </span><span style=\"font-style:italic;color:#969896;\"># bold test\n</span><span style=\"color:#323232;\">my_kb.type(text)\n</span></pre>\n<p>When I run that script right now, it produces the output “🍆𝕥𝕥𝕤𝕥𝐭𝐭𝐬𝐭”. And if I run it again, it’ll produce the same output. And if I change the eggplant emoji to something else, like the regular character ‘A’, it will still produce the same output (specifically “A𝕥𝕥𝕤𝕥𝐭𝐭𝐬𝐭”). But… If I log out and log back in, then the output changes to something else that’s still wrong, but differently. For example, when I changed the eggplant to a regular ‘A’, then relogged, the output became “A𝕥𝕖𝕖𝕥𝐭𝐞𝐞𝐭”. And then that wrong output will keep being the same wrong output until I log out and back in again. If the test strings don’t change, then the incorrect outputs don’t change on relog - but if they do, then they do.</p>\n<p>In the larger script, errors seemed to chain together somehow - like if I produced an eggplant emoji, then tried to write blackboard bold test, I would get “🍆𝕖𝕤🍆”. This is despite verifying just before running the pynput.keyboard.Controller.type function that what it was about to type was correct. The issue also happens if I type it character-by-character with press and release functions.</p>\n<p>I am very new to Linux. I’m on Linux Mint. I’m running this in a python3 venv that just has pynput and two other external libraries installed. ChatGPT thinks the issue might be related to X11. The issue does not occur at all on Windows, using the exact same code. On Linux there seems to be no issues with typing regular text, just special characters.</p>\n", "mediaType": "text/html", "source": { "content": "I have a rather large Python script that I use as basically a replacement for autohotkey. It uses pynput for keyboard and mouse control - and at least on Windows, it works exactly how I expect. \n\nI recently started dual-booting with Linux and have been trying to get the script to work here as well. It does work but with mixed results - in particular, I found that pynput has bizarrely wrong output for special characters, in a way that's both consistent and inconsistent. \n\nThe simplest possible case I found that reproduces the error is this script: \n\n```python\nimport time\nfrom pynput import keyboard\n\n# Sleep statement is just to give time to move the mouse cursor to a text input field\ntime.sleep(2)\n\nmy_kb = keyboard.Controller()\n\ntext = '🍆' # Eggplant emoji\nmy_kb.type(text)\n\ntime.sleep(1)\n\ntext = '𝕥𝕖𝕤𝕥' # blackboard bold test\nmy_kb.type(text)\n\ntime.sleep(1)\n\ntext = '𝐭𝐞𝐬𝐭' # bold test\nmy_kb.type(text)\n```\n\nWhen I run that script right now, it produces the output \"🍆𝕥𝕥𝕤𝕥𝐭𝐭𝐬𝐭\". And if I run it again, it'll produce the same output. And if I change the eggplant emoji to something else, like the regular character 'A', it will still produce the same output (specifically \"A𝕥𝕥𝕤𝕥𝐭𝐭𝐬𝐭\"). But... If I log out and log back in, then the output changes to something else that's still wrong, but differently. For example, when I changed the eggplant to a regular 'A', then relogged, the output became \"A𝕥𝕖𝕖𝕥𝐭𝐞𝐞𝐭\". And then that wrong output will keep being the same wrong output until I log out and back in again. If the test strings don't change, then the incorrect outputs don't change on relog - but if they do, then they do. \n\nIn the larger script, errors seemed to chain together somehow - like if I produced an eggplant emoji, then tried to write blackboard bold test, I would get \"🍆𝕖𝕤🍆\". This is despite verifying just before running the pynput.keyboard.Controller.type function that what it was about to type was correct. The issue also happens if I type it character-by-character with press and release functions. \n\nI am very new to Linux. I'm on Linux Mint. I'm running this in a python3 venv that just has pynput and two other external libraries installed. ChatGPT thinks the issue might be related to X11. The issue does not occur at all on Windows, using the exact same code. On Linux there seems to be no issues with typing regular text, just special characters. ", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-03-25T18:26:08.617221Z", "updated": "2025-03-25T18:47:44.655567Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.world/post/27385536", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/be11c287-fe32-497a-8515-77e33155f4b6" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/f78ffe44-8416-4299-a5e4-c5fce87c91bc", "actor": "https://programming.dev/u/learnbyexample", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/27335278", "attributedTo": "https://programming.dev/u/learnbyexample", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Improving Posting's startup time by over 40%", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://darren.codes/posts/python-startup-time/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-03-22T05:21:59.445365Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/27335278", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/aaed801e-3084-4710-ab3e-8c71d710355d" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/e978bf89-0cd8-43d2-b235-11e61f7fa729", "actor": "https://programming.dev/u/maxint", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/27321543", "attributedTo": "https://programming.dev/u/maxint", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Specializing Python with E-graphs", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://vectorfold.studio/blog/egglog", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/fd0962d3-bc5f-436b-8f5c-b975958b0ee5.jpeg" }, "sensitive": false, "published": "2025-03-21T21:27:56.554255Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/27321543", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/11ac9832-f437-47d9-9573-a33759f6fab3" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/620d8ddf-8599-46f9-9c2d-56fee099123c", "actor": "https://lemmy.world/u/AstroLightz", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.world/post/27030607", "attributedTo": "https://lemmy.world/u/AstroLightz", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "I made a menu-driven CLI frontend for yt-dlp. Feedback is welcomed.", "cc": [], "content": "<p>I made this Python menu-driven CLI script for yt-dlp. It guides you through a series of menus to download content from a YouTube URL.</p>\n<p>If anyone is interested, feedback would be greatly appreciated as only I have tested this so far, and I want to make sure it works for other people’s systems.</p>\n<p>If you encounter any issues or bugs, let me know so I can fix them!</p>\n<p><strong>Edit</strong>: I should mention: This is not a pipx package. That was never the intention developing this initially. I might make it a package in the future, but for now, it is just a project directory.</p>\n", "mediaType": "text/html", "source": { "content": "I made this Python menu-driven CLI script for yt-dlp. It guides you through a series of menus to download content from a YouTube URL.\n\nIf anyone is interested, feedback would be greatly appreciated as only I have tested this so far, and I want to make sure it works for other people's systems.\n\nIf you encounter any issues or bugs, let me know so I can fix them!\n\n**Edit**: I should mention: This is not a pipx package. That was never the intention developing this initially. I might make it a package in the future, but for now, it is just a project directory.", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://github.com/AstroLightz/yt-dlp-adv2", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/b9711191-f90e-45de-a7a4-a6a51a26a396.png" }, "sensitive": false, "published": "2025-03-19T00:30:52.396726Z", "updated": "2025-03-19T17:00:03.484496Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.world/post/27030607", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/5493ec2d-3230-4fbf-a308-23ce529f69b7" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/42ec4573-8ecc-402f-bfaa-1746f5a725f5", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/26655447", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "GitHub - valentinogagliardi/unbrowsed: A browserless HTML testing library for Python.", "cc": [], "content": "<p>via <a href=\"https://fosstodon.org/@gagliardi_vale/114133430622978939\">fosstodon.org/@gagliardi_vale/114133430622978939</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://fosstodon.org/@gagliardi_vale/114133430622978939", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://github.com/valentinogagliardi/unbrowsed", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/5f5cae3f-75f3-49e9-9354-6456261fb028.png" }, "sensitive": false, "published": "2025-03-10T01:25:54.013545Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/26655447", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/1becea0a-f3bd-491f-bfe4-26723b34c038" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/411d507e-c519-4ef0-94ba-2c94ac30df0d", "actor": "https://lemm.ee/u/milon", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemm.ee/post/57744910", "attributedTo": "https://lemm.ee/u/milon", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Why can't I use the '|' bitwise operator in this statement?", "cc": [], "content": "<p><code>if coin == 25 | 10 | 5:</code></p>\n<p>If I replace the ‘|’ with ‘or’ the code runs just fine. I’m not sure why I can’t use ‘|’ in the same statement.</p>\n<p>Doing the following doesn’t work either:</p>\n<p><code>if coin == 25 | coin == 10 | coin == 5:</code></p>\n<p>I know bitwise operators can only be used with integers, but other then that is there another difference from logical operators?</p>\n", "mediaType": "text/html", "source": { "content": "`if coin == 25 | 10 | 5:`\n\nIf I replace the '|' with 'or' the code runs just fine. I'm not sure why I can't use '|' in the same statement.\n\nDoing the following doesn't work either:\n\n`if coin == 25 | coin == 10 | coin == 5:`\n\nI know bitwise operators can only be used with integers, but other then that is there another difference from logical operators?", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-03-09T07:41:52.735537Z", "updated": "2025-03-09T07:53:44.922215Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemm.ee/post/57744910", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/2fa99971-9424-4067-8a7e-65ea69158c26" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/fc0ad29a-e455-4602-a626-233486573f38", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/26461380", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "The Xonsh Shell — Python-powered shell.", "cc": [], "content": "<p>via <a href=\"https://mastodon.social/@pythonhub/114116613249814216\">mastodon.social/@pythonhub/114116613249814216</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://mastodon.social/@pythonhub/114116613249814216", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://xon.sh/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/ab60820a-08b0-488e-ae36-8cf458196cd1.png" }, "sensitive": false, "published": "2025-03-06T17:38:25.791075Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/26461380", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/6addade1-4782-4871-93ce-6b46bafc09f2" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/8608bee5-c469-4050-97a8-6dea048637fa", "actor": "https://programming.dev/u/sus", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/26056160", "attributedTo": "https://programming.dev/u/sus", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Find the bug (a classic)", "cc": [], "content": "<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">class Node:\n</span><span style=\"color:#323232;\"> def __init__(self, edges = set()):\n</span><span style=\"color:#323232;\"> self.edges = edges\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">def main():\n</span><span style=\"color:#323232;\"> foo = Node()\n</span><span style=\"color:#323232;\"> bar = Node()\n</span><span style=\"color:#323232;\"> quz = Node()\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\"> foo.edges.add(bar)\n</span><span style=\"color:#323232;\"> bar.edges.add(foo)\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\"> assert(foo is not bar) # assertion succeeds\n</span><span style=\"color:#323232;\"> assert(foo is not quz) # assertion succeeds\n</span><span style=\"color:#323232;\"> assert(bar is not quz) # assertion succeeds\n</span><span style=\"color:#323232;\"> assert(len(quz.edges) == 0) # assertion fails??\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">main()\n</span></pre>\n<details><summary>spoiler</summary><p>Mutable default values are shared across objects. The set in this case.\n</p></details>\n", "mediaType": "text/html", "source": { "content": "```\nclass Node:\n def __init__(self, edges = set()):\n self.edges = edges\n\n\ndef main():\n foo = Node()\n bar = Node()\n quz = Node()\n\n foo.edges.add(bar)\n bar.edges.add(foo)\n\n assert(foo is not bar) # assertion succeeds\n assert(foo is not quz) # assertion succeeds\n assert(bar is not quz) # assertion succeeds\n assert(len(quz.edges) == 0) # assertion fails??\n\n\nmain()\n```\n\n::: spoiler spoiler\nMutable default values are shared across objects. The set in this case.\n:::\n", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-02-26T17:34:23.362272Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/26056160", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/8df7c4bb-6dce-463d-a8d9-9270575719fb" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/78850e24-86d3-45c8-a848-dfcb66d039d2", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25967554", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "My 2025 uv-based Python Project Layout for Production Apps", "cc": [], "content": "<p>via <a href=\"https://mastodon.social/@hynek/114060181852212680\">mastodon.social/@hynek/114060181852212680</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://mastodon.social/@hynek/114060181852212680", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://www.youtube.com/watch?v=mFyE9xgeKcA", "mediaType": "text/html", "type": "Link" } ], "sensitive": false, "published": "2025-02-24T21:55:11.968999Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25967554", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/59892f06-249c-4f9e-bb36-b1a3767d3d4b" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/64faa7a4-9898-4cb3-876e-7bb9114423f8", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25920602", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Profiling slow imports in Python", "cc": [], "content": "<p>via <a href=\"https://fosstodon.org/@JackEvans/114055030506049316\">fosstodon.org/@JackEvans/114055030506049316</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://fosstodon.org/@JackEvans/114055030506049316", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://jackevans.bearblog.dev/profiling-slow-imports-in-python/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/4a4866ff-3e83-4a32-b8d8-9abdac783bf8.png" }, "sensitive": false, "published": "2025-02-23T22:20:20.148916Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25920602", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/3a9d8c01-1e8e-4caa-b838-6aedc1368323" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/c7bd48d5-503b-4c52-9675-ba7973974ed3", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25914256", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Update on Flet: Python + Flutter UIs | TalkPython Episode #494", "cc": [], "content": "<p>My personal experience writing a multi-platform desktop app (macOS, Windows, Linux) was rather painful. Tkinter was my first try, but deployment on macOS was a nightmare. I ended using PySide, which ticked all the boxes, but my biggest gripe is that you end with a lot of code that is not very “pythonic”. <a href=\"https://flet.dev/\" rel=\"nofollow\">Flet</a> looks like a nice alternative.</p>\n", "mediaType": "text/html", "source": { "content": "My personal experience writing a multi-platform desktop app (macOS, Windows, Linux) was rather painful. Tkinter was my first try, but deployment on macOS was a nightmare. I ended using PySide, which ticked all the boxes, but my biggest gripe is that you end with a lot of code that is not very \"pythonic\". [Flet](https://flet.dev/) looks like a nice alternative.", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://talkpython.fm/episodes/show/494/update-on-flet-python-flutter-uis", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/166e0f4a-c70b-4066-b621-dc02e67aee5a.jpeg" }, "sensitive": false, "published": "2025-02-23T19:25:43.050674Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25914256", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/4928d47e-3328-4308-b1e1-98078db18f5f" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/261c56d6-23ff-4247-960f-7d193cc0abe3", "actor": "https://programming.dev/u/logging_strict", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25536275", "attributedTo": "https://programming.dev/u/logging_strict", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Dependency management", "cc": [], "content": "<h3>Market research</h3>\n<p>This post is only about dependency management, not package management, not build backends.</p>\n<p>You know about these:</p>\n<ul>\n<li>\n<p>uv</p>\n</li>\n<li>\n<p>poetry</p>\n</li>\n<li>\n<p>pipenv</p>\n</li>\n</ul>\n<p>You are probably not familiar with:</p>\n<ul>\n<li>\n<p>pip-compile-multi</p>\n<p>(toposort, pip-tools)</p>\n</li>\n</ul>\n<p>You are defintely unfamiliar with:</p>\n<ul>\n<li>\n<p>wreck</p>\n<p>(pip-tools, pip-requirements-parser)</p>\n</li>\n</ul>\n<p><strong>pip-compile-multi</strong> creates lock files. Has no concept of unlock files.</p>\n<p><strong>wreck</strong> produces both lock and unlock files. venv aware.</p>\n<p>Both sync dependencies across requirement files</p>\n<p>Both act only upon requirements files, not venv(s)</p>\n<h3>Up to speed with wreck</h3>\n<p>You are familiar with <code>.in</code> and <code>.txt</code> requirements files.</p>\n<p><code>.txt</code> is split out into <code>.lock</code> and <code>.unlock</code>. The later is for packages which are not apps.</p>\n<p>Create <code>.in</code> files that are interlinked with <code>-r</code> and <code>-c</code>. No editable builds. No urls.</p>\n<p>(If this is a deal breaker feel free to submit a PR)</p>\n<h4>pins files</h4>\n<p><code>pins-*.in</code> are for common constraints. The <strong>huge advantage</strong> here is to document why?</p>\n<p>Without the documentation even the devs has no idea whether or not the constraint is still required.</p>\n<p><code>pins-*.in</code> file are split up to tackle one issue. The beauty is the issue must be documented with enough details to bring yourself up to speed.</p>\n<p>Explain the origin of the issue in terms a 6 year old can understand.</p>\n<h3>Configuration</h3>\n<p><code>python -m pip install wreck</code></p>\n<p>This is logging-strict <code>pyproject.toml</code></p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">[tool.wreck]\n</span><span style=\"color:#323232;\">create_pins_unlock = false\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">[[tool.wreck.venvs]]\n</span><span style=\"color:#323232;\">venv_base_path = &#39;.venv&#39;\n</span><span style=\"color:#323232;\">reqs = [\n</span><span style=\"color:#323232;\"> &#39;requirements/dev&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/kit&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/pip&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/pip-tools&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/prod&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/manage&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/mypy&#39;,\n</span><span style=\"color:#323232;\"> &#39;requirements/tox&#39;,\n</span><span style=\"color:#323232;\">]\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">[[tool.wreck.venvs]]\n</span><span style=\"color:#323232;\">venv_base_path = &#39;.doc/.venv&#39;\n</span><span style=\"color:#323232;\">reqs = [\n</span><span style=\"color:#323232;\"> &#39;docs/requirements&#39;,\n</span><span style=\"color:#323232;\">]\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">dynamic = [\n</span><span style=\"color:#323232;\"> &quot;optional-dependencies&quot;,\n</span><span style=\"color:#323232;\"> &quot;dependencies&quot;,\n</span><span style=\"color:#323232;\"> &quot;version&quot;,\n</span><span style=\"color:#323232;\">]\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">[tool.setuptools.dynamic]\n</span><span style=\"color:#323232;\">dependencies = { file = [&quot;requirements/prod.unlock&quot;] }\n</span><span style=\"color:#323232;\">optional-dependencies.pip = { file = [&quot;requirements/pip.lock&quot;] }\n</span><span style=\"color:#323232;\">optional-dependencies.pip_tools = { file = [&quot;requirements/pip-tools.lock&quot;] }\n</span><span style=\"color:#323232;\">optional-dependencies.dev = { file = [&quot;requirements/dev.lock&quot;] }\n</span><span style=\"color:#323232;\">optional-dependencies.manage = { file = [&quot;requirements/manage.lock&quot;] }\n</span><span style=\"color:#323232;\">optional-dependencies.docs = { file = [&quot;docs/requirements.lock&quot;] }\n</span><span style=\"color:#323232;\">version = {attr = &quot;logging_strict._version.__version__&quot;}\n</span><span style=\"color:#323232;\">\n</span></pre>\n<p>Look how short and simple that is.</p>\n<p>The only thing you have to unlearn is being so timid.</p>\n<p>More venvs. More constraints and requirements complexity.</p>\n<h4>Do it</h4>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">mkdir -p .venv || :;\n</span><span style=\"color:#323232;\">pyenv version &gt; .venv/python-version\n</span><span style=\"color:#323232;\">python -m venv .venv\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">mkdir -p .doc || :;\n</span><span style=\"color:#323232;\">echo &quot;3.10.14&quot; &gt; .doc/python-version\n</span><span style=\"color:#323232;\">cd .doc &amp;&amp; python -m venv .venv; cd - &amp;&gt;/dev/null\n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">. .venv/bin/activate\n</span><span style=\"color:#323232;\"># python -m pip install wreck\n</span><span style=\"color:#323232;\">reqs fix --venv-relpath=&#39;.venv&#39;\n</span></pre>\n<p>There will be no <strong>avoidable</strong> resolution conflicts.</p>\n<p>Preferable to do this within <a href=\"https://raw.githubusercontent.com/msftcangoblowm/logging-strict/refs/heads/master/tox-req.ini\" rel=\"nofollow\">tox-reqs.ini</a></p>\n<h4>Details</h4>\n<p>TOML file format expects paths to be single quoted. The paths are relative without the <strong>last</strong> file suffix.</p>\n<p>If pyproject.toml not in the cwd, <code>–path=‘path to pyproject.toml’</code></p>\n<p><code>create_pins_unlock = false</code> tells <strong>wreck</strong> to not produce .unlock files for <code>pins-*.in</code> files.</p>\n<h4>DANGER</h4>\n<p>This is not for a faint of heart. If you can avoid it. This is for the folks who often say, <code>Oh really, hold my beer!</code></p>\n<p>For pins that span venv, add the file suffix <code>.shared</code></p>\n<p>e.g. <code>pins-typing.shared.in</code></p>\n<p><strong>wreck</strong> deals with one venv at a time. Files that span venv have to be dealt with manually and carefully.</p>\n<h3>Issues</h3>\n<ol>\n<li>\n<p>no support for editable builds</p>\n</li>\n<li>\n<p>no url support</p>\n</li>\n<li>\n<p>no hashs</p>\n</li>\n<li>\n<p>your eyes will tire and brains will splatter on the wall, from all the eye rolling after sifting thru endless posts on uv and poetry and none about pip-compile-multi or wreck</p>\n</li>\n<li>\n<p>Some folks love having all dependency managed within pyproject.toml These folks are deranged and its impossible to convince them otherwise. pyproject.toml is a config file, not a database. It should be read only.</p>\n</li>\n<li>\n<p>a docs link on pypi.org is 404. Luckily there are two docs links. Should really just fix that, but it’s left like that to see if anyone notices. No one did.</p>\n</li>\n</ol>\n", "mediaType": "text/html", "source": { "content": "### Market research\n\nThis post is only about dependency management, not package management, not build backends.\n\nYou know about these:\n\n- uv\n\n- poetry\n\n- pipenv\n\nYou are probably not familiar with:\n\n- pip-compile-multi\n\n (toposort, pip-tools)\n\nYou are defintely unfamiliar with:\n\n- wreck\n\n (pip-tools, pip-requirements-parser)\n\n**pip-compile-multi** creates lock files. Has no concept of unlock files.\n\n**wreck** produces both lock and unlock files. venv aware. \n\nBoth sync dependencies across requirement files\n\nBoth act only upon requirements files, not venv(s)\n\n### Up to speed with wreck\n\nYou are familiar with `.in` and `.txt` requirements files.\n\n`.txt` is split out into `.lock` and `.unlock`. The later is for packages which are not apps.\n\nCreate `.in` files that are interlinked with `-r` and `-c`. No editable builds. No urls.\n\n(If this is a deal breaker feel free to submit a PR)\n\n#### pins files\n\n`pins-*.in` are for common constraints. The **huge advantage** here is to document why?\n\nWithout the documentation even the devs has no idea whether or not the constraint is still required.\n\n`pins-*.in` file are split up to tackle one issue. The beauty is the issue must be documented with enough details to bring yourself up to speed.\n\nExplain the origin of the issue in terms a 6 year old can understand.\n\n### Configuration\n\n`python -m pip install wreck`\n\nThis is logging-strict `pyproject.toml`\n\n```\n\n[tool.wreck]\ncreate_pins_unlock = false\n\n[[tool.wreck.venvs]]\nvenv_base_path = '.venv'\nreqs = [\n 'requirements/dev',\n 'requirements/kit',\n 'requirements/pip',\n 'requirements/pip-tools',\n 'requirements/prod',\n 'requirements/manage',\n 'requirements/mypy',\n 'requirements/tox',\n]\n\n[[tool.wreck.venvs]]\nvenv_base_path = '.doc/.venv'\nreqs = [\n 'docs/requirements',\n]\n\ndynamic = [\n \"optional-dependencies\",\n \"dependencies\",\n \"version\",\n]\n\n[tool.setuptools.dynamic]\ndependencies = { file = [\"requirements/prod.unlock\"] }\noptional-dependencies.pip = { file = [\"requirements/pip.lock\"] }\noptional-dependencies.pip_tools = { file = [\"requirements/pip-tools.lock\"] }\noptional-dependencies.dev = { file = [\"requirements/dev.lock\"] }\noptional-dependencies.manage = { file = [\"requirements/manage.lock\"] }\noptional-dependencies.docs = { file = [\"docs/requirements.lock\"] }\nversion = {attr = \"logging_strict._version.__version__\"}\n\n```\n\nLook how short and simple that is.\n\nThe only thing you have to unlearn is being so timid.\n\nMore venvs. More constraints and requirements complexity.\n\n#### Do it\n\n```\nmkdir -p .venv || :;\npyenv version > .venv/python-version\npython -m venv .venv\n\nmkdir -p .doc || :;\necho \"3.10.14\" > .doc/python-version\ncd .doc && python -m venv .venv; cd - &>/dev/null\n\n. .venv/bin/activate\n# python -m pip install wreck\nreqs fix --venv-relpath='.venv'\n```\nThere will be no **avoidable** resolution conflicts.\n\nPreferable to do this within [tox-reqs.ini](https://raw.githubusercontent.com/msftcangoblowm/logging-strict/refs/heads/master/tox-req.ini)\n\n#### Details\n\nTOML file format expects paths to be single quoted. The paths are relative without the **last** file suffix.\n\nIf pyproject.toml not in the cwd, `--path='path to pyproject.toml'`\n\n`create_pins_unlock = false` tells **wreck** to not produce .unlock files for `pins-*.in` files.\n\n#### DANGER\n\nThis is not for a faint of heart. If you can avoid it. This is for the folks who often say, `Oh really, hold my beer!`\n\nFor pins that span venv, add the file suffix `.shared`\n\ne.g. `pins-typing.shared.in`\n\n**wreck** deals with one venv at a time. Files that span venv have to be dealt with manually and carefully.\n\n### Issues\n\n1. no support for editable builds\n\n2. no url support\n\n3. no hashs\n\n4. your eyes will tire and brains will splatter on the wall, from all the eye rolling after sifting thru endless posts on uv and poetry and none about pip-compile-multi or wreck\n\n5. Some folks love having all dependency managed within pyproject.toml These folks are deranged and its impossible to convince them otherwise. pyproject.toml is a config file, not a database. It should be read only.\n\n6. a docs link on pypi.org is 404. Luckily there are two docs links. Should really just fix that, but it's left like that to see if anyone notices. No one did.", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://pypi.org/project/wreck", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://raw.githubusercontent.com/msftcangoblowm/wreck/refs/heads/master/docs/_static/wreck-logo-1.svg" }, "sensitive": false, "published": "2025-02-16T06:57:34.047449Z", "updated": "2025-02-16T09:42:36.022435Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25536275", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/d0afa169-501f-432e-91fc-c7d9b938ec39" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/5b9ecd58-b78c-4fa6-9c24-acdeead90e5c", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25501168", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "A year of uv: pros, cons, and should you migrate", "cc": [], "content": "<p>via <a href=\"https://framapiaf.org/@bitecode/114008017945593439\">framapiaf.org/@bitecode/114008017945593439</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://framapiaf.org/@bitecode/114008017945593439", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://www.bitecode.dev/p/a-year-of-uv-pros-cons-and-should", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/d029621f-4294-4c2b-8ca4-100584661406.jpeg" }, "sensitive": false, "published": "2025-02-15T15:17:10.424544Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25501168", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/8bc746b2-c734-409b-a071-fde58c342d6f" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/d37b730f-2c13-448e-a59e-96ebde48cc40", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25392046", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Email with Python, Simplified", "cc": [], "content": "<p>via <a href=\"https://mas.to/@davidism/113992575202656501\">mas.to/@davidism/113992575202656501</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://mas.to/@davidism/113992575202656501", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://davidism.com/email-simplified/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/bc202059-d6c3-4dc3-9487-8c4fd0569112.png" }, "sensitive": false, "published": "2025-02-13T13:32:28.528775Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25392046", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/e313dc53-5433-444f-87ca-141ff2f1be60" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/56fea35a-4035-4b4c-aa17-b2686f4aef9f", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25343041", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Avoid over-commenting in Python", "cc": [], "content": "<p>via <a href=\"https://mastodon.social/@treyhunner/113991275725668511\">mastodon.social/@treyhunner/113991275725668511</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://mastodon.social/@treyhunner/113991275725668511", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://www.pythonmorsels.com/avoid-comments/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/32a9ff19-75fd-4821-9e69-b638ab645eac.png" }, "sensitive": false, "published": "2025-02-12T14:13:34.555410Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25343041", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/d5903d6b-03a4-492e-b429-69b24e47f33a" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/1008f1e5-dce4-4744-b25d-f86e8a884405", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25317467", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python 3.14.0 alpha 5", "cc": [], "content": "", "mediaType": "text/html", "source": { "content": "", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://discuss.python.org/t/python-3-14-0-alpha-5/80364", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/52b76f99-8654-4907-b495-53699dacb25f.png" }, "sensitive": false, "published": "2025-02-11T22:16:42.378424Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25317467", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/4f28be39-8bf5-4be8-922b-0cba57225892" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/212c1561-bc35-42e1-ba0d-9e32a29b0a66", "actor": "https://lemmy.world/u/milliams", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemmy.world/post/25447510", "attributedTo": "https://lemmy.world/u/milliams", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "PEP 517 build system popularity", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://labs.quansight.org/blog/pep-517-build-system-popularity", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/9e6df597-958c-48a0-9921-ec81529d03a4.jpeg" }, "sensitive": false, "published": "2025-02-11T19:54:38.185609Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemmy.world/post/25447510", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/479a8161-95dd-44e4-9bbe-17c8c6693fa0" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/30cd6006-3ed4-4423-b31f-518397dffcc8", "actor": "https://lemm.ee/u/neme", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemm.ee/post/55136772", "attributedTo": "https://lemm.ee/u/neme", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python 3.14 Lands A New Interpreter With 3~30% Faster Python Code", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://www.phoronix.com/news/Python-3.14-New-Interpreter", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/16c90ce4-1593-4b35-96fd-520285ba6381.webp" }, "sensitive": false, "published": "2025-02-10T14:13:59.628441Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemm.ee/post/55136772", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/c20a3344-7b83-4415-9150-5e3fe749226e" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/7d2119a8-be1d-4e46-a435-cb7c94aceadb", "actor": "https://programming.dev/u/0101100101", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25214917", "attributedTo": "https://programming.dev/u/0101100101", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Critique This! A Simple Qt Dock Widget which enables the whole widget to be 'folded' to use less screen space", "cc": [], "content": "<p>I’m working on a project that needs lots of toolbars on screen at once, even though not all of them will be used at the same time. So, I’m modelling this ‘foldable’ dock widget after what I remember Photoshop panels used to be like.</p>\n<p>It’s a work in progress, but would like to hear constructive suggestions.</p>\n<p><a href=\"https://blocks.programming.dev/0101100101/42c5d67f86c049baa3500aa38e439f8a\">…programming.dev/…/42c5d67f86c049baa3500aa38e439f…</a></p>\n", "mediaType": "text/html", "source": { "content": "I'm working on a project that needs lots of toolbars on screen at once, even though not all of them will be used at the same time. So, I'm modelling this 'foldable' dock widget after what I remember Photoshop panels used to be like.\n\nIt's a work in progress, but would like to hear constructive suggestions. \n\nhttps://blocks.programming.dev/0101100101/42c5d67f86c049baa3500aa38e439f8a", "mediaType": "text/markdown" }, "attachment": [ { "type": "Image", "url": "https://programming.dev/pictrs/image/e6d95888-311b-4d72-b06d-91f0c556c7c6.png", "name": null } ], "sensitive": false, "published": "2025-02-09T19:20:57.965211Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25214917", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/ede3b6e5-2b50-4b12-b719-13e62bac166e" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/910d0942-b118-4f6a-991f-8cb59181610d", "actor": "https://programming.dev/u/0101100101", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25179166", "attributedTo": "https://programming.dev/u/0101100101", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Is it ok to post code (~250 LOC) for critique here?", "cc": [], "content": "<p>Working on a class that I’d like to use in a library (not for work) and think I’d appreciate external opinions!</p>\n<p>If not, where else could I post code for critique? Thanks</p>\n", "mediaType": "text/html", "source": { "content": "Working on a class that I'd like to use in a library (not for work) and think I'd appreciate external opinions!\n\nIf not, where else could I post code for critique? Thanks", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-02-09T00:10:06.809538Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25179166", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/93818a7c-b162-46dd-b8eb-6ab7670da5fc" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/c3665834-f80e-42b8-976e-dffc07e5a4fd", "actor": "https://programming.dev/u/logging_strict", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25142775", "attributedTo": "https://programming.dev/u/logging_strict", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Feedback on gh profile design", "cc": [], "content": "<p>Finally got around to creating a gh profile page</p>\n<p>The design is to give activity insights on:</p>\n<ul>\n<li>\n<p>what Issues/PRs working on</p>\n</li>\n<li>\n<p>future issues/PRs</p>\n</li>\n<li>\n<p>for fun, show off package mascots</p>\n</li>\n</ul>\n<p>All out of ideas. Any suggestions? How did you improve your github profile?</p>\n", "mediaType": "text/html", "source": { "content": "Finally got around to creating a gh profile page\n\nThe design is to give activity insights on:\n\n- what Issues/PRs working on\n\n- future issues/PRs\n\n- for fun, show off package mascots\n\nAll out of ideas. Any suggestions? How did you improve your github profile?", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://github.com/msftcangoblowm/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/12e94544-9376-4809-9787-0f71d896e147.png" }, "sensitive": false, "published": "2025-02-08T10:20:22.283342Z", "updated": "2025-02-08T10:21:12.193114Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25142775", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/57cd4da2-1915-47bc-9615-13e5a9987a3e" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/b0801bb3-b88d-4746-91db-5e2bce817f8a", "actor": "https://piefed.social/u/rimu", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://piefed.social/post/463352", "attributedTo": "https://piefed.social/u/rimu", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Dynamic Forms with Flask", "cc": [], "content": "<p>A common need in web applications is to create a form that allows the user to enter a list of items, with the number of items not known in advance. This is a pattern often used when entering user information, specifically for phone numbers or addresses, but has a lot of other uses as well.</p>\n<p>Implementing this with Flask is surprisingly tricky, as it requires a combination of back and front end techniques working together.</p>\n", "mediaType": "text/html", "source": { "content": "A common need in web applications is to create a form that allows the user to enter a list of items, with the number of items not known in advance. This is a pattern often used when entering user information, specifically for phone numbers or addresses, but has a lot of other uses as well. \r\n\r\nImplementing this with Flask is surprisingly tricky, as it requires a combination of back and front end techniques working together.", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://blog.miguelgrinberg.com/post/dynamic-forms-with-flask", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/36fbb20f-b437-4279-b65e-13877966dd51.jpeg" }, "sensitive": false, "published": "2025-02-08T00:10:13.354860Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://piefed.social/post/463352", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/4fa85f41-7352-428e-ab7b-e6c3b43717fe" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/00599e59-4f0f-4d17-87ed-9c0a885f0397", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/25108781", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Pytest, A Practical Guide", "cc": [], "content": "<p>via <a href=\"https://fosstodon.org/@programmylife/113962842059961474\">fosstodon.org/@programmylife/113962842059961474</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://fosstodon.org/@programmylife/113962842059961474", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://programmingmylife.com/2025-02-07-pytest-a-practical-guide.html", "mediaType": "text/html", "type": "Link" } ], "sensitive": false, "published": "2025-02-07T16:36:11.015177Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/25108781", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/ce48715c-7187-41b3-94f4-c124f9dda145" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/b880d873-7adb-41ea-8044-821e2065b187", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24984791", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python 3.13.2 and 3.12.9 now available!", "cc": [], "content": "", "mediaType": "text/html", "source": { "content": "", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://discuss.python.org/t/python-3-13-2-and-3-12-9-now-available/79509", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/0219f606-8a47-405d-a054-84979ede59a8.png" }, "sensitive": false, "published": "2025-02-05T02:12:46.901952Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24984791", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/163131b5-83a3-455d-b247-454477814f4e" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/50bcfd6a-b018-42d2-898c-ec99738cb4dd", "actor": "https://piefed.social/u/harrisonerd", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://piefed.social/post/456278", "attributedTo": "https://piefed.social/u/harrisonerd", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "MicroPie - \"ultra-micro\" ASGI web framework", "cc": [], "content": "<h3>MicroPie is a small and very fast Python web framework. It is designed with flexability and simplicity in mind. Check out the <a href=\"https://patx.github.io/micropie\" rel=\"nofollow\">website</a> or the <a href=\"https://github.com/patx/micropie\" rel=\"nofollow\">GitHub project</a>.</h3>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">from MicroPie import App \n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">class MyApp(App): \n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\"> async def index(self): \n</span><span style=\"color:#323232;\"> return &#39;Hello ASGI World!&#39; \n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">app = MyApp() # Run with `uvicorn app:app` \n</span></pre>\n", "mediaType": "text/html", "source": { "content": "### MicroPie is a small and very fast Python web framework. It is designed with flexability and simplicity in mind. Check out the [website](https://patx.github.io/micropie) or the [GitHub project](https://github.com/patx/micropie). \r\n```python \r\n\r\nfrom MicroPie import App \r\n\r\nclass MyApp(App): \r\n\r\n async def index(self): \r\n return 'Hello ASGI World!' \r\n\r\napp = MyApp() # Run with `uvicorn app:app` \r\n```", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-02-04T22:40:41.447763Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://piefed.social/post/456278", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/12bbfe78-9219-4a01-a44d-2ab70e9c0862" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/46bb0974-3567-4b7e-a0f2-ebb653208241", "actor": "https://piefed.social/u/rimu", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://piefed.social/post/454061", "attributedTo": "https://piefed.social/u/rimu", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "KenobiDB - document-based data store built over SQLite", "cc": [], "content": "<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">&gt;&gt;&gt; from kenobi import KenobiDB \n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">&gt;&gt;&gt; db = KenobiDB(&#39;example.db&#39;) \n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">&gt;&gt;&gt; db.insert({&#39;name&#39;: &#39;Yoda&#39;, &#39;lightsaber&#39;: &#39;green&#39;}) \n</span><span style=\"color:#323232;\">True \n</span><span style=\"color:#323232;\">\n</span><span style=\"color:#323232;\">&gt;&gt;&gt; db.search(&#39;lightsaber&#39;, &#39;green&#39;) \n</span><span style=\"color:#323232;\">[{&#39;name&#39;: &#39;Yoda&#39;, &#39;lightsaber&#39;: &#39;green&#39;}] \n</span></pre>\n", "mediaType": "text/html", "source": { "content": "``` \r\n>>> from kenobi import KenobiDB \r\n\r\n>>> db = KenobiDB('example.db') \r\n\r\n>>> db.insert({'name': 'Yoda', 'lightsaber': 'green'}) \r\nTrue \r\n\r\n>>> db.search('lightsaber', 'green') \r\n[{'name': 'Yoda', 'lightsaber': 'green'}] \r\n```", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://patx.github.io/kenobi/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-02-03T21:33:25.230579Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://piefed.social/post/454061", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/f25589b3-bc13-4842-a1e1-837d05ab2933" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/f755c063-138f-4539-91a9-5f124640f650", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24923322", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "The surprising way to save memory with BytesIO", "cc": [], "content": "<p>via <a href=\"https://s.ovalerio.net/@dethos/113936362543993642\">s.ovalerio.net/@dethos/113936362543993642</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://s.ovalerio.net/@dethos/113936362543993642", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://pythonspeed.com/articles/bytesio-reduce-memory-usage/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/5c2a536b-170e-44cc-996c-40bce63a180a.png" }, "sensitive": false, "published": "2025-02-03T20:06:17.383564Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24923322", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/66223049-e07f-4bb2-b461-16520604f5cb" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/882e6e18-bf9b-4822-974e-9ce174f4bb35", "actor": "https://lemm.ee/u/neme", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://lemm.ee/post/54364247", "attributedTo": "https://lemm.ee/u/neme", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "PyPI adds project archiving system to stop malicious updates", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://www.bleepingcomputer.com/news/security/pypi-adds-project-archiving-system-to-stop-malicious-updates/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-02-02T18:56:04.170340Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://lemm.ee/post/54364247", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/c24e4dab-bc03-4d86-9797-31de3150d2d6" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/cdee3225-ed61-44fe-95fe-fe0e605d1b65", "actor": "https://discuss.online/u/m_f", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://discuss.online/post/15745605", "attributedTo": "https://discuss.online/u/m_f", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Astral is building a new static type checker for Python, from scratch, in Rust", "cc": [], "content": "<p><a href=\"https://xcancel.com/charliermarsh/status/1884651482009477368\">xcancel.com/charliermarsh/…/1884651482009477368</a></p>\n<blockquote>\n<p>We’re building a new static type checker for Python, from scratch, in Rust.</p>\n<p>From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!</p>\n</blockquote>\n<blockquote>\n<p>Like Ruff and uv, there will be a significant focus on performance.</p>\n<p>The entire system is designed to be highly incremental so that it can eventually power a language server (e.g., only re-analyze affected files on code change).</p>\n</blockquote>\n<blockquote>\n<p>Performance is just one of many goals, though.</p>\n<p>For example: we’re investing heavily in strong theoretical foundations and a consistent model of Python’s typing semantics.</p>\n<p>(We’re lucky to have @carljm and @AlexWaygood on the team for many reasons, this is one of them.)</p>\n</blockquote>\n<blockquote>\n<p>Another goal: minimizing false positives, especially on untyped code, to make it easier for projects to adopt a type checker and expand coverage gradually over time, without being swamped in bogus type errors from the start.</p>\n</blockquote>\n<blockquote>\n<p>We haven’t publicized it to-date, but all of this work has been happening in the open, in the Ruff repository.</p>\n<p>All driven by a uniquely great team: @carljm, @AlexWaygood, @sharkdp86, @MichaReiser, @DhruvManilawala, @ibraheemdev, @dcreager.</p>\n<p>I’m learning so much from them.</p>\n</blockquote>\n<blockquote>\n<p>Warning: this project is <em>not</em> ready for real-world user testing, and certainly not for production use (yet). The core architecture is there, but we’re still lacking support for some critical features.</p>\n<p>Right now, I’d only recommend trying it out if you’re looking to contribute.</p>\n</blockquote>\n<blockquote>\n<p>For now, we’re working towards an initial alpha release. When it’s ready, I’ll make sure you know :)</p>\n</blockquote>\n", "mediaType": "text/html", "source": { "content": "https://xcancel.com/charliermarsh/status/1884651482009477368\n\n> We’re building a new static type checker for Python, from scratch, in Rust.\n>\n> From a technical perspective, it’s probably our most ambitious project yet. We’re about 800 PRs deep!\n\n> Like Ruff and uv, there will be a significant focus on performance.\n>\n> The entire system is designed to be highly incremental so that it can eventually power a language server (e.g., only re-analyze affected files on code change).\n\n> Performance is just one of many goals, though.\n>\n> For example: we're investing heavily in strong theoretical foundations and a consistent model of Python's typing semantics.\n>\n> (We're lucky to have @carljm and @AlexWaygood on the team for many reasons, this is one of them.)\n\n> Another goal: minimizing false positives, especially on untyped code, to make it easier for projects to adopt a type checker and expand coverage gradually over time, without being swamped in bogus type errors from the start.\n\n> We haven't publicized it to-date, but all of this work has been happening in the open, in the Ruff repository.\n>\n> All driven by a uniquely great team: @carljm, @AlexWaygood, @sharkdp86, @MichaReiser, @DhruvManilawala, @ibraheemdev, @dcreager.\n>\n> I'm learning so much from them.\n\n> Warning: this project is _not_ ready for real-world user testing, and certainly not for production use (yet). The core architecture is there, but we're still lacking support for some critical features.\n>\n> Right now, I'd only recommend trying it out if you're looking to contribute.\n\n> For now, we're working towards an initial alpha release. When it's ready, I'll make sure you know :)", "mediaType": "text/markdown" }, "attachment": [ { "type": "Image", "url": "https://discuss.online/pictrs/image/14717526-afc0-41d6-bff6-3ad8e5f1c605.jpeg", "name": null } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/5429eff9-151d-495c-b133-3a266d30c11e.jpeg" }, "sensitive": false, "published": "2025-01-29T20:44:03.841601Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://discuss.online/post/15745605", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/e2394879-242e-41be-a655-30790936add6" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/fe5e2611-e2a1-4b63-8845-e79e76c08081", "actor": "https://programming.dev/u/logging_strict", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24582623", "attributedTo": "https://programming.dev/u/logging_strict", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Whats in a Python tarball", "cc": [], "content": "<p>From helping other projects have run across a fundamental issue which web searches have not given appropriate answers.</p>\n<p>What should go in a tarball and what should not?</p>\n<p>Is it only the build files, python code, and package data and nothing else?</p>\n<p>Should it include tests/ folder?</p>\n<p>Should it include development and configuration files?</p>\n<p>Have seven published packages which include almost all the files and folders. Including:</p>\n<p>.gitignore,</p>\n<p>.gitattributes,</p>\n<p>.github folder tree,</p>\n<p>docs/,</p>\n<p>tests/,</p>\n<p>Makefile,</p>\n<p>all config files,</p>\n<p>all tox files,</p>\n<p>pre-commit config file</p>\n<p>My thinking is that the tarball should have everything needed to maintain the package, but this belief has been challenged. That the tarball is not appropriate for that.</p>\n<p>Thoughts?</p>\n", "mediaType": "text/html", "source": { "content": "From helping other projects have run across a fundamental issue which web searches have not given appropriate answers.\n\nWhat should go in a tarball and what should not?\n\nIs it only the build files, python code, and package data and nothing else?\n\nShould it include tests/ folder?\n\nShould it include development and configuration files?\n\nHave seven published packages which include almost all the files and folders. Including:\n\n.gitignore, \n\n.gitattributes, \n\n.github folder tree, \n\ndocs/, \n\ntests/, \n\nMakefile, \n\nall config files, \n\nall tox files, \n\npre-commit config file\n\nMy thinking is that the tarball should have everything needed to maintain the package, but this belief has been challenged. That the tarball is not appropriate for that.\n\nThoughts?", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-01-27T05:51:45.303180Z", "updated": "2025-01-27T12:34:11.043333Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24582623", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/cda44e90-2fd3-45d2-bc49-6e0475929c85" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/96127132-d004-4e1d-a6bf-7e9409efd02c", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24521999", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Pyenv in RStudio", "cc": [], "content": "<p>via <a href=\"https://bsky.app/profile/pyladies-bot.bsky.social/post/3lgkepjv6362w\">bsky.app/profile/…/3lgkepjv6362w</a></p>\n", "mediaType": "text/html", "source": { "content": "via https://bsky.app/profile/pyladies-bot.bsky.social/post/3lgkepjv6362w", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://isabelizimm.me/posts/2022-09-19_pyenv-in-rstudio/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-01-25T21:09:15.176110Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24521999", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/de228b71-4083-4c0f-8e3d-2a9d611f4505" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/467651d2-5570-48a9-b115-e7cbaf85e1d7", "actor": "https://me.dm/users/rexs4563", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://me.dm/users/rexs4563/statuses/113884108679394834", "attributedTo": "https://me.dm/users/rexs4563", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Read my latest article Speed up workflow with this Python Toolkit | 2025 |.", "cc": [], "content": "<p>Read my latest article Speed up workflow with this Python Toolkit | 2025 |.</p>\n<p><a href=\"https://medium.com/gitconnected/speed-up-workflow-with-this-python-toolkit-2025-04f7c8526022\" rel=\"nofollow\">https://medium.com/gitconnected/speed-up-workflow-with-this-python-toolkit-2025-04f7c8526022</a></p>\n<p><a href=\"https://me.dm/@medium\" rel=\"nofollow\">@medium</a> <a href=\"https://threads.net/@pythonclcoding/\" rel=\"nofollow\">@pythonclcoding</a> <a href=\"https://programming.dev/c/python\" rel=\"nofollow\">@python</a> <a href=\"https://threads.net/@pythonclcoding/\" rel=\"nofollow\">@pythonclcoding</a> <a href=\"https://me.dm/tags/python\" rel=\"nofollow\">#python</a> <a href=\"https://me.dm/tags/Programming\" rel=\"nofollow\">#Programming</a> <a href=\"https://me.dm/tags/CodingTips\" rel=\"nofollow\">#CodingTips</a></p>\n", "mediaType": "text/html", "source": { "content": "Read my latest article Speed up workflow with this Python Toolkit | 2025 |.\n\n[https://medium.com/gitconnected/speed-up-workflow-with-this-python-toolkit-2025-04f7c8526022](https://medium.com/gitconnected/speed-up-workflow-with-this-python-toolkit-2025-04f7c8526022)\n\n[@medium](https://me.dm/@medium) [@pythonclcoding](https://threads.net/@pythonclcoding/) [@python](https://programming.dev/c/python) [@pythonclcoding](https://threads.net/@pythonclcoding/) [#python](https://me.dm/tags/python) [#Programming](https://me.dm/tags/Programming) [#CodingTips](https://me.dm/tags/CodingTips)", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-01-24T15:46:31Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://me.dm/users/rexs4563/statuses/113884108679394834", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/9d5ddc4c-910b-4ab5-8ce3-33a9190a4700" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/26a2a966-9b19-49ab-b0db-cf11649246d0", "actor": "https://programming.dev/u/learnbyexample", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24444858", "attributedTo": "https://programming.dev/u/learnbyexample", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Understanding Python re(gex)?", "cc": [], "content": "<p>Hello!</p>\n<p>I recently published a new version of my <strong>Understanding Python re(gex)?</strong> ebook.</p>\n<p>This book will help you learn Python Regular Expressions step-by-step from beginner to advanced levels with <em>hundreds of examples and exercises</em>. In addition to the standard library <code>re</code>, the third-party <code>regex</code> module is also covered in this book.</p>\n<h3>Release offers</h3>\n<p>To celebrate the new release, you can download the PDF/EPUB versions for free till 31-Jan-2025:</p>\n<ul>\n<li><a href=\"https://leanpub.com/py_regex/c/free\" rel=\"nofollow\">Leanpub</a></li>\n<li><a href=\"https://learnbyexample.gumroad.com/l/py_regex/free\" rel=\"nofollow\">Gumroad</a></li>\n</ul>\n<h3>Interactive TUI app</h3>\n<p>I wrote a TUI app to help you solve exercises from this book interactively. See <a href=\"https://github.com/learnbyexample/TUI-apps/tree/main/PyRegexExercises\" rel=\"nofollow\">PyRegexExercises</a> repo for installation steps and <a href=\"https://github.com/learnbyexample/TUI-apps/blob/main/PyRegexExercises/app_guide.md\" rel=\"nofollow\">app_guide.md</a> for instructions on using this app.</p>\n<p>See my blog post <a href=\"https://learnbyexample.github.io/python-regex-cheatsheet/\" rel=\"nofollow\">Python regex cheatsheet</a> for a quick reference.</p>\n<h3>Web version and GitHub repo</h3>\n<p>You can read the book online here: <a href=\"https://learnbyexample.github.io/py_regular_expressions/\" rel=\"nofollow\">https://learnbyexample.github.io/py_regular_expressions/</a></p>\n<p>Visit <a href=\"https://github.com/learnbyexample/py_regular_expressions\" rel=\"nofollow\">https://github.com/learnbyexample/py_regular_expressions</a> for markdown source, example files, exercise solutions, sample chapters and other details related to the book.</p>\n<h3>Feedback and Errata</h3>\n<p>I would highly appreciate it if you’d let me know how you felt about this book. It could be anything from a simple thank you, rating/review, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn’t!) and so on. Reader feedback is essential and especially so for self-published authors.</p>\n<p>Happy learning :)</p>\n", "mediaType": "text/html", "source": { "content": "Hello!\n\nI recently published a new version of my **Understanding Python re(gex)?** ebook.\n\nThis book will help you learn Python Regular Expressions step-by-step from beginner to advanced levels with *hundreds of examples and exercises*. In addition to the standard library `re`, the third-party `regex` module is also covered in this book.\n\n### Release offers\n\nTo celebrate the new release, you can download the PDF/EPUB versions for free till 31-Jan-2025:\n\n* [Leanpub](https://leanpub.com/py_regex/c/free)\n* [Gumroad](https://learnbyexample.gumroad.com/l/py_regex/free)\n\n### Interactive TUI app\n\nI wrote a TUI app to help you solve exercises from this book interactively. See [PyRegexExercises](https://github.com/learnbyexample/TUI-apps/tree/main/PyRegexExercises) repo for installation steps and [app_guide.md](https://github.com/learnbyexample/TUI-apps/blob/main/PyRegexExercises/app_guide.md) for instructions on using this app.\n\nSee my blog post [Python regex cheatsheet](https://learnbyexample.github.io/python-regex-cheatsheet/) for a quick reference.\n\n### Web version and GitHub repo\n\nYou can read the book online here: [https://learnbyexample.github.io/py_regular_expressions/](https://learnbyexample.github.io/py_regular_expressions/)\n\nVisit [https://github.com/learnbyexample/py_regular_expressions](https://github.com/learnbyexample/py_regular_expressions) for markdown source, example files, exercise solutions, sample chapters and other details related to the book.\n\n### Feedback and Errata\n\nI would highly appreciate it if you'd let me know how you felt about this book. It could be anything from a simple thank you, rating/review, pointing out a typo, mistakes in code snippets, which aspects of the book worked for you (or didn't!) and so on. Reader feedback is essential and especially so for self-published authors.\n\nHappy learning :)", "mediaType": "text/markdown" }, "attachment": [], "sensitive": false, "published": "2025-01-24T10:17:36.277964Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24444858", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/477e7542-06e1-4b8c-a22e-a42214e26b69" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/e70ac5c5-840a-4c7a-a7ca-8fc7c4351cc2", "actor": "https://programming.dev/u/learnbyexample", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24178615", "attributedTo": "https://programming.dev/u/learnbyexample", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python Concurrency: Threads, Processes, and asyncio Explained", "cc": [], "mediaType": "text/html", "attachment": [ { "href": "https://newvick.com/python-concurrency/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-01-17T14:10:48.035158Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24178615", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/66e6fb59-b6ad-4a53-bda7-003e4128304f" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/a13dccd2-74ab-4213-a42d-f3889623068d", "actor": "https://programming.dev/u/logging_strict", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24160206", "attributedTo": "https://programming.dev/u/logging_strict", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "PEP 735 does dependency group solve anything?", "cc": [], "content": "<p>PEP 735 what is it’s goal? Does it solve our dependency hell issue?</p>\n<p>A deep dive and out comes this limitation</p>\n<p><strong>The mutual compatibility of Dependency Groups is not guaranteed.</strong></p>\n<p>– <a href=\"https://peps.python.org/pep-0735/#lockfile-generation\">peps.python.org/pep-0735/#lockfile-generation</a></p>\n<p>Huh?! Why not?</p>\n<p><strong>mutual compatibility or go pound sand!</strong></p>\n<pre style=\"background-color:#ffffff;\">\n<span style=\"color:#323232;\">pip install -r requirements/dev.lock\n</span><span style=\"color:#323232;\">pip install -r requirements/kit.lock -r requirements/manage.lock\n</span></pre>\n<p>The above code, purposefully, does not afford pip a fighting chance.\nIf there are incompatibilities, it’ll come out when trying randomized\ncombinations.</p>\n<p>Without a means to test for and guarantee mutual compatibility, end users\nwill <strong>always</strong> find themselves in dependency hell.</p>\n<p>Any combination of requirement files (or dependency groups),\n<strong>intended for the same venv</strong>, MUST always work!</p>\n<p>What if this is scaled further, instead of one package, a chain of packages?!</p>\n", "mediaType": "text/html", "source": { "content": "PEP 735 what is it's goal? Does it solve our dependency hell issue?\n\nA deep dive and out comes this limitation\n\n**The mutual compatibility of Dependency Groups is not guaranteed.**\n\n-- https://peps.python.org/pep-0735/#lockfile-generation\n\nHuh?! Why not?\n\n**mutual compatibility or go pound sand!**\n\n```\npip install -r requirements/dev.lock\npip install -r requirements/kit.lock -r requirements/manage.lock\n```\n\nThe above code, purposefully, does not afford pip a fighting chance.\nIf there are incompatibilities, it'll come out when trying randomized\ncombinations.\n\nWithout a means to test for and guarantee mutual compatibility, end users\nwill **always** find themselves in dependency hell.\n\nAny combination of requirement files (or dependency groups),\n**intended for the same venv**, MUST always work!\n\nWhat if this is scaled further, instead of one package, a chain of packages?!", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://peps.python.org/pep-0735/", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "sensitive": false, "published": "2025-01-17T02:13:13.921200Z", "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24160206", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/d7ba9962-3bd9-4a2b-bccc-2a28fdd40161" }, { "actor": "https://programming.dev/c/python", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "id": "https://programming.dev/activities/create/42647fbc-a3db-4993-a2b0-591e8da32931", "actor": "https://programming.dev/u/norambna", "to": [ "https://www.w3.org/ns/activitystreams#Public" ], "object": { "type": "Page", "id": "https://programming.dev/post/24068148", "attributedTo": "https://programming.dev/u/norambna", "to": [ "https://programming.dev/c/python", "https://www.w3.org/ns/activitystreams#Public" ], "name": "Python 3.14.0 alpha 4", "cc": [], "content": "", "mediaType": "text/html", "source": { "content": "", "mediaType": "text/markdown" }, "attachment": [ { "href": "https://discuss.python.org/t/python-3-14-0-alpha-4/77112", "mediaType": "text/html; charset=utf-8", "type": "Link" } ], "image": { "type": "Image", "url": "https://programming.dev/pictrs/image/82387f42-e5a7-4d23-9d18-dd40fc24dfec.png" }, "sensitive": false, "published": "2025-01-14T23:06:58.611525Z", "language": { "identifier": "en", "name": "English" }, "audience": "https://programming.dev/c/python", "tag": [ { "href": "https://programming.dev/post/24068148", "name": "#python", "type": "Hashtag" } ] }, "cc": [ "https://programming.dev/c/python" ], "type": "Create", "audience": "https://programming.dev/c/python" }, "cc": [ "https://programming.dev/c/python/followers" ], "type": "Announce", "id": "https://programming.dev/activities/announce/create/56585358-0fa7-47b5-ae7d-63c106532a33" } ] }