Bug 223136 - databases/py-gdbm: Fix Python 3 support
Summary: databases/py-gdbm: Fix Python 3 support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sunpoet Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks: 223137
  Show dependency treegraph
 
Reported: 2017-10-20 21:11 UTC by Greg V
Modified: 2020-02-14 07:07 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (python)


Attachments
py-gdbm.patch (594 bytes, patch)
2017-10-20 21:11 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2017-10-20 21:11:01 UTC
Created attachment 187336 [details]
py-gdbm.patch

This tiny, one-character patch fixes Python 3 support :D

Python 3 expects the library to be named _gdbm, not just gdbm. After this change, 'import dbm.gnu as gdbm' no longer fails.
Comment 1 Greg V 2017-12-19 14:44:16 UTC
ping. Can we get this merged soon??
Comment 2 commit-hook freebsd_committer 2017-12-29 18:48:08 UTC
A commit references this bug:

Author: sunpoet
Date: Fri Dec 29 18:47:42 UTC 2017
New revision: 457528
URL: https://svnweb.freebsd.org/changeset/ports/457528

Log:
  Fix _gdbm module for Python 3

  - Bump PORTREVISION for package change

  PR:		223136
  Submitted by:	Greg V <greg@unrelenting.technology>

Changes:
  head/databases/py-gdbm/Makefile
  head/databases/py-gdbm/files/setup3.py
Comment 3 Sunpoet Po-Chuan Hsieh freebsd_committer 2017-12-29 18:53:34 UTC
Committed. Thanks!
Comment 4 Gleb Popov freebsd_committer 2020-02-14 07:07:51 UTC
When trying to update net/py-avahi to use Python 3, I got the following error:

checking for python module gdbm... no
configure: error: Could not find Python module gdbm

The script searches for modules by running this python code

import <modulename>

After this PR, the module is named _gdbm, which seems to be the source of problem.

Is adding _ really proper solution? Or maybe it is avahi problem?