Deprecated set() type in lib/sqlalchemy/sql/schema.py

Issue #3443 resolved
Rob MacKinnon created an issue

While doing some work I stumbled upon some sets on an object. Further research led me to the source file: lib/sqlalchemy/sql/schema.py; line #454 specifically. At which point I hit gold.

My plan was to re-cursing through the foreign keys in the Table object to auto-build an outputted serialized object (as there are some serious problems with Eve and MySQL, it has been sadly easier to re-invent some of the wheel :L). As the object is type set, that proves more difficult and as of Python 2.6 it's usage is deprecated (running on 2.7).

Comments (4)

  1. Mike Bayer repo owner

    Sorry, I'm not following. I have no knowledge that set() is deprecated and it seems to remain a first class function in Python 3.4: https://docs.python.org/3/library/stdtypes.html#set

    The use of the set() builtin in SQLAlchemy is ubiquitous. Line 454 is in the middle of three other lines using it so I have a feeling you're looking perhaps the old "sets.Set()" object in some very old SQLAlchemy version. Can you clarify please?

  2. Rob MacKinnon reporter

    You're 100%, the set() entries I was seeing were not the same sets.Set() that were deprecated. Closing this out.

  3. Log in to comment