GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:41 JST Chris Siebenmann Chris Siebenmann

    It has been '0' days since I have been made extremely angry by Django and its sometimes terrible documentation that is apparently written for either deep Django experts or total novices. I am just a person with a Django application who would like to know why the Ubuntu 24.04 mod_wsgi causes it to render empty 'form.non_field_errors' and 'field.errors' as '[]' instead of nothing. Because of Python and Django bullshit, presumably, but I need to fix it.

    In conversation about 4 months ago from mastodon.social permalink
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:39 JST Chris Siebenmann Chris Siebenmann
      in reply to

      It appears that Canonical has done something unusual to Python sub-interpreters in the Ubuntu 24.04 version of Python, such that if you create one in your code (as mod_wsgi normally does), list.__str__ gets set there where it normally doesn't exist. Interested parties can try out this test program:

      https://www.cs.toronto.edu/~cks/vendors/ubuntu2404-python/subinterp-list-bug.c

      I guess now I have to try to summon the energy to file an Ubuntu bug. Please feel free to beat me to it.

      In conversation about 4 months ago permalink
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:39 JST Chris Siebenmann Chris Siebenmann
      in reply to

      As chased down by @ewenmcneill this is a Python 3.12 bug that is fixed in 3.12.5[1], in "gh-117482: Unexpected slot wrappers are no longer created for builtin static types in subinterpreters"[2] per the changelog[3]. Will Ubuntu backport a fix or update 24.04 to a newer 3.12.x? Who knows.

      (The issue applies to multiple builtin types, not just 'list'.)

      1: https://cloudisland.nz/@ewenmcneill/113830211688055241
      2: https://github.com/python/cpython/issues/117482
      3: https://docs.python.org/release/3.12.8/whatsnew/changelog.html#python-3-12-5-final

      In conversation about 4 months ago permalink

      Attachments

      1. No result found on File_thumbnail lookup.
        Ewen McNeill (@ewenmcneill@cloudisland.nz)
        from Ewen McNeill
        @cks@mastodon.social fixed in Python 3.12.5 (gh-117482) AFAICT. So what you need to do is persuade Ubuntu to upgrade to later minor Python 3.12. Or do so yourself. https://github.com/python/cpython/issues/117482 https://docs.python.org/release/3.12.8/whatsnew/changelog.html#python-3-12-8
      2. Domain not in remote thumbnail source whitelist: opengraph.githubassets.com
        Weird `int.__str__` behaviour inside sub-interpreters · Issue #117482 · python/cpython
        Bug report Bug description: Hi Python maintainers! I noticed something weird when using subinterpreters, while converting an Enum to string I get an unexpected result. This occurs in Python 3.12 an...
      3. Domain not in remote thumbnail source whitelist: docs.python.org
        Changelog
        from ../about.html
        Python next: Release date: XXXX-XX-XX macOS: gh-127592: Usage of the unified Apple System Log APIs was disabled when the minimum macOS version is earlier than 10.12.. Windows: gh-127353: Allow to f...
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:39 JST Chris Siebenmann Chris Siebenmann
      in reply to

      Dear everyone writing release notes for software: if you have a specific term for something, please do not decide to sometimes hyphenate it ('sub-interpreter') and sometimes not ('subinterpreter'). People searching your release notes for notes on things will not appreciate your cleverness.

      In conversation about 4 months ago permalink
      Haelwenn /элвэн/ :triskell: likes this.
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:40 JST Chris Siebenmann Chris Siebenmann
      in reply to

      Ah yes, Python, home of:

      NameError: name 'TypeError' is not defined

      (You can apparently get this during interpreter shutdown if you have __del__ methods. It's fun times if you're already debugging some other Python problem.)

      In conversation about 4 months ago permalink
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:40 JST Chris Siebenmann Chris Siebenmann
      in reply to

      It turns out that my mystery is not a Django problem, it is a 'mod_wsgi on Ubuntu 24.04' problem, where things running under mod_wsgi silently wind up with an incorrect method resolution order. How do you even do that, especially when __mro__ is not affected?

      (Is mod_wsgi playing around with the insides of the Python interpreter?)

      In conversation about 4 months ago permalink
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:40 JST Chris Siebenmann Chris Siebenmann
      in reply to

      And yes it is specifically the Ubuntu 24.04 version of mod_wsgi; both 20.04 and 22.04 mod_wsgi work fine. Conveniently I have a very simple reproduction case, inconveniently Ubuntu bug reports famously do nothing.

      Perhaps this machine will become an Ubuntu 22.04 machine instead of the planned 24.04 update.

      In conversation about 4 months ago permalink
    • Embed this notice
      Chris Siebenmann (cks@mastodon.social)'s status on Thursday, 16-Jan-2025 00:45:40 JST Chris Siebenmann Chris Siebenmann
      in reply to

      Our Ubuntu 24.04/mod_wsgi mystery keeps being deeper: it's been pointed out that list doesn't normally have a __str__ method; normally it comes from 'object'. So our real problem is that the list builtin in mod_wsgi executed Python has acquired a __str__ special method (!!).

      In conversation about 4 months ago permalink
    • Embed this notice
      Haelwenn /элвэн/ :triskell: (lanodan@queer.hacktivis.me)'s status on Thursday, 16-Jan-2025 00:50:59 JST Haelwenn /элвэн/ :triskell: Haelwenn /элвэн/ :triskell:
      in reply to

      @cks Reminds me of why I got interested in Unix typo(1) at first, consistent spelling being important.
      And in English things like referrer vs. referer or the more typical color vs. colour are rather frequent.

      In conversation about 4 months ago permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.