Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#7705 closed defect (fixed)

graphs: replace the worldmap sobj by some code (or something else that is transparent)

Reported by: was Owned by: rlm
Priority: major Milestone: sage-4.3
Component: graph theory Keywords:
Cc: ncohen Merged in: sage-4.3.rc1
Authors: Nathann Cohen Reviewers: Robert Miller, William Stein
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by was)

This command in sage-4.3 returns a loaded sobj:

sage: graphs.WorldMap()
Graph on 251 vertices

The Sage source distribution must ship with a bare minimum of opaque potentially dangerous binary files. Pickles (i.e. sobjs) are fairly opaque binary files that can invoke arbitrary code when being unpickled. Also, sobj's have the drawback that they can someday break, and can be very hard to update later (the map of the world will change periodically). There are currently three places in the Sage source code that includes pickles:

  • the pickle jar,
  • the database of lattice polytopes
  • the above world map graph.

Please replace the world map sobj by something else, e.g., some code that creates the world map when the user first asks for it.

Attachments (2)

trac_7705.patch (25.7 KB) - added by ncohen 10 years ago.
trac_7705-docs.patch (801 bytes) - added by rlm 10 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by was

  • Description modified (diff)

comment:2 Changed 10 years ago by was

See also #7706.

comment:3 Changed 10 years ago by ncohen

  • Cc ncohen added

comment:4 Changed 10 years ago by ncohen

  • Status changed from new to needs_review

comment:5 Changed 10 years ago by ncohen

With this patch applied, the file SAGE_DATA+"graphs/graph_world.sobj" could be removed !

Nathann

comment:6 Changed 10 years ago by rlm

  • Authors set to Nathann Cohen
  • Reviewers set to Robert Miller
  • Status changed from needs_review to positive_review

comment:7 Changed 10 years ago by was

  • Status changed from positive_review to needs_work

Thanks. However, you forgot to include the gps_coordinates attribute that was in graph_world.sobj.

comment:8 Changed 10 years ago by ncohen

  • Status changed from needs_work to needs_review

You're absolutely right !! With some luck, someone will take the time to translate these GPS coordinates using the Mercator projection to obtain good plottings of the world :-)

Nathann

Changed 10 years ago by ncohen

Changed 10 years ago by rlm

comment:9 Changed 10 years ago by rlm

  • Reviewers changed from Robert Miller to Robert Miller, William Stein
  • Status changed from needs_review to positive_review

comment:10 Changed 10 years ago by mhansen

  • Merged in set to sage-4.3.rc1
  • Resolution set to fixed
  • Status changed from positive_review to closed

comment:11 Changed 10 years ago by mhansen

  • Milestone changed from sage-4.3.1 to sage-4.3
Note: See TracTickets for help on using tickets.